From e5d77a46d6aa3509449085b52905846ad199d49d Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 30 Jun 2021 17:04:55 +0200 Subject: [PATCH 01/10] Remove 'roundedness' and 'shadow' from action-buttons. Per the new UI design. Keep them as deprecated properties, so we may not need a major API/SDK increase just yet. contributes to CURA-8012 --- resources/qml/ActionButton.qml | 67 +++++++++++++------ .../ActionPanel/OutputDevicesActionButton.qml | 7 +- resources/qml/PrimaryButton.qml | 4 +- resources/qml/SecondaryButton.qml | 4 +- resources/qml/TertiaryButton.qml | 4 +- 5 files changed, 50 insertions(+), 36 deletions(-) diff --git a/resources/qml/ActionButton.qml b/resources/qml/ActionButton.qml index 0c1be007b5..c5c0c0be08 100644 --- a/resources/qml/ActionButton.qml +++ b/resources/qml/ActionButton.qml @@ -1,4 +1,4 @@ -// Copyright (c) 2020 Ultimaker B.V. +// Copyright (c) 2021 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 @@ -18,7 +18,6 @@ Button property alias textFont: buttonText.font property alias cornerRadius: backgroundRect.radius property alias tooltip: tooltip.tooltipText - property alias cornerSide: backgroundRect.cornerSide property color color: UM.Theme.getColor("primary") property color hoverColor: UM.Theme.getColor("primary_hover") @@ -29,8 +28,6 @@ Button property color outlineColor: color property color outlineHoverColor: hoverColor property color outlineDisabledColor: outlineColor - property alias shadowColor: shadow.color - property alias shadowEnabled: shadow.visible property alias busy: busyIndicator.visible property bool underlineTextOnHover: false @@ -46,6 +43,49 @@ Button // but it can exceed a maximum, then this value have to be set. property int maximumWidth: 0 + // These properties are deprecated. + // To (maybe) prevent a major SDK upgrade, mark them as deprecated instead of just outright removing them. + // Note, if you still want rounded corners, use (something based on) Cura.RoundedRectangle. + property alias cornerSide: deprecatedProperties.cornerSide + property alias shadowColor: deprecatedProperties.shadowColor + property alias shadowEnabled: deprecatedProperties.shadowEnabled + + Item + { + id: deprecatedProperties + + visible: false + enabled: false + width: 0 + height: 0 + + property var cornerSide: null + property var shadowColor: null + property var shadowEnabled: null + + onCornerSideChanged: + { + if (cornerSide != null) + { + CuraApplication.writeToLog("w", "'ActionButton.cornerSide' is deprecated since 4.11. Rounded corners can still be made with 'Cura.RoundedRectangle'."); + } + } + onShadowColorChanged: + { + if (shadowColor != null) + { + CuraApplication.writeToLog("w", "'ActionButton.shadowColor' is deprecated since 4.11.") + } + } + onShadowEnabledChanged: + { + if (shadowEnabled != null) + { + CuraApplication.writeToLog("w", "'ActionButton.shadowEnabled' is deprecated since 4.11.") + } + } + } + leftPadding: UM.Theme.getSize("default_margin").width rightPadding: UM.Theme.getSize("default_margin").width height: UM.Theme.getSize("action_button").height @@ -127,29 +167,14 @@ Button } } - background: Cura.RoundedRectangle + background: Rectangle { id: backgroundRect - cornerSide: Cura.RoundedRectangle.Direction.All 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 } - DropShadow - { - id: shadow - // Don't blur the shadow - radius: 0 - anchors.fill: backgroundRect - source: backgroundRect - verticalOffset: 2 - visible: false - // Should always be drawn behind the background. - z: backgroundRect.z - 1 - } - Cura.ToolTip { id: tooltip @@ -189,4 +214,4 @@ Button duration: 2500 } } -} \ No newline at end of file +} diff --git a/resources/qml/ActionPanel/OutputDevicesActionButton.qml b/resources/qml/ActionPanel/OutputDevicesActionButton.qml index 6d1a1d83dd..0a49c59c77 100644 --- a/resources/qml/ActionPanel/OutputDevicesActionButton.qml +++ b/resources/qml/ActionPanel/OutputDevicesActionButton.qml @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Ultimaker B.V. +// Copyright (c) 2021 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 @@ -23,7 +23,6 @@ Item id: saveToButton height: parent.height fixedWidthMode: true - cornerSide: deviceSelectionMenu.visible ? Cura.RoundedRectangle.Direction.Left : Cura.RoundedRectangle.Direction.All anchors { @@ -48,10 +47,6 @@ Item id: deviceSelectionMenu height: parent.height - shadowEnabled: true - shadowColor: UM.Theme.getColor("primary_shadow") - cornerSide: Cura.RoundedRectangle.Direction.Right - anchors { top: parent.top diff --git a/resources/qml/PrimaryButton.qml b/resources/qml/PrimaryButton.qml index fca63d2cdb..52c460bde4 100644 --- a/resources/qml/PrimaryButton.qml +++ b/resources/qml/PrimaryButton.qml @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Ultimaker B.V. +// Copyright (c) 2021 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 @@ -9,8 +9,6 @@ import Cura 1.1 as Cura Cura.ActionButton { - shadowEnabled: true - shadowColor: enabled ? UM.Theme.getColor("primary_button_shadow"): UM.Theme.getColor("action_button_disabled_shadow") color: UM.Theme.getColor("primary_button") textColor: UM.Theme.getColor("primary_button_text") outlineColor: "transparent" diff --git a/resources/qml/SecondaryButton.qml b/resources/qml/SecondaryButton.qml index f03d8acdfa..09c4efa025 100644 --- a/resources/qml/SecondaryButton.qml +++ b/resources/qml/SecondaryButton.qml @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Ultimaker B.V. +// Copyright (c) 2021 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 @@ -9,8 +9,6 @@ import Cura 1.1 as Cura Cura.ActionButton { - shadowEnabled: true - shadowColor: enabled ? UM.Theme.getColor("secondary_button_shadow"): UM.Theme.getColor("action_button_disabled_shadow") color: UM.Theme.getColor("secondary_button") textColor: UM.Theme.getColor("secondary_button_text") outlineColor: "transparent" diff --git a/resources/qml/TertiaryButton.qml b/resources/qml/TertiaryButton.qml index eb714c22f6..76684b6ef2 100644 --- a/resources/qml/TertiaryButton.qml +++ b/resources/qml/TertiaryButton.qml @@ -1,4 +1,4 @@ -// Copyright (c) 2020 Ultimaker B.V. +// Copyright (c) 2021 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 @@ -9,8 +9,6 @@ import Cura 1.1 as Cura Cura.ActionButton { - shadowEnabled: true - shadowColor: enabled ? UM.Theme.getColor("secondary_button_shadow"): UM.Theme.getColor("action_button_disabled_shadow") color: "transparent" textColor: UM.Theme.getColor("text_link") outlineColor: "transparent" From e3dc5bc460d7e6deb570c1a7a98c33e54c602671 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Fri, 2 Jul 2021 09:39:33 +0200 Subject: [PATCH 02/10] Adjust color-scheme for button restyle. Also changed ligh theme. part of CURA-8012 --- resources/qml/ActionButton.qml | 6 +++--- .../ActionPanel/OutputDevicesActionButton.qml | 19 ++++++------------- resources/qml/SecondaryButton.qml | 2 +- resources/qml/TertiaryButton.qml | 10 +++++----- resources/themes/cura-light/theme.json | 16 ++++++++-------- 5 files changed, 23 insertions(+), 30 deletions(-) diff --git a/resources/qml/ActionButton.qml b/resources/qml/ActionButton.qml index c5c0c0be08..1593ee931c 100644 --- a/resources/qml/ActionButton.qml +++ b/resources/qml/ActionButton.qml @@ -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 diff --git a/resources/qml/ActionPanel/OutputDevicesActionButton.qml b/resources/qml/ActionPanel/OutputDevicesActionButton.qml index 0a49c59c77..48416e69fd 100644 --- a/resources/qml/ActionPanel/OutputDevicesActionButton.qml +++ b/resources/qml/ActionPanel/OutputDevicesActionButton.qml @@ -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") - } } } diff --git a/resources/qml/SecondaryButton.qml b/resources/qml/SecondaryButton.qml index 09c4efa025..ba4e0bb2c1 100644 --- a/resources/qml/SecondaryButton.qml +++ b/resources/qml/SecondaryButton.qml @@ -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") diff --git a/resources/qml/TertiaryButton.qml b/resources/qml/TertiaryButton.qml index 76684b6ef2..8f78ea1a3b 100644 --- a/resources/qml/TertiaryButton.qml +++ b/resources/qml/TertiaryButton.qml @@ -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") +} \ No newline at end of file diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 5245d21455..e63867fa79 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -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], From 952e02676fa53603b2ef0d13ec5193e2ee6de4a2 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Fri, 2 Jul 2021 13:24:02 +0200 Subject: [PATCH 03/10] Tweaks for restyling benefitting the dark theme. part of CURA-8012 --- resources/qml/TertiaryButton.qml | 6 +++--- resources/themes/cura-dark/theme.json | 10 +++++++--- resources/themes/cura-light/theme.json | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/resources/qml/TertiaryButton.qml b/resources/qml/TertiaryButton.qml index 8f78ea1a3b..035b0d1da7 100644 --- a/resources/qml/TertiaryButton.qml +++ b/resources/qml/TertiaryButton.qml @@ -9,11 +9,11 @@ import Cura 1.1 as Cura Cura.ActionButton { - color: UM.Theme.getColor("secondary_button") - textColor: UM.Theme.getColor("secondary_button_text") + color: "transparent" + textColor: UM.Theme.getColor("text_link") outlineColor: "transparent" outlineDisabledColor: "transparent" - disabledColor: UM.Theme.getColor("action_button_disabled") + disabledColor: "transparent" textDisabledColor: UM.Theme.getColor("action_button_disabled_text") hoverColor: UM.Theme.getColor("secondary_button_hover") } \ No newline at end of file diff --git a/resources/themes/cura-dark/theme.json b/resources/themes/cura-dark/theme.json index e3266b923b..f15c1abf2c 100644 --- a/resources/themes/cura-dark/theme.json +++ b/resources/themes/cura-dark/theme.json @@ -16,6 +16,10 @@ "primary_text": [255, 255, 255, 204], "secondary": [95, 95, 95, 255], + "secondary_button": [0, 0, 0, 0], + "secondary_button_hover": [85, 85, 87, 255], + "secondary_button_text": [255, 255, 255, 255], + "icon": [204, 204, 204, 255], "toolbar_background": [39, 44, 48, 255], "toolbar_button_active": [95, 95, 95, 255], @@ -32,7 +36,7 @@ "text": [255, 255, 255, 204], "text_detail": [255, 255, 255, 172], - "text_link": [255, 255, 255, 127], + "text_link": [25, 110, 240, 255], "text_inactive": [255, 255, 255, 88], "text_hover": [255, 255, 255, 204], "text_pressed": [255, 255, 255, 204], @@ -87,8 +91,8 @@ "action_button_active": [39, 44, 48, 30], "action_button_active_text": [255, 255, 255, 255], "action_button_active_border": [255, 255, 255, 100], - "action_button_disabled": [19, 24, 28, 255], - "action_button_disabled_text": [200, 200, 200, 80], + "action_button_disabled": [85, 85, 87, 255], + "action_button_disabled_text": [103, 103, 104, 255], "action_button_disabled_border": [255, 255, 255, 30], "scrollbar_background": [39, 44, 48, 0], diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index e63867fa79..98062746ae 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -210,7 +210,7 @@ "text": [25, 25, 25, 255], "text_detail": [174, 174, 174, 128], - "text_link": [50, 130, 255, 255], + "text_link": [25, 110, 240, 255], "text_inactive": [174, 174, 174, 255], "text_pressed": [50, 130, 255, 255], "text_subtext": [0, 0, 0, 255], From 1c73077f7ec4e5f644a2374d453f69da6eeb7021 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Fri, 2 Jul 2021 13:54:34 +0200 Subject: [PATCH 04/10] More dark theme tweaks. part of CURA-8012 --- resources/themes/cura-dark/theme.json | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/resources/themes/cura-dark/theme.json b/resources/themes/cura-dark/theme.json index f15c1abf2c..8d68bb0d5b 100644 --- a/resources/themes/cura-dark/theme.json +++ b/resources/themes/cura-dark/theme.json @@ -5,7 +5,7 @@ }, "colors": { - "main_background": [39, 44, 48, 255], + "main_background": [31, 31, 32, 255], "message_background": [39, 44, 48, 255], "wide_lining": [31, 36, 39, 255], "thick_lining": [255, 255, 255, 60], @@ -20,13 +20,16 @@ "secondary_button_hover": [85, 85, 87, 255], "secondary_button_text": [255, 255, 255, 255], - "icon": [204, 204, 204, 255], + "icon": [255, 255, 255, 255], "toolbar_background": [39, 44, 48, 255], - "toolbar_button_active": [95, 95, 95, 255], - "toolbar_button_hover": [95, 95, 95, 255], - "toolbar_button_active_hover": [95, 95, 95, 255], + "toolbar_button_active": [57, 57, 58, 255], + "toolbar_button_hover": [57, 57, 58, 255], + "toolbar_button_active_hover": [57, 57, 58, 255], "main_window_header_button_text_inactive": [128, 128, 128, 255], + "main_window_header_background": [14, 14, 14, 255], + "main_window_header_background_gradient": [32, 32, 32, 255], + "main_window_header_button_background_hovered": [46, 46, 46, 255], "account_sync_state_icon": [255, 255, 255, 204], From e4710dd921245d031074a53e10f11c98d7844e02 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 6 Jul 2021 09:06:47 +0200 Subject: [PATCH 05/10] ActionButton is a RoundedRectangle once more. We want to deprecate the API, not break it (yet). part of CURA-8012 --- resources/qml/ActionButton.qml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/qml/ActionButton.qml b/resources/qml/ActionButton.qml index 1593ee931c..31d5c35d2c 100644 --- a/resources/qml/ActionButton.qml +++ b/resources/qml/ActionButton.qml @@ -167,12 +167,16 @@ Button } } - background: Rectangle + background: Cura.RoundedRectangle { id: backgroundRect color: button.enabled ? (button.hovered ? button.hoverColor : button.color) : button.disabledColor border.width: UM.Theme.getSize("default_lining").width border.color: button.enabled ? (button.hovered ? button.outlineHoverColor : button.outlineColor) : button.outlineDisabledColor + + // Disable the rounded-ness of this rectangle. We can't use a normal Rectangle here yet, as the API/SDK has only just been deprecated. + radius: 0 + cornerSide: Cura.RoundedRectangle.Direction.None } Cura.ToolTip From a42fee48340f72842e0a340fc090321eff71ed23 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 6 Jul 2021 09:25:10 +0200 Subject: [PATCH 06/10] Put the dark-theme bg back the way it was. Not really part of this ticket. Also no buttons are directly on the background anyway. part of CURA-8012 --- resources/themes/cura-dark/theme.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/themes/cura-dark/theme.json b/resources/themes/cura-dark/theme.json index 8d68bb0d5b..0d6fa2f260 100644 --- a/resources/themes/cura-dark/theme.json +++ b/resources/themes/cura-dark/theme.json @@ -5,7 +5,7 @@ }, "colors": { - "main_background": [31, 31, 32, 255], + "main_background": [39, 44, 48, 255], "message_background": [39, 44, 48, 255], "wide_lining": [31, 36, 39, 255], "thick_lining": [255, 255, 255, 60], From acf3f2d02a1a0cf393cf6e10d381a4a28dd1376e Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 6 Jul 2021 09:37:48 +0200 Subject: [PATCH 07/10] Let Tertiary button have its own hover entry. Secondary button entries should not be re-used here. part of CURA-8012 --- resources/qml/TertiaryButton.qml | 2 +- resources/themes/cura-dark/theme.json | 2 ++ resources/themes/cura-light/theme.json | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/qml/TertiaryButton.qml b/resources/qml/TertiaryButton.qml index 035b0d1da7..4a352420df 100644 --- a/resources/qml/TertiaryButton.qml +++ b/resources/qml/TertiaryButton.qml @@ -15,5 +15,5 @@ Cura.ActionButton outlineDisabledColor: "transparent" disabledColor: "transparent" textDisabledColor: UM.Theme.getColor("action_button_disabled_text") - hoverColor: UM.Theme.getColor("secondary_button_hover") + hoverColor: UM.Theme.getColor("tertiary_button_hover") } \ No newline at end of file diff --git a/resources/themes/cura-dark/theme.json b/resources/themes/cura-dark/theme.json index 0d6fa2f260..de10488162 100644 --- a/resources/themes/cura-dark/theme.json +++ b/resources/themes/cura-dark/theme.json @@ -20,6 +20,8 @@ "secondary_button_hover": [85, 85, 87, 255], "secondary_button_text": [255, 255, 255, 255], + "tertiary_button_hover": [85, 85, 87, 255], + "icon": [255, 255, 255, 255], "toolbar_background": [39, 44, 48, 255], "toolbar_button_active": [57, 57, 58, 255], diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 98062746ae..03e5678945 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -178,6 +178,8 @@ "secondary_button_hover": [232, 240, 253, 255], "secondary_button_text": [25, 110, 240, 255], + "tertiary_button_hover": [232, 240, 253, 255], + "main_window_header_background": [8, 7, 63, 255], "main_window_header_background_gradient": [25, 23, 91, 255], "main_window_header_button_text_active": [8, 7, 63, 255], From 38bec36f6bc58715e06ff769446dfc935d5cbd22 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Tue, 6 Jul 2021 13:45:24 +0200 Subject: [PATCH 08/10] Revert Tertiary button to its previous style The styling of the Tertiary button (to not look like a link anymore) and the introduction of the Quatertiary button (as the link button) will happen in a separate ticket in the future. CURA-8012 --- resources/qml/TertiaryButton.qml | 8 ++++---- resources/themes/cura-dark/theme.json | 2 -- resources/themes/cura-light/theme.json | 2 -- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/resources/qml/TertiaryButton.qml b/resources/qml/TertiaryButton.qml index 4a352420df..76684b6ef2 100644 --- a/resources/qml/TertiaryButton.qml +++ b/resources/qml/TertiaryButton.qml @@ -12,8 +12,8 @@ Cura.ActionButton color: "transparent" textColor: UM.Theme.getColor("text_link") outlineColor: "transparent" - outlineDisabledColor: "transparent" - disabledColor: "transparent" + disabledColor: UM.Theme.getColor("action_button_disabled") textDisabledColor: UM.Theme.getColor("action_button_disabled_text") - hoverColor: UM.Theme.getColor("tertiary_button_hover") -} \ No newline at end of file + hoverColor: "transparent" + underlineTextOnHover: true +} diff --git a/resources/themes/cura-dark/theme.json b/resources/themes/cura-dark/theme.json index de10488162..0d6fa2f260 100644 --- a/resources/themes/cura-dark/theme.json +++ b/resources/themes/cura-dark/theme.json @@ -20,8 +20,6 @@ "secondary_button_hover": [85, 85, 87, 255], "secondary_button_text": [255, 255, 255, 255], - "tertiary_button_hover": [85, 85, 87, 255], - "icon": [255, 255, 255, 255], "toolbar_background": [39, 44, 48, 255], "toolbar_button_active": [57, 57, 58, 255], diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 03e5678945..98062746ae 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -178,8 +178,6 @@ "secondary_button_hover": [232, 240, 253, 255], "secondary_button_text": [25, 110, 240, 255], - "tertiary_button_hover": [232, 240, 253, 255], - "main_window_header_background": [8, 7, 63, 255], "main_window_header_background_gradient": [25, 23, 91, 255], "main_window_header_button_text_active": [8, 7, 63, 255], From d4c254dcab3ebf9ff2fce29ea6ff29efa873cc3d Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Tue, 6 Jul 2021 13:59:05 +0200 Subject: [PATCH 09/10] Make the Link button in the Messages similar to the Cura Tertiary button CURA-8012 --- resources/qml/Cura.qml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index db910d1798..191ae712d4 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -429,6 +429,14 @@ UM.MainWindow height: UM.Theme.getSize("message_action_button").height } } + link: Component + { + Cura.TertiaryButton + { + text: model.name + height: UM.Theme.getSize("message_action_button").height + } + } } } From d2c0a1f32e91c7f287a93d90cb9e39e680c9635c Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Tue, 6 Jul 2021 14:13:19 +0200 Subject: [PATCH 10/10] Change height of message buttons to be the same with all other action buttons CURA-8012 --- resources/themes/cura-light/theme.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 98062746ae..0e40778f02 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -589,7 +589,7 @@ "message": [30.0, 5.0], "message_close": [1, 1], "message_radius": [0.25, 0.25], - "message_action_button": [0, 2.0], + "message_action_button": [0, 2.5], "message_image": [15.0, 5.0], "infill_button_margin": [0.5, 0.5],