Merge pull request #5763 from Ultimaker/CL-1329_fix_monitor_progress_bar_bug

CL-1329 fix monitor progress bar bug
This commit is contained in:
Remco Burema 2019-05-21 17:27:53 +02:00 committed by GitHub
commit 083564a184
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 5 deletions

View File

@ -51,7 +51,7 @@ Item
{ {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
height: 18 * screenScaleFactor // TODO: Theme! height: 18 * screenScaleFactor // TODO: Theme!
width: 216 * screenScaleFactor // TODO: Theme! (Should match column size) width: UM.Theme.getSize("monitor_column").width
Rectangle Rectangle
{ {
color: UM.Theme.getColor("monitor_skeleton_loading") color: UM.Theme.getColor("monitor_skeleton_loading")
@ -79,7 +79,7 @@ Item
{ {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
height: 18 * screenScaleFactor // TODO: Theme! height: 18 * screenScaleFactor // TODO: Theme!
width: 216 * screenScaleFactor // TODO: Theme! (Should match column size) width: UM.Theme.getSize("monitor_column").width
Rectangle Rectangle
{ {
color: UM.Theme.getColor("monitor_skeleton_loading") color: UM.Theme.getColor("monitor_skeleton_loading")

View File

@ -28,9 +28,12 @@ Item
anchors anchors
{ {
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
left: parent.left
} }
value: printJob ? printJob.progress : 0 value: printJob ? printJob.progress : 0
width: UM.Theme.getSize("monitor_column").width
} }
Label Label
{ {
id: percentLabel id: percentLabel
@ -38,6 +41,7 @@ Item
{ {
left: progressBar.right left: progressBar.right
leftMargin: 18 * screenScaleFactor // TODO: Theme! leftMargin: 18 * screenScaleFactor // TODO: Theme!
verticalCenter: parent.verticalCenter
} }
text: printJob ? Math.round(printJob.progress * 100) + "%" : "0%" text: printJob ? Math.round(printJob.progress * 100) + "%" : "0%"
color: printJob && printJob.isActive ? UM.Theme.getColor("monitor_text_primary") : UM.Theme.getColor("monitor_text_disabled") color: printJob && printJob.isActive ? UM.Theme.getColor("monitor_text_primary") : UM.Theme.getColor("monitor_text_disabled")
@ -56,6 +60,7 @@ Item
{ {
left: percentLabel.right left: percentLabel.right
leftMargin: 18 * screenScaleFactor // TODO: Theme! leftMargin: 18 * screenScaleFactor // TODO: Theme!
verticalCenter: parent.verticalCenter
} }
color: UM.Theme.getColor("monitor_text_primary") color: UM.Theme.getColor("monitor_text_primary")
font: UM.Theme.getFont("medium") // 14pt, regular font: UM.Theme.getFont("medium") // 14pt, regular

View File

@ -120,7 +120,7 @@ Item
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("medium") // 14pt, regular font: UM.Theme.getFont("medium") // 14pt, regular
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
width: 216 * screenScaleFactor // TODO: Theme! (Should match column size) width: UM.Theme.getSize("monitor_column").width
// FIXED-LINE-HEIGHT: // FIXED-LINE-HEIGHT:
height: 18 * screenScaleFactor // TODO: Theme! height: 18 * screenScaleFactor // TODO: Theme!
@ -135,7 +135,7 @@ Item
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("medium") // 14pt, regular font: UM.Theme.getFont("medium") // 14pt, regular
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
width: 216 * screenScaleFactor // TODO: Theme! (Should match column size) width: UM.Theme.getSize("monitor_column").width
// FIXED-LINE-HEIGHT: // FIXED-LINE-HEIGHT:
height: 18 * screenScaleFactor // TODO: Theme! height: 18 * screenScaleFactor // TODO: Theme!

View File

@ -618,6 +618,7 @@
"monitor_shadow_offset": [0.15, 0.15], "monitor_shadow_offset": [0.15, 0.15],
"monitor_empty_state_offset": [5.6, 5.6], "monitor_empty_state_offset": [5.6, 5.6],
"monitor_empty_state_size": [35.0, 25.0], "monitor_empty_state_size": [35.0, 25.0],
"monitor_external_link_icon": [1.16, 1.16] "monitor_external_link_icon": [1.16, 1.16],
"monitor_column": [18.0, 1.0]
} }
} }