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")
}

View file

@ -168,15 +168,15 @@
"icon": [8, 7, 63, 255],
"primary_button": [38, 113, 231, 255],
"primary_button": [25, 110, 240, 255],
"primary_button_shadow": [27, 95, 202, 255],
"primary_button_hover": [81, 145, 247, 255],
"primary_button_hover": [16, 70, 156, 255],
"primary_button_text": [255, 255, 255, 255],
"secondary_button": [240, 240, 240, 255],
"secondary_button": [255, 255, 255, 0],
"secondary_button_shadow": [216, 216, 216, 255],
"secondary_button_hover": [228, 228, 228, 255],
"secondary_button_text": [30, 102, 215, 255],
"secondary_button_hover": [232, 240, 253, 255],
"secondary_button_text": [25, 110, 240, 255],
"main_window_header_background": [8, 7, 63, 255],
"main_window_header_background_gradient": [25, 23, 91, 255],
@ -196,7 +196,7 @@
"machine_selector_text_active": [255, 255, 255, 255],
"machine_selector_printer_icon": [8, 7, 63, 255],
"action_panel_secondary": [27, 95, 202, 255],
"action_panel_secondary": [25, 110, 240, 255],
"first_run_shadow": [50, 50, 50, 255],
@ -266,8 +266,8 @@
"action_button_active_text": [0, 0, 0, 255],
"action_button_active_border": [50, 130, 255, 255],
"action_button_disabled": [245, 245, 245, 255],
"action_button_disabled_text": [127, 127, 127, 255],
"action_button_disabled_border": [245, 245, 245, 255],
"action_button_disabled_text": [196, 196, 196, 255],
"action_button_disabled_border": [196, 196, 196, 255],
"action_button_shadow": [223, 223, 223, 255],
"action_button_disabled_shadow": [228, 228, 228, 255],