mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 22:05:56 +08:00
Simplify the main_window_header_tab style
This commit is contained in:
parent
5105b67a8c
commit
dc66bdacc6
@ -103,33 +103,29 @@ QtObject
|
|||||||
// This property will be back-propagated when the width of the label is calculated
|
// This property will be back-propagated when the width of the label is calculated
|
||||||
property var buttonWidth: 0
|
property var buttonWidth: 0
|
||||||
|
|
||||||
background: Item
|
background: Rectangle
|
||||||
{
|
{
|
||||||
|
id: backgroundRectangle
|
||||||
implicitHeight: control.height
|
implicitHeight: control.height
|
||||||
implicitWidth: buttonWidth
|
implicitWidth: buttonWidth
|
||||||
Rectangle
|
radius: UM.Theme.getSize("action_button_radius").width
|
||||||
{
|
|
||||||
id: buttonFace
|
|
||||||
implicitHeight: parent.height
|
|
||||||
implicitWidth: parent.width
|
|
||||||
radius: UM.Theme.getSize("action_button_radius").width
|
|
||||||
|
|
||||||
color:
|
color:
|
||||||
|
{
|
||||||
|
if (control.checked)
|
||||||
{
|
{
|
||||||
if (control.checked)
|
return UM.Theme.getColor("main_window_header_button_background_active")
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (control.hovered)
|
||||||
{
|
{
|
||||||
return UM.Theme.getColor("main_window_header_button_background_active")
|
return UM.Theme.getColor("main_window_header_button_background_hovered")
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (control.hovered)
|
|
||||||
{
|
|
||||||
return UM.Theme.getColor("main_window_header_button_background_hovered")
|
|
||||||
}
|
|
||||||
return UM.Theme.getColor("main_window_header_button_background_inactive")
|
|
||||||
}
|
}
|
||||||
|
return UM.Theme.getColor("main_window_header_button_background_inactive")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
label: Item
|
label: Item
|
||||||
@ -168,6 +164,8 @@ QtObject
|
|||||||
buttonWidth = width
|
buttonWidth = width
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user