mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-17 15:56:40 +08:00
Merge pull request #6335 from Ultimaker/CS-158_fix_monitor_progress_bar
CS-158 Fix monitor tab print status (4.3 cherry pick)
This commit is contained in:
commit
4ab84c0568
@ -20,7 +20,7 @@ Item
|
|||||||
property var printJob: null
|
property var printJob: null
|
||||||
|
|
||||||
width: childrenRect.width
|
width: childrenRect.width
|
||||||
height: 18 * screenScaleFactor // TODO: Theme!
|
height: UM.Theme.getSize("monitor_text_line").height
|
||||||
|
|
||||||
UM.ProgressBar
|
UM.ProgressBar
|
||||||
{
|
{
|
||||||
@ -31,7 +31,7 @@ Item
|
|||||||
left: parent.left
|
left: parent.left
|
||||||
}
|
}
|
||||||
value: printJob ? printJob.progress : 0
|
value: printJob ? printJob.progress : 0
|
||||||
width: UM.Theme.getSize("monitor_column").width
|
width: UM.Theme.getSize("monitor_progress_bar").width
|
||||||
}
|
}
|
||||||
|
|
||||||
Label
|
Label
|
||||||
@ -40,16 +40,16 @@ Item
|
|||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
left: progressBar.right
|
left: progressBar.right
|
||||||
leftMargin: 18 * screenScaleFactor // TODO: Theme!
|
leftMargin: UM.Theme.getSize("monitor_margin").width
|
||||||
verticalCenter: parent.verticalCenter
|
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")
|
||||||
width: contentWidth
|
width: contentWidth
|
||||||
font: UM.Theme.getFont("medium") // 14pt, regular
|
font: UM.Theme.getFont("default") // 12pt, regular
|
||||||
|
|
||||||
// FIXED-LINE-HEIGHT:
|
// FIXED-LINE-HEIGHT:
|
||||||
height: 18 * screenScaleFactor // TODO: Theme!
|
height: UM.Theme.getSize("monitor_text_line").height
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
renderType: Text.NativeRendering
|
renderType: Text.NativeRendering
|
||||||
}
|
}
|
||||||
@ -59,11 +59,11 @@ Item
|
|||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
left: percentLabel.right
|
left: percentLabel.right
|
||||||
leftMargin: 18 * screenScaleFactor // TODO: Theme!
|
leftMargin: UM.Theme.getSize("monitor_margin").width
|
||||||
verticalCenter: parent.verticalCenter
|
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("default") // 12pt, regular
|
||||||
text:
|
text:
|
||||||
{
|
{
|
||||||
if (!printJob)
|
if (!printJob)
|
||||||
@ -103,7 +103,7 @@ Item
|
|||||||
width: contentWidth
|
width: contentWidth
|
||||||
|
|
||||||
// FIXED-LINE-HEIGHT:
|
// FIXED-LINE-HEIGHT:
|
||||||
height: 18 * screenScaleFactor // TODO: Theme!
|
height: UM.Theme.getSize("monitor_text_line").height
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
renderType: Text.NativeRendering
|
renderType: Text.NativeRendering
|
||||||
}
|
}
|
||||||
|
@ -619,6 +619,8 @@
|
|||||||
"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]
|
"monitor_column": [18.0, 1.0],
|
||||||
|
"monitor_progress_bar": [16.5, 1.0],
|
||||||
|
"monitor_margin": [1.5, 1.5]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user