Remove ProgressBar style and use UM.ProgressBar instead

CURA-8685
This commit is contained in:
Jaime van Kessel 2022-02-15 17:07:22 +01:00
parent 13227249b5
commit 821581bc65
4 changed files with 4 additions and 57 deletions

View file

@ -7,7 +7,7 @@ import QtQuick.Layouts 1.1
import QtQuick.Window 2.1
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
@ -157,7 +157,7 @@ Cura.MachineAction
wrapMode: Text.Wrap
}
ProgressBar
UM.ProgressBar
{
id: prog
value: (manager.firmwareUpdater != null) ? manager.firmwareUpdater.firmwareProgress / 100 : 0

View file

@ -183,7 +183,7 @@ Item
visible: showProgress
}
ProgressBar
UM.ProgressBar
{
id: progressBar;
minimumValue: 0;
@ -218,8 +218,6 @@ Item
return false;
}
}
style: UM.Theme.styles.progressbar;
property string backgroundColor: UM.Theme.getColor("progressbar_background");
property string controlColor: base.statusColor;

View file

@ -9,57 +9,6 @@ import UM 1.1 as UM
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
{
ScrollViewStyle