mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 14:34:01 -06:00
Modify the styles to match the requirements.
Contributes to CURA-5784.
This commit is contained in:
parent
dbb62f2490
commit
bf1c23243e
6 changed files with 61 additions and 43 deletions
|
@ -20,6 +20,9 @@ Button
|
|||
property var textColor: UM.Theme.getColor("button_text")
|
||||
property var textHoverColor: UM.Theme.getColor("button_text_hover")
|
||||
property var textDisabledColor: textColor
|
||||
property var outlineColor: color
|
||||
property var outlineHoverColor: hoverColor
|
||||
property var outlineDisabledColor: outlineColor
|
||||
|
||||
contentItem: Row
|
||||
{
|
||||
|
@ -34,6 +37,7 @@ Button
|
|||
color: button.hovered ? button.textHoverColor : button.textColor
|
||||
visible: source != ""
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
Behavior on color { ColorAnimation { duration: 50 } }
|
||||
}
|
||||
|
||||
Label
|
||||
|
@ -53,6 +57,9 @@ Button
|
|||
id: backgroundRect
|
||||
color: button.enabled ? (button.hovered ? button.hoverColor : button.color) : button.disabledColor
|
||||
radius: UM.Theme.getSize("action_button_radius").width
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
border.color: button.enabled ? (button.hovered ? button.outlineHoverColor : button.outlineColor) : button.outlineDisabledColor
|
||||
Behavior on color { ColorAnimation { duration: 50 } }
|
||||
}
|
||||
|
||||
MouseArea
|
||||
|
|
|
@ -36,10 +36,12 @@ Rectangle
|
|||
Row
|
||||
{
|
||||
id: stagesListContainer
|
||||
spacing: Math.round(UM.Theme.getSize("default_margin").width / 2)
|
||||
|
||||
anchors
|
||||
{
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
verticalCenter: parent.verticalCenter
|
||||
leftMargin: UM.Theme.getSize("default_margin").width
|
||||
}
|
||||
|
||||
|
@ -55,9 +57,10 @@ Rectangle
|
|||
text: model.name.toUpperCase()
|
||||
checkable: true
|
||||
checked: model.active
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
exclusiveGroup: mainWindowHeaderMenuGroup
|
||||
style: UM.Theme.styles.main_window_header_tab
|
||||
height: UM.Theme.getSize("main_window_header").height
|
||||
height: Math.round(0.56 * UM.Theme.getSize("main_window_header").height)
|
||||
onClicked: UM.Controller.setActiveStage(model.id)
|
||||
iconSource: model.stage.iconSource
|
||||
|
||||
|
@ -78,11 +81,16 @@ Rectangle
|
|||
rightMargin: UM.Theme.getSize("default_margin").width
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
leftPadding: UM.Theme.getSize("default_margin").width
|
||||
rightPadding: UM.Theme.getSize("default_margin").width
|
||||
text: catalog.i18nc("@action:button", "Toolbox")
|
||||
color: UM.Theme.getColor("main_window_header_button_background_active")
|
||||
hoverColor: UM.Theme.getColor("secondary")
|
||||
textColor: UM.Theme.getColor("main_window_header_button_text_active")
|
||||
textHoverColor: UM.Theme.getColor("main_window_header_button_text_active")
|
||||
height: Math.round(0.5 * UM.Theme.getSize("main_window_header").height)
|
||||
color: UM.Theme.getColor("main_window_header_secondary_button_background_active")
|
||||
hoverColor: UM.Theme.getColor("main_window_header_secondary_button_background_hovered")
|
||||
outlineColor: UM.Theme.getColor("main_window_header_secondary_button_outline_active")
|
||||
outlineHoverColor: UM.Theme.getColor("main_window_header_secondary_button_outline_hovered")
|
||||
textColor: UM.Theme.getColor("main_window_header_secondary_button_text_active")
|
||||
textHoverColor: UM.Theme.getColor("main_window_header_secondary_button_text_hovered")
|
||||
onClicked: Cura.Actions.browsePackages.trigger()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue