mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 02:37:49 -06:00
Remove ProgressBar style and use UM.ProgressBar instead
CURA-8685
This commit is contained in:
parent
13227249b5
commit
821581bc65
4 changed files with 4 additions and 57 deletions
|
@ -7,7 +7,7 @@ import QtQuick.Layouts 1.1
|
||||||
import QtQuick.Window 2.1
|
import QtQuick.Window 2.1
|
||||||
import QtQuick.Dialogs 1.2 // For filedialog
|
import QtQuick.Dialogs 1.2 // For filedialog
|
||||||
|
|
||||||
import UM 1.2 as UM
|
import UM 1.3 as UM
|
||||||
import Cura 1.0 as Cura
|
import Cura 1.0 as Cura
|
||||||
|
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ Cura.MachineAction
|
||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
}
|
}
|
||||||
|
|
||||||
ProgressBar
|
UM.ProgressBar
|
||||||
{
|
{
|
||||||
id: prog
|
id: prog
|
||||||
value: (manager.firmwareUpdater != null) ? manager.firmwareUpdater.firmwareProgress / 100 : 0
|
value: (manager.firmwareUpdater != null) ? manager.firmwareUpdater.firmwareProgress / 100 : 0
|
||||||
|
|
|
@ -183,7 +183,7 @@ Item
|
||||||
visible: showProgress
|
visible: showProgress
|
||||||
}
|
}
|
||||||
|
|
||||||
ProgressBar
|
UM.ProgressBar
|
||||||
{
|
{
|
||||||
id: progressBar;
|
id: progressBar;
|
||||||
minimumValue: 0;
|
minimumValue: 0;
|
||||||
|
@ -218,8 +218,6 @@ Item
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
style: UM.Theme.styles.progressbar;
|
|
||||||
|
|
||||||
property string backgroundColor: UM.Theme.getColor("progressbar_background");
|
property string backgroundColor: UM.Theme.getColor("progressbar_background");
|
||||||
property string controlColor: base.statusColor;
|
property string controlColor: base.statusColor;
|
||||||
|
|
||||||
|
|
|
@ -9,57 +9,6 @@ import UM 1.1 as UM
|
||||||
|
|
||||||
QtObject
|
QtObject
|
||||||
{
|
{
|
||||||
property Component progressbar: Component
|
|
||||||
{
|
|
||||||
ProgressBarStyle
|
|
||||||
{
|
|
||||||
background: Rectangle
|
|
||||||
{
|
|
||||||
implicitWidth: UM.Theme.getSize("message").width - (UM.Theme.getSize("default_margin").width * 2)
|
|
||||||
implicitHeight: UM.Theme.getSize("progressbar").height
|
|
||||||
color: control.hasOwnProperty("backgroundColor") ? control.backgroundColor : UM.Theme.getColor("progressbar_background")
|
|
||||||
radius: UM.Theme.getSize("progressbar_radius").width
|
|
||||||
}
|
|
||||||
progress: Rectangle
|
|
||||||
{
|
|
||||||
color:
|
|
||||||
{
|
|
||||||
if(control.indeterminate)
|
|
||||||
{
|
|
||||||
return "transparent";
|
|
||||||
}
|
|
||||||
else if(control.hasOwnProperty("controlColor"))
|
|
||||||
{
|
|
||||||
return control.controlColor;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return UM.Theme.getColor("progressbar_control");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
radius: UM.Theme.getSize("progressbar_radius").width
|
|
||||||
Rectangle
|
|
||||||
{
|
|
||||||
radius: UM.Theme.getSize("progressbar_radius").width
|
|
||||||
color: control.hasOwnProperty("controlColor") ? control.controlColor : UM.Theme.getColor("progressbar_control")
|
|
||||||
width: UM.Theme.getSize("progressbar_control").width
|
|
||||||
height: UM.Theme.getSize("progressbar_control").height
|
|
||||||
visible: control.indeterminate
|
|
||||||
|
|
||||||
SequentialAnimation on x
|
|
||||||
{
|
|
||||||
id: xAnim
|
|
||||||
property int animEndPoint: UM.Theme.getSize("message").width - Math.round((UM.Theme.getSize("default_margin").width * 2.5)) - UM.Theme.getSize("progressbar_control").width
|
|
||||||
running: control.indeterminate && control.visible
|
|
||||||
loops: Animation.Infinite
|
|
||||||
NumberAnimation { from: 0; to: xAnim.animEndPoint; duration: 2000;}
|
|
||||||
NumberAnimation { from: xAnim.animEndPoint; to: 0; duration: 2000;}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
property Component scrollview: Component
|
property Component scrollview: Component
|
||||||
{
|
{
|
||||||
ScrollViewStyle
|
ScrollViewStyle
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue