mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-30 15:45:09 +08:00
Make topbar transparent and update text style
CURA-4213
This commit is contained in:
parent
3f6f4a1291
commit
4b08a5611a
@ -16,7 +16,7 @@ Rectangle
|
|||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
height: UM.Theme.getSize("sidebar_header").height
|
height: UM.Theme.getSize("sidebar_header").height
|
||||||
color: UM.Theme.getColor("sidebar_header_bar")
|
color: "transparent"
|
||||||
|
|
||||||
property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0
|
property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0
|
||||||
property bool printerAcceptsCommands: printerConnected && Cura.MachineManager.printerOutputDevices[0].acceptsCommands
|
property bool printerAcceptsCommands: printerConnected && Cura.MachineManager.printerOutputDevices[0].acceptsCommands
|
||||||
|
@ -102,15 +102,7 @@ QtObject {
|
|||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
property bool down: control.pressed || (control.checkable && control.checked);
|
property bool down: control.pressed || (control.checkable && control.checked);
|
||||||
|
|
||||||
color: {
|
color: "transparent"
|
||||||
if(control.pressed || (control.checkable && control.checked)) {
|
|
||||||
return Theme.getColor("sidebar_header_active");
|
|
||||||
} else if(control.hovered) {
|
|
||||||
return Theme.getColor("sidebar_header_hover");
|
|
||||||
} else {
|
|
||||||
return Theme.getColor("sidebar_header_bar");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Behavior on color { ColorAnimation { duration: 50; } }
|
Behavior on color { ColorAnimation { duration: 50; } }
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
@ -165,20 +157,20 @@ QtObject {
|
|||||||
anchors.left: icon.right
|
anchors.left: icon.right
|
||||||
anchors.leftMargin: icon.visible ? Theme.getSize("default_margin").width : 0
|
anchors.leftMargin: icon.visible ? Theme.getSize("default_margin").width : 0
|
||||||
anchors.verticalCenter: parent.verticalCenter;
|
anchors.verticalCenter: parent.verticalCenter;
|
||||||
font: UM.Theme.getFont("large");
|
font: control.checked ? UM.Theme.getFont("large") : UM.Theme.getFont("large_nonbold")
|
||||||
color:
|
color:
|
||||||
{
|
{
|
||||||
if(control.hovered)
|
if(control.hovered)
|
||||||
{
|
{
|
||||||
return UM.Theme.getColor("sidebar_header_text_hover");
|
return UM.Theme.getColor("topbar_button_text_hovered");
|
||||||
}
|
}
|
||||||
if(control.checked)
|
if(control.checked)
|
||||||
{
|
{
|
||||||
return UM.Theme.getColor("sidebar_header_text_active");
|
return UM.Theme.getColor("topbar_button_text_active");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return UM.Theme.getColor("sidebar_header_text_inactive");
|
return UM.Theme.getColor("topbar_button_text_inactive");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
"bold": true,
|
"bold": true,
|
||||||
"family": "Open Sans"
|
"family": "Open Sans"
|
||||||
},
|
},
|
||||||
|
"large_nonbold": {
|
||||||
|
"size": 1.25,
|
||||||
|
"family": "Open Sans"
|
||||||
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"size": 1.15,
|
"size": 1.15,
|
||||||
"family": "Open Sans"
|
"family": "Open Sans"
|
||||||
@ -59,6 +63,10 @@
|
|||||||
"border": [127, 127, 127, 255],
|
"border": [127, 127, 127, 255],
|
||||||
"secondary": [245, 245, 245, 255],
|
"secondary": [245, 245, 245, 255],
|
||||||
|
|
||||||
|
"topbar_button_text_active": [0, 0, 0, 255],
|
||||||
|
"topbar_button_text_inactive": [128, 128, 128, 255],
|
||||||
|
"topbar_button_text_hovered": [0, 0, 0, 255],
|
||||||
|
|
||||||
"text": [24, 41, 77, 255],
|
"text": [24, 41, 77, 255],
|
||||||
"text_detail": [174, 174, 174, 128],
|
"text_detail": [174, 174, 174, 128],
|
||||||
"text_link": [12, 169, 227, 255],
|
"text_link": [12, 169, 227, 255],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user