mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 14:44:13 -06:00
Improve inactive coloring
Contributes to CL-1048
This commit is contained in:
parent
0d67420601
commit
1c8b086403
2 changed files with 56 additions and 10 deletions
|
@ -106,6 +106,17 @@ Component
|
||||||
height: childrenRect.height + UM.Theme.getSize("default_margin").height
|
height: childrenRect.height + UM.Theme.getSize("default_margin").height
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
color:
|
||||||
|
{
|
||||||
|
if(modelData.state == "disabled")
|
||||||
|
{
|
||||||
|
return UM.Theme.getColor("monitor_background_inactive")
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return UM.Theme.getColor("monitor_background_active")
|
||||||
|
}
|
||||||
|
}
|
||||||
id: base
|
id: base
|
||||||
property var shadowRadius: 5 * screenScaleFactor
|
property var shadowRadius: 5 * screenScaleFactor
|
||||||
property var collapsed: true
|
property var collapsed: true
|
||||||
|
@ -141,7 +152,6 @@ Component
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
|
|
||||||
if (base.collapsed) {
|
if (base.collapsed) {
|
||||||
printer_list.current_index = model.index
|
printer_list.current_index = model.index
|
||||||
}
|
}
|
||||||
|
@ -185,7 +195,7 @@ Component
|
||||||
{
|
{
|
||||||
if(modelData.state == "disabled")
|
if(modelData.state == "disabled")
|
||||||
{
|
{
|
||||||
return UM.Theme.getColor("setting_control_disabled")
|
return UM.Theme.getColor("monitor_text_inactive")
|
||||||
}
|
}
|
||||||
|
|
||||||
if(modelData.activePrintJob != undefined)
|
if(modelData.activePrintJob != undefined)
|
||||||
|
@ -193,7 +203,7 @@ Component
|
||||||
return UM.Theme.getColor("primary")
|
return UM.Theme.getColor("primary")
|
||||||
}
|
}
|
||||||
|
|
||||||
return UM.Theme.getColor("setting_control_disabled")
|
return UM.Theme.getColor("monitor_text_inactive")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -241,7 +251,7 @@ Component
|
||||||
width: parent.width
|
width: parent.width
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
font: UM.Theme.getFont("default")
|
font: UM.Theme.getFont("default")
|
||||||
color: UM.Theme.getColor("monitor_secondary_text")
|
color: UM.Theme.getColor("monitor_text_inactive")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -274,8 +284,16 @@ Component
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
id: topSpacer
|
id: topSpacer
|
||||||
color: UM.Theme.getColor("viewport_background")
|
color:
|
||||||
height: 2
|
{
|
||||||
|
if(modelData.state == "disabled")
|
||||||
|
{
|
||||||
|
return UM.Theme.getColor("monitor_lining_inactive")
|
||||||
|
}
|
||||||
|
return UM.Theme.getColor("viewport_background")
|
||||||
|
}
|
||||||
|
// UM.Theme.getColor("viewport_background")
|
||||||
|
height: 1
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
left: parent.left
|
left: parent.left
|
||||||
|
@ -288,7 +306,14 @@ Component
|
||||||
PrinterFamilyPill
|
PrinterFamilyPill
|
||||||
{
|
{
|
||||||
id: printerFamilyPill
|
id: printerFamilyPill
|
||||||
color: UM.Theme.getColor("viewport_background")
|
color:
|
||||||
|
{
|
||||||
|
if(modelData.state == "disabled")
|
||||||
|
{
|
||||||
|
return "transparent"
|
||||||
|
}
|
||||||
|
return UM.Theme.getColor("viewport_background")
|
||||||
|
}
|
||||||
anchors.top: topSpacer.bottom
|
anchors.top: topSpacer.bottom
|
||||||
anchors.topMargin: 2 * UM.Theme.getSize("default_margin").height
|
anchors.topMargin: 2 * UM.Theme.getSize("default_margin").height
|
||||||
text: modelData.type
|
text: modelData.type
|
||||||
|
@ -722,7 +747,7 @@ Component
|
||||||
]
|
]
|
||||||
if(inactiveStates.indexOf(state) > -1 && remainingTime > 0)
|
if(inactiveStates.indexOf(state) > -1 && remainingTime > 0)
|
||||||
{
|
{
|
||||||
return UM.Theme.getColor("monitor_secondary_text")
|
return UM.Theme.getColor("monitor_background_inactive")
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -749,7 +774,25 @@ Component
|
||||||
anchors.leftMargin: getTextOffset()
|
anchors.leftMargin: getTextOffset()
|
||||||
text: progressText
|
text: progressText
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
color: progressItem.width + progressLabel.width < control.width ? "black" : "white"
|
// color: progressItem.width + progressLabel.width < control.width ? "black" : "white"
|
||||||
|
color:
|
||||||
|
{
|
||||||
|
var state = modelData.activePrintJob.state
|
||||||
|
var inactiveStates = [
|
||||||
|
"pausing",
|
||||||
|
"paused",
|
||||||
|
"resuming",
|
||||||
|
"wait_cleanup"
|
||||||
|
]
|
||||||
|
if(inactiveStates.indexOf(state) > -1 && remainingTime > 0)
|
||||||
|
{
|
||||||
|
return "black"
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return progressItem.width + progressLabel.width < control.width ? "black" : "white"
|
||||||
|
}
|
||||||
|
}
|
||||||
width: contentWidth
|
width: contentWidth
|
||||||
font: UM.Theme.getFont("default")
|
font: UM.Theme.getFont("default")
|
||||||
}
|
}
|
||||||
|
|
|
@ -323,7 +323,10 @@
|
||||||
"favorites_header_text_hover": [31, 36, 39, 255],
|
"favorites_header_text_hover": [31, 36, 39, 255],
|
||||||
"favorites_row_selected": [196, 239, 255, 255],
|
"favorites_row_selected": [196, 239, 255, 255],
|
||||||
|
|
||||||
"monitor_secondary_text": [153, 153, 153, 255]
|
"monitor_text_inactive": [154, 154, 154, 255],
|
||||||
|
"monitor_background_inactive": [240, 240, 240, 255],
|
||||||
|
"monitor_background_active": [255, 255, 255, 255],
|
||||||
|
"monitor_lining_inactive": [230, 230, 230, 255]
|
||||||
},
|
},
|
||||||
|
|
||||||
"sizes": {
|
"sizes": {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue