mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 15:37:27 -06:00
Move Cura.ProgressBar to Uranium
It is not specific to 3D printing. Contributes to issue CURA-6057.
This commit is contained in:
parent
745d9e6116
commit
df32f3e263
5 changed files with 4 additions and 59 deletions
|
@ -22,7 +22,7 @@ Item
|
||||||
width: childrenRect.width
|
width: childrenRect.width
|
||||||
height: 18 * screenScaleFactor // TODO: Theme!
|
height: 18 * screenScaleFactor // TODO: Theme!
|
||||||
|
|
||||||
ProgressBar
|
UM.ProgressBar
|
||||||
{
|
{
|
||||||
id: progressBar
|
id: progressBar
|
||||||
anchors
|
anchors
|
||||||
|
@ -30,22 +30,6 @@ Item
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
value: printJob ? printJob.progress : 0
|
value: printJob ? printJob.progress : 0
|
||||||
style: ProgressBarStyle
|
|
||||||
{
|
|
||||||
background: Rectangle
|
|
||||||
{
|
|
||||||
color: UM.Theme.getColor("monitor_progress_bar_empty")
|
|
||||||
implicitHeight: visible ? 12 * screenScaleFactor : 0 // TODO: Theme!
|
|
||||||
implicitWidth: 180 * screenScaleFactor // TODO: Theme!
|
|
||||||
radius: 2 * screenScaleFactor // TODO: Theme!
|
|
||||||
}
|
|
||||||
progress: Rectangle
|
|
||||||
{
|
|
||||||
id: progressItem;
|
|
||||||
color: printJob && printJob.isActive ? UM.Theme.getColor("monitor_progress_bar_fill") : UM.Theme.getColor("monitor_progress_bar_deactive")
|
|
||||||
radius: 2 * screenScaleFactor // TODO: Theme!
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,7 +6,7 @@ import QtQuick.Controls 2.1
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import QtQuick.Controls 1.4 as Controls1
|
import QtQuick.Controls 1.4 as Controls1
|
||||||
|
|
||||||
import UM 1.1 as UM
|
import UM 1.3 as UM
|
||||||
import Cura 1.0 as Cura
|
import Cura 1.0 as Cura
|
||||||
|
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ Column
|
||||||
}
|
}
|
||||||
|
|
||||||
// Progress bar, only visible when the backend is in the process of slice the printjob
|
// Progress bar, only visible when the backend is in the process of slice the printjob
|
||||||
Cura.ProgressBar
|
UM.ProgressBar
|
||||||
{
|
{
|
||||||
id: progressBar
|
id: progressBar
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|
|
@ -44,7 +44,7 @@ Item
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
radius: UM.Theme.getSize("default_radius").width
|
radius: UM.Theme.getSize("default_radius").width
|
||||||
color: UM.Theme.getColor("main_background")
|
color: UM.Theme.getColor("main_background")
|
||||||
Cura.ProgressBar
|
UM.ProgressBar
|
||||||
{
|
{
|
||||||
id: progressBar
|
id: progressBar
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
|
|
|
@ -1,38 +0,0 @@
|
||||||
// Copyright (c) 2019 Ultimaker B.V.
|
|
||||||
// Cura is released under the terms of the LGPLv3 or higher.
|
|
||||||
|
|
||||||
import QtQuick 2.10
|
|
||||||
import QtQuick.Controls 2.3
|
|
||||||
|
|
||||||
import UM 1.3 as UM
|
|
||||||
import Cura 1.0 as Cura
|
|
||||||
|
|
||||||
//
|
|
||||||
// Cura-style progress bar, with a grey background and a blue indication bar.
|
|
||||||
//
|
|
||||||
ProgressBar
|
|
||||||
{
|
|
||||||
id: progressBar
|
|
||||||
width: parent.width
|
|
||||||
height: UM.Theme.getSize("progressbar").height
|
|
||||||
|
|
||||||
background: Rectangle
|
|
||||||
{
|
|
||||||
anchors.fill: parent
|
|
||||||
radius: UM.Theme.getSize("progressbar_radius").width
|
|
||||||
color: UM.Theme.getColor("progressbar_background")
|
|
||||||
}
|
|
||||||
|
|
||||||
contentItem: Item
|
|
||||||
{
|
|
||||||
anchors.fill: parent
|
|
||||||
|
|
||||||
Rectangle
|
|
||||||
{
|
|
||||||
width: progressBar.visualPosition * parent.width
|
|
||||||
height: parent.height
|
|
||||||
radius: UM.Theme.getSize("progressbar_radius").width
|
|
||||||
color: UM.Theme.getColor("progressbar_control")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -24,7 +24,6 @@ ToolTip 1.0 ToolTip.qml
|
||||||
CheckBox 1.0 CheckBox.qml
|
CheckBox 1.0 CheckBox.qml
|
||||||
ComboBox 1.0 ComboBox.qml
|
ComboBox 1.0 ComboBox.qml
|
||||||
NotificationIcon 1.0 NotificationIcon.qml
|
NotificationIcon 1.0 NotificationIcon.qml
|
||||||
ProgressBar 1.0 ProgressBar.qml
|
|
||||||
RadioButton 1.0 RadioButton.qml
|
RadioButton 1.0 RadioButton.qml
|
||||||
TabButton 1.0 TabButton.qml
|
TabButton 1.0 TabButton.qml
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue