Remove some extra unneeded theme stuff for monitor page

This commit is contained in:
Jaime van Kessel 2022-02-25 14:12:25 +01:00
parent 1589475dd4
commit 3f4f7f0fcf
4 changed files with 13 additions and 62 deletions

View file

@ -18,7 +18,7 @@ Button
{ {
anchors.fill: parent anchors.fill: parent
radius: 0.5 * width radius: 0.5 * width
color: parent.enabled ? (parent.hovered ? UM.Theme.getColor("monitor_secondary_button_hover") : "transparent") : UM.Theme.getColor("monitor_icon_disabled") color: parent.enabled ? (parent.hovered ? UM.Theme.getColor("monitor_card_hover") : "transparent") : UM.Theme.getColor("monitor_icon_disabled")
} }
UM.RecolorImage UM.RecolorImage

View file

@ -63,7 +63,7 @@ Item
leftMargin: 36 * screenScaleFactor // TODO: Theme! leftMargin: 36 * screenScaleFactor // TODO: Theme!
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
} }
spacing: 18 * screenScaleFactor // TODO: Theme! spacing: UM.Theme.getSize("default_margin").width
Rectangle Rectangle
{ {
@ -95,9 +95,9 @@ Item
{ {
id: printerNameLabel id: printerNameLabel
color: printer ? "transparent" : UM.Theme.getColor("monitor_skeleton_loading") color: printer ? "transparent" : UM.Theme.getColor("monitor_skeleton_loading")
height: 18 * screenScaleFactor // TODO: Theme! height: UM.Theme.getSize("default_margin").width
width: parent.width width: parent.width
radius: 2 * screenScaleFactor // TODO: Theme! radius: UM.Theme.getSize("default_radius").width
UM.Label UM.Label
{ {
@ -106,8 +106,6 @@ Item
font: UM.Theme.getFont("large") // 16pt, bold font: UM.Theme.getFont("large") // 16pt, bold
width: parent.width width: parent.width
visible: printer visible: printer
// FIXED-LINE-HEIGHT:
height: parent.height height: parent.height
} }
} }
@ -116,7 +114,7 @@ Item
{ {
color: UM.Theme.getColor("monitor_skeleton_loading") color: UM.Theme.getColor("monitor_skeleton_loading")
height: 18 * screenScaleFactor // TODO: Theme! height: 18 * screenScaleFactor // TODO: Theme!
radius: 2 * screenScaleFactor // TODO: Theme! radius: UM.Theme.getSize("default_radius").width
visible: !printer visible: !printer
width: 48 * screenScaleFactor // TODO: Theme! width: 48 * screenScaleFactor // TODO: Theme!
} }
@ -160,22 +158,16 @@ Item
} }
color: UM.Theme.getColor("text_link") color: UM.Theme.getColor("text_link")
source: UM.Theme.getIcon("LinkExternal") source: UM.Theme.getIcon("LinkExternal")
width: 12 * screenScaleFactor width: UM.Theme.getSize("icon").width
height: 12 * screenScaleFactor height: UM.Theme.getSize("icon").height
} }
} }
MouseArea MouseArea
{ {
anchors.fill: managePrinterLink anchors.fill: managePrinterLink
onClicked: OutputDevice.openPrinterControlPanel() onClicked: OutputDevice.openPrinterControlPanel()
onEntered: onEntered: manageQueueText.font.underline = true
{ onExited: manageQueueText.font.underline = false
manageQueueText.font.underline = true
}
onExited:
{
manageQueueText.font.underline = false
}
} }
} }
@ -327,7 +319,7 @@ Item
leftMargin: 36 * screenScaleFactor // TODO: Theme! leftMargin: 36 * screenScaleFactor // TODO: Theme!
} }
height: childrenRect.height height: childrenRect.height
spacing: 18 * screenScaleFactor // TODO: Theme! spacing: UM.Theme.getSize("default_margin").width
UM.Label UM.Label
{ {
@ -403,9 +395,6 @@ Item
font: UM.Theme.getFont("large") // 16pt, bold font: UM.Theme.getFont("large") // 16pt, bold
text: printer && printer.activePrintJob ? printer.activePrintJob.name : catalog.i18nc("@label", "Untitled") text: printer && printer.activePrintJob ? printer.activePrintJob.name : catalog.i18nc("@label", "Untitled")
width: parent.width width: parent.width
// FIXED-LINE-HEIGHT:
height: 18 * screenScaleFactor // TODO: Theme!
} }
UM.Label UM.Label
@ -421,9 +410,6 @@ Item
elide: Text.ElideRight elide: Text.ElideRight
text: printer && printer.activePrintJob ? printer.activePrintJob.owner : catalog.i18nc("@label", "Anonymous") text: printer && printer.activePrintJob ? printer.activePrintJob.owner : catalog.i18nc("@label", "Anonymous")
width: parent.width width: parent.width
// FIXED-LINE-HEIGHT:
height: 18 * screenScaleFactor // TODO: Theme!
} }
} }
@ -445,45 +431,19 @@ Item
} }
text: catalog.i18nc("@label:status", "Requires configuration changes") text: catalog.i18nc("@label:status", "Requires configuration changes")
visible: printer && printer.activePrintJob && printer.activePrintJob.configurationChanges.length > 0 && !printerStatus.visible visible: printer && printer.activePrintJob && printer.activePrintJob.configurationChanges.length > 0 && !printerStatus.visible
// FIXED-LINE-HEIGHT:
height: 18 * screenScaleFactor // TODO: Theme!
} }
} }
Button Cura.SecondaryButton
{ {
id: detailsButton id: detailsButton
anchors anchors
{ {
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
right: parent.right right: parent.right
rightMargin: 18 * screenScaleFactor // TODO: Theme! rightMargin: UM.Theme.getSize("default_margin").width
} }
background: Rectangle text: catalog.i18nc("@action:button", "Details")
{
color: UM.Theme.getColor("monitor_secondary_button_shadow")
radius: 2 * screenScaleFactor // Todo: Theme!
Rectangle
{
anchors.fill: parent
anchors.bottomMargin: 2 * screenScaleFactor // TODO: Theme!
color: detailsButton.hovered ? UM.Theme.getColor("monitor_secondary_button_hover") : UM.Theme.getColor("monitor_secondary_button")
radius: 2 * screenScaleFactor // Todo: Theme!
}
}
contentItem: UM.Label
{
anchors.fill: parent
anchors.bottomMargin: 2 * screenScaleFactor // TODO: Theme!
color: UM.Theme.getColor("monitor_secondary_button_text")
font: UM.Theme.getFont("medium") // 14pt, regular
text: catalog.i18nc("@action:button", "Details");
horizontalAlignment: Text.AlignHCenter
height: 18 * screenScaleFactor // TODO: Theme!
}
implicitHeight: 32 * screenScaleFactor // TODO: Theme!
implicitWidth: 96 * screenScaleFactor // TODO: Theme!
visible: printer && printer.activePrintJob && printer.activePrintJob.configurationChanges.length > 0 && !printerStatus.visible visible: printer && printer.activePrintJob && printer.activePrintJob.configurationChanges.length > 0 && !printerStatus.visible
onClicked: base.enabled ? overrideConfirmationDialog.open() : {} onClicked: base.enabled ? overrideConfirmationDialog.open() : {}
enabled: OutputDevice.supportsPrintJobActions enabled: OutputDevice.supportsPrintJobActions

View file

@ -149,10 +149,6 @@
"monitor_icon_disabled": [102, 102, 102, 255], "monitor_icon_disabled": [102, 102, 102, 255],
"monitor_secondary_button_hover": [80, 80, 80, 255], "monitor_secondary_button_hover": [80, 80, 80, 255],
"monitor_secondary_button": [92, 92, 92, 255],
"monitor_secondary_button_text": [250, 250, 250, 255],
"monitor_secondary_button_shadow": [74, 74, 74, 255],
"monitor_card_border": [102, 102, 102, 255], "monitor_card_border": [102, 102, 102, 255],
"monitor_card_background": [51, 53, 54, 255], "monitor_card_background": [51, 53, 54, 255],
"monitor_card_hover": [84, 89, 95, 255], "monitor_card_hover": [84, 89, 95, 255],

View file

@ -374,11 +374,6 @@
"monitor_icon_accent": [255, 255, 255, 255], "monitor_icon_accent": [255, 255, 255, 255],
"monitor_icon_disabled": [238, 238, 238, 255], "monitor_icon_disabled": [238, 238, 238, 255],
"monitor_secondary_button_hover": [232, 242, 252, 255],
"monitor_secondary_button": [240, 240, 240, 255],
"monitor_secondary_button_text": [30, 102, 215, 255],
"monitor_secondary_button_shadow": [216, 216, 216, 255],
"monitor_card_border": [192, 193, 194, 255], "monitor_card_border": [192, 193, 194, 255],
"monitor_card_background": [255, 255, 255, 255], "monitor_card_background": [255, 255, 255, 255],
"monitor_card_hover": [232, 242, 252, 255], "monitor_card_hover": [232, 242, 252, 255],