Adjust color-scheme for button restyle.

Also changed ligh theme.

part of CURA-8012
This commit is contained in:
Remco Burema 2021-07-02 09:39:33 +02:00
parent e5d77a46d6
commit e3dc5bc460
No known key found for this signature in database
GPG key ID: 215C49431D43F98C
5 changed files with 23 additions and 30 deletions

View file

@ -24,10 +24,10 @@ Button
property color disabledColor: color
property color textColor: UM.Theme.getColor("button_text")
property color textHoverColor: textColor
property color textDisabledColor: textColor
property color textDisabledColor: disabledColor
property color outlineColor: color
property color outlineHoverColor: hoverColor
property color outlineDisabledColor: outlineColor
property color outlineHoverColor: outlineColor
property color outlineDisabledColor: disabledColor
property alias busy: busyIndicator.visible
property bool underlineTextOnHover: false

View file

@ -42,7 +42,7 @@ Item
}
}
Cura.ActionButton
Cura.PrimaryButton
{
id: deviceSelectionMenu
height: parent.height
@ -56,7 +56,7 @@ Item
leftPadding: UM.Theme.getSize("narrow_margin").width //Need more space than usual here for wide text.
rightPadding: UM.Theme.getSize("narrow_margin").width
iconSource: popup.opened ? UM.Theme.getIcon("ChevronSingleUp") : UM.Theme.getIcon("ChevronSingleDown")
color: UM.Theme.getColor("action_panel_secondary")
color: popup.opened ? hoverColor : UM.Theme.getColor("action_panel_secondary")
visible: (devicesModel.deviceCount > 1)
onClicked: popup.opened ? popup.close() : popup.open()
@ -65,6 +65,7 @@ Item
{
id: popup
padding: 0
spacing: 0
y: -height
x: parent.width - width
@ -73,17 +74,16 @@ Item
contentItem: ColumnLayout
{
spacing: 0
Repeater
{
model: devicesModel
delegate: Cura.ActionButton
delegate: Cura.PrimaryButton
{
text: model.description
visible: model.id != UM.OutputDeviceManager.activeDevice // Don't show the active device in the list
color: "transparent"
cornerRadius: 0
hoverColor: UM.Theme.getColor("primary")
Layout.fillWidth: true
// The total width of the popup should be defined by the largest button. By stating that each
// button should be minimally the size of it's content (aka; implicitWidth) we can ensure that.
@ -97,13 +97,6 @@ Item
}
}
}
background: Rectangle
{
opacity: visible ? 1 : 0
Behavior on opacity { NumberAnimation { duration: 100 } }
color: UM.Theme.getColor("action_panel_secondary")
}
}
}

View file

@ -11,7 +11,7 @@ Cura.ActionButton
{
color: UM.Theme.getColor("secondary_button")
textColor: UM.Theme.getColor("secondary_button_text")
outlineColor: "transparent"
outlineColor: UM.Theme.getColor("secondary_button_text")
disabledColor: UM.Theme.getColor("action_button_disabled")
textDisabledColor: UM.Theme.getColor("action_button_disabled_text")
hoverColor: UM.Theme.getColor("secondary_button_hover")

View file

@ -9,11 +9,11 @@ import Cura 1.1 as Cura
Cura.ActionButton
{
color: "transparent"
textColor: UM.Theme.getColor("text_link")
color: UM.Theme.getColor("secondary_button")
textColor: UM.Theme.getColor("secondary_button_text")
outlineColor: "transparent"
outlineDisabledColor: "transparent"
disabledColor: UM.Theme.getColor("action_button_disabled")
textDisabledColor: UM.Theme.getColor("action_button_disabled_text")
hoverColor: "transparent"
underlineTextOnHover: true
}
hoverColor: UM.Theme.getColor("secondary_button_hover")
}