diff --git a/resources/qml/Account/AccountWidget.qml b/resources/qml/Account/AccountWidget.qml index d6d4728e7e..fc99273119 100644 --- a/resources/qml/Account/AccountWidget.qml +++ b/resources/qml/Account/AccountWidget.qml @@ -13,8 +13,8 @@ Button property var profile: Cura.API.account.userProfile property var loggedIn: Cura.API.account.isLoggedIn - implicitHeight: UM.Theme.getSize("topheader").height - implicitWidth: UM.Theme.getSize("topheader").height + implicitHeight: UM.Theme.getSize("main_window_header").height + implicitWidth: UM.Theme.getSize("main_window_header").height AvatarImage { diff --git a/resources/qml/Account/GeneralOperations.qml b/resources/qml/Account/GeneralOperations.qml index 1f3cd51f26..6bc94dd830 100644 --- a/resources/qml/Account/GeneralOperations.qml +++ b/resources/qml/Account/GeneralOperations.qml @@ -18,8 +18,8 @@ Row text: catalog.i18nc("@button", "Create account") color: UM.Theme.getColor("secondary") hoverColor: UM.Theme.getColor("secondary") - textColor: UM.Theme.getColor("text_link") - textHoverColor: UM.Theme.getColor("text") + textColor: UM.Theme.getColor("main_window_header_button_text_active") + textHoverColor: UM.Theme.getColor("main_window_header_button_text_active") onClicked: Qt.openUrlExternally("https://account.ultimaker.com") } diff --git a/resources/qml/Account/UserOperations.qml b/resources/qml/Account/UserOperations.qml index ffcf518b6e..a12bfbf6d7 100644 --- a/resources/qml/Account/UserOperations.qml +++ b/resources/qml/Account/UserOperations.qml @@ -18,8 +18,8 @@ Row text: catalog.i18nc("@button", "Manage account") color: UM.Theme.getColor("secondary") hoverColor: UM.Theme.getColor("secondary") - textColor: UM.Theme.getColor("text_link") - textHoverColor: UM.Theme.getColor("text") + textColor: UM.Theme.getColor("main_window_header_button_text_active") + textHoverColor: UM.Theme.getColor("main_window_header_button_text_active") onClicked: Qt.openUrlExternally("https://account.ultimaker.com") } diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 52ff99ad9b..474f93afa4 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -86,9 +86,9 @@ UM.MainWindow window: base } - TopHeader + MainWindowHeader { - id: topHeader + id: mainWindowHeader anchors { left: parent.left @@ -103,7 +103,7 @@ UM.MainWindow anchors { - top: topHeader.bottom + top: mainWindowHeader.bottom bottom: parent.bottom left: parent.left right: parent.right @@ -152,7 +152,7 @@ UM.MainWindow } visible: stageMenu.source != "" height: Math.round(UM.Theme.getSize("stage_menu").height / 2) - color: UM.Theme.getColor("topheader_background") + color: UM.Theme.getColor("main_window_header_background") } Loader diff --git a/resources/qml/MainWindow/TopHeader.qml b/resources/qml/MainWindow/MainWindowHeader.qml similarity index 76% rename from resources/qml/MainWindow/TopHeader.qml rename to resources/qml/MainWindow/MainWindowHeader.qml index 867a6bafbb..b90968c606 100644 --- a/resources/qml/MainWindow/TopHeader.qml +++ b/resources/qml/MainWindow/MainWindowHeader.qml @@ -2,7 +2,7 @@ // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 -import QtQuick.Controls 1.1 +import QtQuick.Controls 1.4 import QtQuick.Controls.Styles 1.1 import UM 1.4 as UM @@ -14,9 +14,9 @@ Rectangle { id: base - implicitHeight: UM.Theme.getSize("topheader").height - implicitWidth: UM.Theme.getSize("topheader").width - color: UM.Theme.getColor("topheader_background") + implicitHeight: UM.Theme.getSize("main_window_header").height + implicitWidth: UM.Theme.getSize("main_window_header").width + color: UM.Theme.getColor("main_window_header_background") Image { @@ -43,7 +43,7 @@ Rectangle leftMargin: UM.Theme.getSize("default_margin").width } - // The topheader is dynamically filled with all available stages + // The main window header is dynamically filled with all available stages Repeater { id: stagesHeader @@ -55,9 +55,9 @@ Rectangle text: model.name.toUpperCase() checkable: true checked: model.active - exclusiveGroup: topheaderMenuGroup - style: UM.Theme.styles.topheader_tab - height: UM.Theme.getSize("topheader").height + exclusiveGroup: mainWindowHeaderMenuGroup + style: UM.Theme.styles.main_window_header_tab + height: UM.Theme.getSize("main_window_header").height onClicked: UM.Controller.setActiveStage(model.id) iconSource: model.stage.iconSource @@ -66,7 +66,7 @@ Rectangle } } - ExclusiveGroup { id: topheaderMenuGroup } + ExclusiveGroup { id: mainWindowHeaderMenuGroup } } // Shortcut button to quick access the Toolbox @@ -83,14 +83,14 @@ Rectangle { background: Rectangle { - color: control.hovered ? UM.Theme.getColor("secondary") : UM.Theme.getColor("topheader_button_background_active") + color: control.hovered ? UM.Theme.getColor("secondary") : UM.Theme.getColor("main_window_header_button_background_active") radius: 2 * screenScaleFactor } label: Label { text: catalog.i18nc("@action:button", "Toolbox") - color: UM.Theme.getColor("topheader_button_text_active") + color: UM.Theme.getColor("main_window_header_button_text_active") font: UM.Theme.getFont("action_button") renderType: Text.NativeRendering } diff --git a/resources/qml/Menus/ConfigurationMenu/ConfigurationItem.qml b/resources/qml/Menus/ConfigurationMenu/ConfigurationItem.qml index 517b69428e..37d851a35d 100644 --- a/resources/qml/Menus/ConfigurationMenu/ConfigurationItem.qml +++ b/resources/qml/Menus/ConfigurationMenu/ConfigurationItem.qml @@ -77,8 +77,8 @@ Rectangle UM.RecolorImage { id: buildplateIcon anchors.left: parent.left - width: UM.Theme.getSize("topheader_button_icon").width - height: UM.Theme.getSize("topheader_button_icon").height + width: UM.Theme.getSize("main_window_header_button_icon").width + height: UM.Theme.getSize("main_window_header_button_icon").height sourceSize.width: width sourceSize.height: height source: UM.Theme.getIcon("buildplate") diff --git a/resources/themes/cura-dark/theme.json b/resources/themes/cura-dark/theme.json index 99737ff8bf..897d09ccf2 100644 --- a/resources/themes/cura-dark/theme.json +++ b/resources/themes/cura-dark/theme.json @@ -15,11 +15,10 @@ "border": [127, 127, 127, 255], "secondary": [241, 242, 242, 255], - "topheader_background": [31, 36, 39, 255], - - "topheader_button_text_active": [31, 36, 39, 255], - "topheader_button_text_inactive": [128, 128, 128, 255], - "topheader_button_text_hovered": [255, 255, 255, 255], + "main_window_header_background": [31, 36, 39, 255], + "main_window_header_button_text_active": [31, 36, 39, 255], + "main_window_header_button_text_inactive": [128, 128, 128, 255], + "main_window_header_button_text_hovered": [255, 255, 255, 255], "text": [255, 255, 255, 204], "text_detail": [255, 255, 255, 172], diff --git a/resources/themes/cura-light/styles.qml b/resources/themes/cura-light/styles.qml index 074ceb4200..e6e5bd7fda 100755 --- a/resources/themes/cura-light/styles.qml +++ b/resources/themes/cura-light/styles.qml @@ -96,7 +96,7 @@ QtObject } } - property Component topheader_tab: Component + property Component main_window_header_tab: Component { ButtonStyle { @@ -114,7 +114,7 @@ QtObject anchors.verticalCenter: parent.verticalCenter implicitHeight: parent.height - 2 * UM.Theme.getSize("default_margin").width implicitWidth: UM.Theme.getSize("default_lining").width - color: UM.Theme.getColor("topheader_button_background_active") + color: UM.Theme.getColor("main_window_header_button_background_active") visible: !control.checked } Rectangle @@ -122,7 +122,7 @@ QtObject id: buttonFace implicitHeight: parent.height implicitWidth: parent.width - color: control.checked ? UM.Theme.getColor("topheader_button_background_active") : UM.Theme.getColor("topheader_button_background_inactive") + color: control.checked ? UM.Theme.getColor("main_window_header_button_background_active") : UM.Theme.getColor("main_window_header_button_background_inactive") Behavior on color { ColorAnimation { duration: 50 } } } @@ -132,7 +132,7 @@ QtObject anchors.verticalCenter: parent.verticalCenter implicitHeight: parent.height - 2 * UM.Theme.getSize("default_margin").width implicitWidth: UM.Theme.getSize("default_lining").width - color: UM.Theme.getColor("topheader_button_background_active") + color: UM.Theme.getColor("main_window_header_button_background_active") visible: !control.checked } } @@ -156,15 +156,15 @@ QtObject { if (control.checked) { - return UM.Theme.getColor("topheader_button_text_active"); + return UM.Theme.getColor("main_window_header_button_text_active"); } else { if (control.hovered) { - return UM.Theme.getColor("topheader_button_text_hovered"); + return UM.Theme.getColor("main_window_header_button_text_hovered"); } - return UM.Theme.getColor("topheader_button_text_inactive"); + return UM.Theme.getColor("main_window_header_button_text_inactive"); } } } diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index d26c872b00..d72493ec89 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -79,13 +79,12 @@ "border": [127, 127, 127, 255], "secondary": [245, 245, 245, 255], - "topheader_background": [12, 169, 227, 255], - - "topheader_button_text_active": [12, 169, 227, 255], - "topheader_button_text_inactive": [255, 255, 255, 255], - "topheader_button_text_hovered": [0, 0, 0, 255], - "topheader_button_background_active": [255, 255, 255, 255], - "topheader_button_background_inactive": [255, 255, 255, 0], + "main_window_header_background": [12, 169, 227, 255], + "main_window_header_button_text_active": [12, 169, 227, 255], + "main_window_header_button_text_inactive": [255, 255, 255, 255], + "main_window_header_button_text_hovered": [0, 0, 0, 255], + "main_window_header_button_background_active": [255, 255, 255, 255], + "main_window_header_button_background_inactive": [255, 255, 255, 0], "account_widget_outline_active": [9, 140, 188, 255], "account_widget_outline_inactive": [229, 229, 229, 255], @@ -340,9 +339,9 @@ "sizes": { "window_minimum_size": [70, 50], - "topheader": [0.0, 4.5], - "topheader_button": [8, 4], - "topheader_button_icon": [1.2, 1.2], + "main_window_header": [0.0, 4.5], + "main_window_header_button": [8, 4], + "main_window_header_button_icon": [1.2, 1.2], "stage_menu": [0.0, 4.5],