diff --git a/resources/qml/Account/AccountWidget.qml b/resources/qml/Account/AccountWidget.qml index ef1622daee..3cef820997 100644 --- a/resources/qml/Account/AccountWidget.qml +++ b/resources/qml/Account/AccountWidget.qml @@ -12,8 +12,8 @@ Item property var profile: Cura.API.account.userProfile property var loggedIn: Cura.API.account.isLoggedIn - height: signInButton.height > accountWidget.height ? signInButton.height : accountWidget.height - width: signInButton.width > accountWidget.width ? signInButton.width : accountWidget.width + height: signInButton.visible ? signInButton.height : accountWidget.height + width: signInButton.visible ? signInButton.width : accountWidget.width Button { @@ -54,7 +54,6 @@ Item id: accountWidget anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: signInButton.horizontalCenter implicitHeight: Math.round(0.5 * UM.Theme.getSize("main_window_header").height) implicitWidth: Math.round(0.5 * UM.Theme.getSize("main_window_header").height) @@ -142,7 +141,7 @@ Item borderColor: UM.Theme.getColor("lining") borderWidth: UM.Theme.getSize("default_lining").width - target: Qt.point(width - (signInButton.width / 2), -10) + target: Qt.point(width - ((signInButton.visible ? signInButton.width : accountWidget.width) / 2), -10) arrowSize: UM.Theme.getSize("default_arrow").width } diff --git a/resources/qml/ApplicationSwitcher/ApplicationButton.qml b/resources/qml/ApplicationSwitcher/ApplicationButton.qml index bec806eb1c..a6176f3153 100644 --- a/resources/qml/ApplicationSwitcher/ApplicationButton.qml +++ b/resources/qml/ApplicationSwitcher/ApplicationButton.qml @@ -36,14 +36,13 @@ Button { id: applicationButtonContent anchors.centerIn: parent - spacing: UM.Theme.getSize("default_margin").width UM.RecolorImage { id: applicationIcon anchors.horizontalCenter: parent.horizontalCenter - color: UM.Theme.getColor("monitor_icon_primary") + color: UM.Theme.getColor("icon") width: UM.Theme.getSize("application_switcher_icon").width height: width @@ -65,7 +64,7 @@ Button { id: externalLinkIndicatorBackground anchors.centerIn: parent - width: UM.Theme.getSize("small_button_icon").width + width: UM.Theme.getSize("icon_indicator_background").width height: width color: base.hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button") radius: 0.5 * width @@ -76,9 +75,9 @@ Button id: externalLinkIndicatorIcon anchors.centerIn: parent - width: UM.Theme.getSize("printer_status_icon").width + width: UM.Theme.getSize("icon_indicator").width height: width - color: UM.Theme.getColor("monitor_icon_primary") + color: UM.Theme.getColor("icon") source: UM.Theme.getIcon("LinkExternal") } } @@ -91,10 +90,11 @@ Button anchors.horizontalCenter: parent.horizontalCenter width: base.width - UM.Theme.getSize("default_margin").width + height: base.height - applicationIcon.height - 2 * UM.Theme.getSize("default_margin").width // Account for the top and bottom margins horizontalAlignment: Text.AlignHCenter - maximumLineCount: 2 + verticalAlignment: Text.AlignVCenter wrapMode: Text.Wrap elide: Text.ElideRight } } -} \ No newline at end of file +} diff --git a/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml b/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml index 3e11a37734..1dc3a65e69 100644 --- a/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml +++ b/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml @@ -11,13 +11,12 @@ import Cura 1.1 as Cura Item { id: applicationSwitcherWidget - width: appSwitcherButton.width + width: applicationSwitcherButton.width height: width - Button { - id: appSwitcherButton + id: applicationSwitcherButton anchors.verticalCenter: parent.verticalCenter anchors.horizontalCenter: parent.horizontalCenter @@ -26,29 +25,29 @@ Item background: UM.RecolorImage { - width: UM.Theme.getSize("small_button_icon").width + width: parent.width height: width - anchors.verticalCenter: appSwitcherButton.verticalCenter - anchors.horizontalCenter: appSwitcherButton.horizontalCenter + anchors.verticalCenter: applicationSwitcherButton.verticalCenter + anchors.horizontalCenter: applicationSwitcherButton.horizontalCenter color: UM.Theme.getColor("main_background") - source: UM.Theme.getIcon("ApplicationSwitcher") + source: UM.Theme.getIcon("BlockGrid") } onClicked: { - if (popup.opened) + if (applicationSwitcherPopup.opened) { - popup.close() + applicationSwitcherPopup.close() } else { - popup.open() + applicationSwitcherPopup.open() } } } Popup { - id: popup + id: applicationSwitcherPopup y: parent.height + UM.Theme.getSize("default_arrow").height x: parent.width - width @@ -63,7 +62,7 @@ Item contentItem: Item { - id: projectListContainer + id: applicationsContainer anchors.fill: parent anchors.margins: UM.Theme.getSize("wide_margin").width @@ -73,17 +72,16 @@ Item anchors.top: parent.top anchors.left: parent.left - width: gridLayout.width + width: ultimakerPlatformLinksGrid.width Grid { - id: gridLayout + id: ultimakerPlatformLinksGrid columns: 3 spacing: UM.Theme.getSize("default_margin").width + Repeater { - id:gridgenerate - model: [ { @@ -147,7 +145,7 @@ Item displayName: modelData.displayName iconSource: modelData.thumbnail tooltipText: modelData.description - isExternalLink: (index % 2 == 0) + isExternalLink: true onClicked: Qt.openUrlExternally(modelData.link) } @@ -163,7 +161,7 @@ Item borderColor: UM.Theme.getColor("lining") borderWidth: UM.Theme.getSize("default_lining").width - target: Qt.point(width - (appSwitcherButton.width / 2), -10) + target: Qt.point(width - (applicationSwitcherButton.width / 2), -10) arrowSize: UM.Theme.getSize("default_arrow").width } diff --git a/resources/qml/MainWindow/MainWindowHeader.qml b/resources/qml/MainWindow/MainWindowHeader.qml index 3e3e5da467..3302c916bb 100644 --- a/resources/qml/MainWindow/MainWindowHeader.qml +++ b/resources/qml/MainWindow/MainWindowHeader.qml @@ -146,7 +146,7 @@ Item { verticalCenter: parent.verticalCenter right: accountWidget.left -// rightMargin: UM.Theme.getSize("default_margin").width + rightMargin: UM.Theme.getSize("default_margin").width } } diff --git a/resources/themes/cura-light/icons/default/ApplicationSwitcher.svg b/resources/themes/cura-light/icons/default/ApplicationSwitcher.svg deleted file mode 100644 index 966b80d64e..0000000000 --- a/resources/themes/cura-light/icons/default/ApplicationSwitcher.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/resources/themes/cura-light/icons/default/BlockGrid.svg b/resources/themes/cura-light/icons/default/BlockGrid.svg new file mode 100644 index 0000000000..207171b8f7 --- /dev/null +++ b/resources/themes/cura-light/icons/default/BlockGrid.svg @@ -0,0 +1,3 @@ + + + diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 568b2d261b..daa12b3390 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -574,6 +574,9 @@ "favorites_button": [2, 2], "favorites_button_icon": [1.2, 1.2], + "icon_indicator_background": [1.5, 1.5], + "icon_indicator": [1, 1], + "printer_status_icon": [1.0, 1.0], "printer_sync_icon": [1.2, 1.2],