From 570fb3cf93f18c8b53be24f3b2eed7754f8d5bd7 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Mon, 20 Sep 2021 15:33:05 +0200 Subject: [PATCH 01/32] Introduce the ApplicationSwitcher widget It includes only the hardcoded model with the Ultimaker links for now. CURA-8421 --- .../ApplicationSwitcher/ApplicationButton.qml | 94 ++++++++++++++ .../ApplicationSwitcher.qml | 122 ++++++++++++++++++ resources/qml/MainWindow/MainWindowHeader.qml | 14 +- .../icons/default/ApplicationSwitcher.svg | 3 + .../themes/cura-light/icons/default/Bug.svg | 3 + resources/themes/cura-light/theme.json | 3 + 6 files changed, 238 insertions(+), 1 deletion(-) create mode 100644 resources/qml/ApplicationSwitcher/ApplicationButton.qml create mode 100644 resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml create mode 100644 resources/themes/cura-light/icons/default/ApplicationSwitcher.svg create mode 100644 resources/themes/cura-light/icons/default/Bug.svg diff --git a/resources/qml/ApplicationSwitcher/ApplicationButton.qml b/resources/qml/ApplicationSwitcher/ApplicationButton.qml new file mode 100644 index 0000000000..564fff747e --- /dev/null +++ b/resources/qml/ApplicationSwitcher/ApplicationButton.qml @@ -0,0 +1,94 @@ +// Copyright (c) 2021 Ultimaker B.V. +// Cura is released under the terms of the LGPLv3 or higher. + +import QtQuick 2.10 +import QtQuick.Controls 2.3 + +import UM 1.4 as UM +import Cura 1.1 as Cura + +Button +{ + id: base + + property alias iconSource: applicationIcon.source + property alias displayName: applicationDisplayName.text + property alias tooltipText: tooltip.text + property bool isExternalLink: false + + width: UM.Theme.getSize("application_switcher_item").width + height: UM.Theme.getSize("application_switcher_item").height + + background: Rectangle + { + color: parent.hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button") + border.color: parent.hovered ? UM.Theme.getColor("primary") : "transparent" + border.width: UM.Theme.getSize("default_lining").width + } + + UM.TooltipArea + { + id: tooltip + anchors.fill: parent + } + + Column + { + 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") + width: UM.Theme.getSize("application_switcher_icon").width + height: width + + Item + { + id: externalLinkIndicator + + visible: base.isExternalLink + + anchors + { + bottom: parent.bottom + bottomMargin: - Math.round(height * 1 / 6) + right: parent.right + rightMargin: - Math.round(width * 5 / 6) + } + Rectangle + { + anchors.centerIn: parent + width: UM.Theme.getSize("small_button_icon").width + height: width + color: base.hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button") + radius: 0.5 * width + } + + UM.RecolorImage + { + id: externalLinkIcon + anchors.centerIn: parent + + width: UM.Theme.getSize("printer_status_icon").width + height: width + + color: UM.Theme.getColor("monitor_icon_primary") + + source: UM.Theme.getIcon("LinkExternal") + } + } + } + + Label + { + id: applicationDisplayName + anchors.horizontalCenter: parent.horizontalCenter + + } + } +} \ No newline at end of file diff --git a/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml b/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml new file mode 100644 index 0000000000..ea2588cc36 --- /dev/null +++ b/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml @@ -0,0 +1,122 @@ +// Copyright (c) 2021 Ultimaker B.V. +// Cura is released under the terms of the LGPLv3 or higher. + +import QtQuick 2.10 +import QtQuick.Controls 2.3 +import QtQuick.Layouts 1.15 + +import UM 1.4 as UM +import Cura 1.1 as Cura + +Item +{ + id: applicationSwitcherWidget + width: appSwitcherButton.width + height: width + + + Button + { + id: appSwitcherButton + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + + width: Math.round(0.5 * UM.Theme.getSize("main_window_header").height) + height: width + + background: UM.RecolorImage + { + width: UM.Theme.getSize("small_button_icon").width + height: width + anchors.verticalCenter: appSwitcherButton.verticalCenter + anchors.horizontalCenter: appSwitcherButton.horizontalCenter + color: UM.Theme.getColor("main_background") + + source: UM.Theme.getIcon("ApplicationSwitcher") + } + + onClicked: + { + if (popup.opened) + { + popup.close() + } else { + popup.open() + } + } + } + + Popup + { + id: popup + + y: parent.height + UM.Theme.getSize("default_arrow").height + x: parent.width - width + + closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent + + opacity: opened ? 1 : 0 + Behavior on opacity { NumberAnimation { duration: 100 } } + padding: 0 + width: contentWidth + 2 * UM.Theme.getSize("wide_margin").width + height: contentHeight + 2 * UM.Theme.getSize("wide_margin").width + + contentItem: Item + { + id: projectListContainer + anchors.fill: parent + anchors.margins: UM.Theme.getSize("wide_margin").width + + Column + { + id: contentsColumn + anchors.top: parent.top + anchors.left: parent.left + + width: gridLayout.width + + Grid + { + id: gridLayout + columns: 3 + spacing: UM.Theme.getSize("default_margin").width + Repeater + { + id:gridgenerate + + model: + [ + { displayName: "Report issue1", thumbnail: UM.Theme.getIcon("Bug"), description: "This is the description1", link: "https://github.com/Ultimaker/Cura/issues/1" }, + { displayName: "My printers", thumbnail: UM.Theme.getIcon("Bug"), description: "This is the description2", link: "https://github.com/Ultimaker/Cura/issues/2" }, + { displayName: "Ultimaker.com", thumbnail: UM.Theme.getIcon("Bug"), description: "This is the description3", link: "https://ultimaker.com" }, + { displayName: "Report issue4", thumbnail: UM.Theme.getIcon("Bug"), description: "This is the description4", link: "https://github.com/Ultimaker/Cura/issues/4" }, + { displayName: "Report issue5", thumbnail: UM.Theme.getIcon("Bug"), description: "This is the description5", link: "https://github.com/Ultimaker/Cura/issues/5" } + ] + + delegate: ApplicationButton + { + displayName: modelData.displayName + iconSource: modelData.thumbnail + tooltipText: modelData.description + isExternalLink: (index % 2 == 0) + + onClicked: Qt.openUrlExternally(modelData.link) + } + } + } + } + + } + + background: UM.PointingRectangle + { + color: UM.Theme.getColor("tool_panel_background") + borderColor: UM.Theme.getColor("lining") + borderWidth: UM.Theme.getSize("default_lining").width + + target: Qt.point(width - (appSwitcherButton.width / 2), -10) + + arrowSize: UM.Theme.getSize("default_arrow").width + } + } +} \ No newline at end of file diff --git a/resources/qml/MainWindow/MainWindowHeader.qml b/resources/qml/MainWindow/MainWindowHeader.qml index c27f3b0a24..3e3e5da467 100644 --- a/resources/qml/MainWindow/MainWindowHeader.qml +++ b/resources/qml/MainWindow/MainWindowHeader.qml @@ -10,6 +10,7 @@ import UM 1.4 as UM import Cura 1.0 as Cura import "../Account" +import "../ApplicationSwitcher" Item { @@ -113,7 +114,7 @@ Item anchors { - right: accountWidget.left + right: applicationSwitcher.left rightMargin: UM.Theme.getSize("default_margin").width verticalCenter: parent.verticalCenter } @@ -138,6 +139,17 @@ Item } } + ApplicationSwitcher + { + id: applicationSwitcher + anchors + { + verticalCenter: parent.verticalCenter + right: accountWidget.left +// rightMargin: UM.Theme.getSize("default_margin").width + } + } + AccountWidget { id: accountWidget diff --git a/resources/themes/cura-light/icons/default/ApplicationSwitcher.svg b/resources/themes/cura-light/icons/default/ApplicationSwitcher.svg new file mode 100644 index 0000000000..966b80d64e --- /dev/null +++ b/resources/themes/cura-light/icons/default/ApplicationSwitcher.svg @@ -0,0 +1,3 @@ + + + diff --git a/resources/themes/cura-light/icons/default/Bug.svg b/resources/themes/cura-light/icons/default/Bug.svg new file mode 100644 index 0000000000..9e4a8e6e45 --- /dev/null +++ b/resources/themes/cura-light/icons/default/Bug.svg @@ -0,0 +1,3 @@ + + + diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index d50a748493..568b2d261b 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -499,6 +499,9 @@ "print_setup_icon": [1.2, 1.2], "drag_icon": [1.416, 0.25], + "application_switcher_item": [8, 9], + "application_switcher_icon": [3.75, 3.75], + "expandable_component_content_header": [0.0, 3.0], "configuration_selector": [35.0, 4.0], From 15884a66e8e9f0151fe8f0e05d9f4d93fdb716ef Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Mon, 20 Sep 2021 15:58:53 +0200 Subject: [PATCH 02/32] Warp and elide ApplicationButton display name To make sure that it properly fits in the available space. CURA-8421 --- .../qml/ApplicationSwitcher/ApplicationButton.qml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/resources/qml/ApplicationSwitcher/ApplicationButton.qml b/resources/qml/ApplicationSwitcher/ApplicationButton.qml index 564fff747e..bec806eb1c 100644 --- a/resources/qml/ApplicationSwitcher/ApplicationButton.qml +++ b/resources/qml/ApplicationSwitcher/ApplicationButton.qml @@ -60,8 +60,10 @@ Button right: parent.right rightMargin: - Math.round(width * 5 / 6) } + Rectangle { + id: externalLinkIndicatorBackground anchors.centerIn: parent width: UM.Theme.getSize("small_button_icon").width height: width @@ -71,14 +73,12 @@ Button UM.RecolorImage { - id: externalLinkIcon + id: externalLinkIndicatorIcon anchors.centerIn: parent width: UM.Theme.getSize("printer_status_icon").width height: width - color: UM.Theme.getColor("monitor_icon_primary") - source: UM.Theme.getIcon("LinkExternal") } } @@ -87,8 +87,14 @@ Button Label { id: applicationDisplayName + anchors.horizontalCenter: parent.horizontalCenter + width: base.width - UM.Theme.getSize("default_margin").width + horizontalAlignment: Text.AlignHCenter + maximumLineCount: 2 + wrapMode: Text.Wrap + elide: Text.ElideRight } } } \ No newline at end of file From c518f0de933385b68dbca486bb37d1ddaf805a8e Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 20 Sep 2021 16:36:26 +0200 Subject: [PATCH 03/32] Add links to Ultimaker's platform websites The links are not final since they will need some campaign tags. For the rest it should be more or less done. Contributes to issue CURA-8422. --- .../ApplicationSwitcher.qml | 59 +++++++++++++++++-- .../cura-light/icons/default/Browser.svg | 3 + .../themes/cura-light/icons/default/Bug.svg | 4 +- .../icons/default/FoodBeverages.svg | 3 + .../themes/cura-light/icons/default/Help.svg | 3 + .../cura-light/icons/default/Knowledge.svg | 3 + .../cura-light/icons/default/Library.svg | 3 + .../themes/cura-light/icons/default/Shop.svg | 3 + .../themes/cura-light/icons/default/Speak.svg | 3 + .../themes/cura-light/icons/high/Bug.svg | 3 + .../themes/cura-light/icons/high/Help.svg | 3 + .../themes/cura-light/icons/high/Library.svg | 3 + .../cura-light/icons/high/PrinterTriple.svg | 3 + .../themes/cura-light/icons/high/Shop.svg | 3 + .../themes/cura-light/icons/high/Speak.svg | 3 + 15 files changed, 95 insertions(+), 7 deletions(-) create mode 100644 resources/themes/cura-light/icons/default/Browser.svg create mode 100644 resources/themes/cura-light/icons/default/FoodBeverages.svg create mode 100644 resources/themes/cura-light/icons/default/Help.svg create mode 100644 resources/themes/cura-light/icons/default/Knowledge.svg create mode 100644 resources/themes/cura-light/icons/default/Library.svg create mode 100644 resources/themes/cura-light/icons/default/Shop.svg create mode 100644 resources/themes/cura-light/icons/default/Speak.svg create mode 100644 resources/themes/cura-light/icons/high/Bug.svg create mode 100644 resources/themes/cura-light/icons/high/Help.svg create mode 100644 resources/themes/cura-light/icons/high/Library.svg create mode 100644 resources/themes/cura-light/icons/high/PrinterTriple.svg create mode 100644 resources/themes/cura-light/icons/high/Shop.svg create mode 100644 resources/themes/cura-light/icons/high/Speak.svg diff --git a/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml b/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml index ea2588cc36..3e11a37734 100644 --- a/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml +++ b/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml @@ -86,11 +86,60 @@ Item model: [ - { displayName: "Report issue1", thumbnail: UM.Theme.getIcon("Bug"), description: "This is the description1", link: "https://github.com/Ultimaker/Cura/issues/1" }, - { displayName: "My printers", thumbnail: UM.Theme.getIcon("Bug"), description: "This is the description2", link: "https://github.com/Ultimaker/Cura/issues/2" }, - { displayName: "Ultimaker.com", thumbnail: UM.Theme.getIcon("Bug"), description: "This is the description3", link: "https://ultimaker.com" }, - { displayName: "Report issue4", thumbnail: UM.Theme.getIcon("Bug"), description: "This is the description4", link: "https://github.com/Ultimaker/Cura/issues/4" }, - { displayName: "Report issue5", thumbnail: UM.Theme.getIcon("Bug"), description: "This is the description5", link: "https://github.com/Ultimaker/Cura/issues/5" } + { + displayName: catalog.i18nc("@label:button", "My printers"), + thumbnail: UM.Theme.getIcon("PrinterTriple", "high"), + description: catalog.i18nc("@tooltip:button", "Manage your printers in the Digital Factory."), + link: "https://digitalfactory.ultimaker.com/app/printers" + }, + { + displayName: "Digital Library", //Not translated, since it's a brand name. + thumbnail: UM.Theme.getIcon("Library", "high"), + description: catalog.i18nc("@tooltip:button", "Manage your files in the Digital Library."), + link: "https://digitalfactory.ultimaker.com/app/library" + }, + { + displayName: catalog.i18nc("@label:button", "Print jobs"), + thumbnail: UM.Theme.getIcon("FoodBeverages"), + description: catalog.i18nc("@tooltip:button", "Manage things that are being printed."), + link: "https://digitalfactory.ultimaker.com/app/print-jobs" + }, + { + displayName: "Ultimaker Marketplace", //Not translated, since it's a brand name. + thumbnail: UM.Theme.getIcon("Shop", "high"), + description: catalog.i18nc("@tooltip:button", "Extend Ultimaker Cura with new plug-ins and profiles."), + link: "https://marketplace.ultimaker.com/" + }, + { + displayName: "Ultimaker Academy", //Not translated, since it's a brand name. + thumbnail: UM.Theme.getIcon("Knowledge"), + description: catalog.i18nc("@tooltip:button", "Become an expert in 3D printing."), + link: "https://academy.ultimaker.com/" + }, + { + displayName: catalog.i18nc("@label:button", "Ultimaker support"), + thumbnail: UM.Theme.getIcon("Help", "high"), + description: catalog.i18nc("@tooltip:button", "Get help with how to use Ultimaker Cura."), + link: "https://support.ultimaker.com/" + }, + { + displayName: catalog.i18nc("@label:button", "Ask a question"), + thumbnail: UM.Theme.getIcon("Speak", "high"), + description: catalog.i18nc("@tooltip:button", "Consult the Ultimaker community."), + link: "https://community.ultimaker.com/" + }, + { + displayName: catalog.i18nc("@label:button", "Report a bug"), + thumbnail: UM.Theme.getIcon("Bug", "high"), + description: catalog.i18nc("@tooltip:button", "Notify the developers that something is going wrong."), + link: "https://github.com/Ultimaker/Cura/issues/new/choose" + }, + { + displayName: "Ultimaker.com", //Not translated, since it's a URL. + thumbnail: UM.Theme.getIcon("Browser"), + description: catalog.i18nc("@tooltip:button", "Visit Ultimaker's website."), + link: "https://ultimaker.com/" + } ] delegate: ApplicationButton diff --git a/resources/themes/cura-light/icons/default/Browser.svg b/resources/themes/cura-light/icons/default/Browser.svg new file mode 100644 index 0000000000..01365ec678 --- /dev/null +++ b/resources/themes/cura-light/icons/default/Browser.svg @@ -0,0 +1,3 @@ + + + diff --git a/resources/themes/cura-light/icons/default/Bug.svg b/resources/themes/cura-light/icons/default/Bug.svg index 9e4a8e6e45..7ad9bb4f1c 100644 --- a/resources/themes/cura-light/icons/default/Bug.svg +++ b/resources/themes/cura-light/icons/default/Bug.svg @@ -1,3 +1,3 @@ - - + + diff --git a/resources/themes/cura-light/icons/default/FoodBeverages.svg b/resources/themes/cura-light/icons/default/FoodBeverages.svg new file mode 100644 index 0000000000..1e74b33955 --- /dev/null +++ b/resources/themes/cura-light/icons/default/FoodBeverages.svg @@ -0,0 +1,3 @@ + + + diff --git a/resources/themes/cura-light/icons/default/Help.svg b/resources/themes/cura-light/icons/default/Help.svg new file mode 100644 index 0000000000..84f94c2703 --- /dev/null +++ b/resources/themes/cura-light/icons/default/Help.svg @@ -0,0 +1,3 @@ + + + diff --git a/resources/themes/cura-light/icons/default/Knowledge.svg b/resources/themes/cura-light/icons/default/Knowledge.svg new file mode 100644 index 0000000000..4f8798d5f1 --- /dev/null +++ b/resources/themes/cura-light/icons/default/Knowledge.svg @@ -0,0 +1,3 @@ + + + diff --git a/resources/themes/cura-light/icons/default/Library.svg b/resources/themes/cura-light/icons/default/Library.svg new file mode 100644 index 0000000000..beb8c6e593 --- /dev/null +++ b/resources/themes/cura-light/icons/default/Library.svg @@ -0,0 +1,3 @@ + + + diff --git a/resources/themes/cura-light/icons/default/Shop.svg b/resources/themes/cura-light/icons/default/Shop.svg new file mode 100644 index 0000000000..bfd5a4bf69 --- /dev/null +++ b/resources/themes/cura-light/icons/default/Shop.svg @@ -0,0 +1,3 @@ + + + diff --git a/resources/themes/cura-light/icons/default/Speak.svg b/resources/themes/cura-light/icons/default/Speak.svg new file mode 100644 index 0000000000..8f308643a7 --- /dev/null +++ b/resources/themes/cura-light/icons/default/Speak.svg @@ -0,0 +1,3 @@ + + + diff --git a/resources/themes/cura-light/icons/high/Bug.svg b/resources/themes/cura-light/icons/high/Bug.svg new file mode 100644 index 0000000000..a24963cd8e --- /dev/null +++ b/resources/themes/cura-light/icons/high/Bug.svg @@ -0,0 +1,3 @@ + + + diff --git a/resources/themes/cura-light/icons/high/Help.svg b/resources/themes/cura-light/icons/high/Help.svg new file mode 100644 index 0000000000..355b9dd468 --- /dev/null +++ b/resources/themes/cura-light/icons/high/Help.svg @@ -0,0 +1,3 @@ + + + diff --git a/resources/themes/cura-light/icons/high/Library.svg b/resources/themes/cura-light/icons/high/Library.svg new file mode 100644 index 0000000000..3ddc018543 --- /dev/null +++ b/resources/themes/cura-light/icons/high/Library.svg @@ -0,0 +1,3 @@ + + + diff --git a/resources/themes/cura-light/icons/high/PrinterTriple.svg b/resources/themes/cura-light/icons/high/PrinterTriple.svg new file mode 100644 index 0000000000..65e4936bc2 --- /dev/null +++ b/resources/themes/cura-light/icons/high/PrinterTriple.svg @@ -0,0 +1,3 @@ + + + diff --git a/resources/themes/cura-light/icons/high/Shop.svg b/resources/themes/cura-light/icons/high/Shop.svg new file mode 100644 index 0000000000..7662cf4b9b --- /dev/null +++ b/resources/themes/cura-light/icons/high/Shop.svg @@ -0,0 +1,3 @@ + + + diff --git a/resources/themes/cura-light/icons/high/Speak.svg b/resources/themes/cura-light/icons/high/Speak.svg new file mode 100644 index 0000000000..68642bba2b --- /dev/null +++ b/resources/themes/cura-light/icons/high/Speak.svg @@ -0,0 +1,3 @@ + + + From a9968acd6d424723afca3b05c64560a18f785a97 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Mon, 20 Sep 2021 16:42:22 +0200 Subject: [PATCH 04/32] Fix misalignment of images if the displayName spans to next line When the displayname of the app is long and it spans to the next line, it was pushing the icon up in the column, making it seem like it is misaligned. This is now fixed and the icons should be aligned regardless if the display name has one or two lines. CURA-8421 --- resources/qml/ApplicationSwitcher/ApplicationButton.qml | 4 ++-- resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml | 2 +- .../themes/cura-light/icons/default/ApplicationSwitcher.svg | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/qml/ApplicationSwitcher/ApplicationButton.qml b/resources/qml/ApplicationSwitcher/ApplicationButton.qml index bec806eb1c..d1d94eb4a2 100644 --- a/resources/qml/ApplicationSwitcher/ApplicationButton.qml +++ b/resources/qml/ApplicationSwitcher/ApplicationButton.qml @@ -36,7 +36,6 @@ Button { id: applicationButtonContent anchors.centerIn: parent - spacing: UM.Theme.getSize("default_margin").width UM.RecolorImage { @@ -91,8 +90,9 @@ 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 } diff --git a/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml b/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml index ea2588cc36..8d4d7306f9 100644 --- a/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml +++ b/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml @@ -26,7 +26,7 @@ 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 diff --git a/resources/themes/cura-light/icons/default/ApplicationSwitcher.svg b/resources/themes/cura-light/icons/default/ApplicationSwitcher.svg index 966b80d64e..207171b8f7 100644 --- a/resources/themes/cura-light/icons/default/ApplicationSwitcher.svg +++ b/resources/themes/cura-light/icons/default/ApplicationSwitcher.svg @@ -1,3 +1,3 @@ - - + + From d844c5f70a9981585a25a44f9bb6f42a699c9054 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Mon, 20 Sep 2021 16:57:16 +0200 Subject: [PATCH 05/32] Fix alignment of the ApplicationSwitcher button The sign in button has a different size when you are logged in, where the account avatar was being drawn in the middle of the Sign In button. This was causing a weird alignment of the ApplicationSwitcher next to it, as it was adding an extra margin. This is now fixed by making sure that the width of the button that has to do with account adjusts according to whether you are logged in or not. This makes the ApplicationSwitcher icon move when you log in but looks more natural relatively to the account button. CURA-8421 --- resources/qml/Account/AccountWidget.qml | 8 ++++---- resources/qml/MainWindow/MainWindowHeader.qml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/qml/Account/AccountWidget.qml b/resources/qml/Account/AccountWidget.qml index ef1622daee..6433822497 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,7 @@ Item id: accountWidget anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: signInButton.horizontalCenter +// 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 +142,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/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 } } From fea8ecd55f7acc72d8eb35037c16aec8b227e22c Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Mon, 20 Sep 2021 17:19:37 +0200 Subject: [PATCH 06/32] Rename the qml elements and the theme entries used in AppSwitcher To some more sensible names (hopefully). CURA-8421 --- .../ApplicationSwitcher/ApplicationButton.qml | 8 +++--- .../ApplicationSwitcher.qml | 28 +++++++++---------- resources/themes/cura-light/theme.json | 3 ++ 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/resources/qml/ApplicationSwitcher/ApplicationButton.qml b/resources/qml/ApplicationSwitcher/ApplicationButton.qml index d1d94eb4a2..c722b172af 100644 --- a/resources/qml/ApplicationSwitcher/ApplicationButton.qml +++ b/resources/qml/ApplicationSwitcher/ApplicationButton.qml @@ -42,7 +42,7 @@ Button 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 @@ -64,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 @@ -75,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") } } diff --git a/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml b/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml index 8d4d7306f9..c09c6e9547 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 @@ -28,8 +27,8 @@ Item { 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") @@ -37,18 +36,18 @@ Item 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: [ { displayName: "Report issue1", thumbnail: UM.Theme.getIcon("Bug"), description: "This is the description1", link: "https://github.com/Ultimaker/Cura/issues/1" }, @@ -114,7 +112,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/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], From 0d932991d45f2c9b691a21aa5cff7dde99f1b02c Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Mon, 20 Sep 2021 17:24:06 +0200 Subject: [PATCH 07/32] Rename ApplicationSwitcher.svg to BlockGrid.svg Since it is the original filename in the design. CURA-8421 --- resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml | 2 +- .../icons/default/{ApplicationSwitcher.svg => BlockGrid.svg} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename resources/themes/cura-light/icons/default/{ApplicationSwitcher.svg => BlockGrid.svg} (100%) diff --git a/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml b/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml index c09c6e9547..5096f53030 100644 --- a/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml +++ b/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml @@ -31,7 +31,7 @@ Item anchors.horizontalCenter: applicationSwitcherButton.horizontalCenter color: UM.Theme.getColor("main_background") - source: UM.Theme.getIcon("ApplicationSwitcher") + source: UM.Theme.getIcon("BlockGrid") } onClicked: diff --git a/resources/themes/cura-light/icons/default/ApplicationSwitcher.svg b/resources/themes/cura-light/icons/default/BlockGrid.svg similarity index 100% rename from resources/themes/cura-light/icons/default/ApplicationSwitcher.svg rename to resources/themes/cura-light/icons/default/BlockGrid.svg From ee564782b52d5dc9212bfcd482c7dcac2230c847 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Tue, 21 Sep 2021 11:06:45 +0200 Subject: [PATCH 08/32] Remove comment CURA-8421 --- resources/qml/Account/AccountWidget.qml | 1 - resources/qml/ApplicationSwitcher/ApplicationButton.qml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/resources/qml/Account/AccountWidget.qml b/resources/qml/Account/AccountWidget.qml index 6433822497..3cef820997 100644 --- a/resources/qml/Account/AccountWidget.qml +++ b/resources/qml/Account/AccountWidget.qml @@ -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) diff --git a/resources/qml/ApplicationSwitcher/ApplicationButton.qml b/resources/qml/ApplicationSwitcher/ApplicationButton.qml index c722b172af..a6176f3153 100644 --- a/resources/qml/ApplicationSwitcher/ApplicationButton.qml +++ b/resources/qml/ApplicationSwitcher/ApplicationButton.qml @@ -97,4 +97,4 @@ Button elide: Text.ElideRight } } -} \ No newline at end of file +} From 6df9f9f72cc209c47e96c4204c04edcf096b3685 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Tue, 21 Sep 2021 11:32:38 +0200 Subject: [PATCH 09/32] Remove debugging code So that all platform links have the link icon indicator in the bottom right corner. CURA-8421 --- resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml b/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml index 5096f53030..a98916ced9 100644 --- a/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml +++ b/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml @@ -96,7 +96,7 @@ Item displayName: modelData.displayName iconSource: modelData.thumbnail tooltipText: modelData.description - isExternalLink: (index % 2 == 0) + isExternalLink: true onClicked: Qt.openUrlExternally(modelData.link) } From df7ddd305cedfb03f35f3940e2c9989408f71a33 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 21 Sep 2021 13:17:08 +0200 Subject: [PATCH 10/32] Add tracking tags to Ultimaker website links Contributes to issue CURA-8422. --- .../ApplicationSwitcher/ApplicationSwitcher.qml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml b/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml index 1dc3a65e69..38c720cd20 100644 --- a/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml +++ b/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml @@ -88,43 +88,43 @@ Item displayName: catalog.i18nc("@label:button", "My printers"), thumbnail: UM.Theme.getIcon("PrinterTriple", "high"), description: catalog.i18nc("@tooltip:button", "Manage your printers in the Digital Factory."), - link: "https://digitalfactory.ultimaker.com/app/printers" + link: "https://digitalfactory.ultimaker.com/app/printers?utm_source=cura&utm_medium=software&utm_campaign=switcher-digital-factory-printers" }, { displayName: "Digital Library", //Not translated, since it's a brand name. thumbnail: UM.Theme.getIcon("Library", "high"), description: catalog.i18nc("@tooltip:button", "Manage your files in the Digital Library."), - link: "https://digitalfactory.ultimaker.com/app/library" + link: "https://digitalfactory.ultimaker.com/app/library?utm_source=cura&utm_medium=software&utm_campaign=switcher-library" }, { displayName: catalog.i18nc("@label:button", "Print jobs"), thumbnail: UM.Theme.getIcon("FoodBeverages"), description: catalog.i18nc("@tooltip:button", "Manage things that are being printed."), - link: "https://digitalfactory.ultimaker.com/app/print-jobs" + link: "https://digitalfactory.ultimaker.com/app/print-jobs?utm_source=cura&utm_medium=software&utm_campaign=switcher-digital-factory- printjobs" }, { displayName: "Ultimaker Marketplace", //Not translated, since it's a brand name. thumbnail: UM.Theme.getIcon("Shop", "high"), description: catalog.i18nc("@tooltip:button", "Extend Ultimaker Cura with new plug-ins and profiles."), - link: "https://marketplace.ultimaker.com/" + link: "https://marketplace.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-marketplace-materials" }, { displayName: "Ultimaker Academy", //Not translated, since it's a brand name. thumbnail: UM.Theme.getIcon("Knowledge"), description: catalog.i18nc("@tooltip:button", "Become an expert in 3D printing."), - link: "https://academy.ultimaker.com/" + link: "https://academy.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-academy" }, { displayName: catalog.i18nc("@label:button", "Ultimaker support"), thumbnail: UM.Theme.getIcon("Help", "high"), description: catalog.i18nc("@tooltip:button", "Get help with how to use Ultimaker Cura."), - link: "https://support.ultimaker.com/" + link: "https://support.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-support" }, { displayName: catalog.i18nc("@label:button", "Ask a question"), thumbnail: UM.Theme.getIcon("Speak", "high"), description: catalog.i18nc("@tooltip:button", "Consult the Ultimaker community."), - link: "https://community.ultimaker.com/" + link: "https://community.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-community" }, { displayName: catalog.i18nc("@label:button", "Report a bug"), @@ -136,7 +136,7 @@ Item displayName: "Ultimaker.com", //Not translated, since it's a URL. thumbnail: UM.Theme.getIcon("Browser"), description: catalog.i18nc("@tooltip:button", "Visit Ultimaker's website."), - link: "https://ultimaker.com/" + link: "https://ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-umwebsite" } ] From e2d19668e4ec693834b61d557c62109bc6b844d5 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Tue, 21 Sep 2021 15:00:25 +0200 Subject: [PATCH 11/32] Change the hover colors of the AppSwitcher button So that they are more subtle. CURA-8421 --- .../ApplicationSwitcher.qml | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml b/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml index a98916ced9..45d00f3744 100644 --- a/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml +++ b/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml @@ -23,15 +23,25 @@ Item width: Math.round(0.5 * UM.Theme.getSize("main_window_header").height) height: width - background: UM.RecolorImage + background: Item { - width: parent.width - height: width - anchors.verticalCenter: applicationSwitcherButton.verticalCenter - anchors.horizontalCenter: applicationSwitcherButton.horizontalCenter - color: UM.Theme.getColor("main_background") + anchors.fill: parent - source: UM.Theme.getIcon("BlockGrid") + Rectangle + { + anchors.fill: parent + radius: UM.Theme.getSize("action_button_radius").width + color: applicationSwitcherButton.hovered ? UM.Theme.getColor("primary_text") : "transparent" + opacity: applicationSwitcherButton.hovered ? 0.2 : 0 + } + + UM.RecolorImage + { + anchors.fill: parent + color: UM.Theme.getColor("primary_text") + + source: UM.Theme.getIcon("BlockGrid") + } } onClicked: From ab77efd9c493e452222f2a33c9ee13de09b71f49 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Tue, 21 Sep 2021 15:07:04 +0200 Subject: [PATCH 12/32] Move the popup so that the arrow isn't drawn exactly on the corner CURA-8421 --- resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml b/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml index 45d00f3744..bbce9dbc9f 100644 --- a/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml +++ b/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml @@ -60,7 +60,9 @@ Item id: applicationSwitcherPopup y: parent.height + UM.Theme.getSize("default_arrow").height - x: parent.width - width + + // Move the x position by the default margin so that the arrow isn't drawn exactly on the corner + x: parent.width - width + UM.Theme.getSize("default_margin").width closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent @@ -122,7 +124,8 @@ Item borderColor: UM.Theme.getColor("lining") borderWidth: UM.Theme.getSize("default_lining").width - target: Qt.point(width - (applicationSwitcherButton.width / 2), -10) + // Move the target by the default margin so that the arrow isn't drawn exactly on the corner + target: Qt.point(width - UM.Theme.getSize("default_margin").width - (applicationSwitcherButton.width / 2), -10) arrowSize: UM.Theme.getSize("default_arrow").width } From c91509418e9b9dd52ba1260ca721377e5f63cb9d Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Tue, 21 Sep 2021 15:36:31 +0200 Subject: [PATCH 13/32] Make all the top right buttons uniform Instead of inverting the fill and the text color in those buttons when hovering on those buttons, they will now show a light background fill when hovered. CURA-8421 --- resources/qml/Account/AccountWidget.qml | 27 +++++++++++++++---- resources/qml/MainWindow/MainWindowHeader.qml | 14 ++++++++-- 2 files changed, 34 insertions(+), 7 deletions(-) diff --git a/resources/qml/Account/AccountWidget.qml b/resources/qml/Account/AccountWidget.qml index 3cef820997..ceb3988ca4 100644 --- a/resources/qml/Account/AccountWidget.qml +++ b/resources/qml/Account/AccountWidget.qml @@ -32,9 +32,17 @@ Item background: Rectangle { radius: UM.Theme.getSize("action_button_radius").width - color: signInButton.hovered ? UM.Theme.getColor("primary_text") : UM.Theme.getColor("main_window_header_background") + color: UM.Theme.getColor("main_window_header_background") border.width: UM.Theme.getSize("default_lining").width border.color: UM.Theme.getColor("primary_text") + + Rectangle + { + anchors.fill: parent + radius: parent.radius + color: UM.Theme.getColor("primary_text") + opacity: signInButton.hovered ? 0.2 : 0 + } } contentItem: Label @@ -42,7 +50,7 @@ Item id: label text: signInButton.text font: UM.Theme.getFont("default") - color: signInButton.hovered ? UM.Theme.getColor("main_window_header_background") : UM.Theme.getColor("primary_text") + color: UM.Theme.getColor("primary_text") width: contentWidth verticalAlignment: Text.AlignVCenter renderType: Text.NativeRendering @@ -89,9 +97,18 @@ Item width: Math.min(accountWidget.width, accountWidget.height) height: width radius: width - color: accountWidget.hovered ? UM.Theme.getColor("primary_text") : "transparent" - border.width: 1 + color: UM.Theme.getColor("main_window_header_background") + border.width: UM.Theme.getSize("default_lining").width border.color: UM.Theme.getColor("primary_text") + + Rectangle + { + id: initialCircleFill + anchors.fill: parent + radius: parent.radius + color: UM.Theme.getColor("primary_text") + opacity: accountWidget.hovered ? 0.2 : 0 + } } Label @@ -101,7 +118,7 @@ Item anchors.horizontalCenter: parent.horizontalCenter text: accountWidget.text font: UM.Theme.getFont("large_bold") - color: accountWidget.hovered ? UM.Theme.getColor("main_window_header_background") : UM.Theme.getColor("primary_text") + color: UM.Theme.getColor("primary_text") verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter renderType: Text.NativeRendering diff --git a/resources/qml/MainWindow/MainWindowHeader.qml b/resources/qml/MainWindow/MainWindowHeader.qml index 3302c916bb..5282731537 100644 --- a/resources/qml/MainWindow/MainWindowHeader.qml +++ b/resources/qml/MainWindow/MainWindowHeader.qml @@ -95,10 +95,20 @@ Item background: Rectangle { + id: marketplaceButtonBorder radius: UM.Theme.getSize("action_button_radius").width - color: marketplaceButton.hovered ? UM.Theme.getColor("primary_text") : UM.Theme.getColor("main_window_header_background") + color: UM.Theme.getColor("main_window_header_background") border.width: UM.Theme.getSize("default_lining").width border.color: UM.Theme.getColor("primary_text") + + Rectangle + { + id: marketplaceButtonFill + anchors.fill: parent + radius: parent.radius + color: UM.Theme.getColor("primary_text") + opacity: marketplaceButton.hovered ? 0.2 : 0 + } } contentItem: Label @@ -106,7 +116,7 @@ Item id: label text: marketplaceButton.text font: UM.Theme.getFont("default") - color: marketplaceButton.hovered ? UM.Theme.getColor("main_window_header_background") : UM.Theme.getColor("primary_text") + color: UM.Theme.getColor("primary_text") width: contentWidth verticalAlignment: Text.AlignVCenter renderType: Text.NativeRendering From ed0fc260513d87d9cab91199df62441882f79a60 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Tue, 21 Sep 2021 15:51:01 +0200 Subject: [PATCH 14/32] Fix unthemed label Since in dark mode it stays black and it disappears in the background. CURA-8421 --- resources/qml/ApplicationSwitcher/ApplicationButton.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/qml/ApplicationSwitcher/ApplicationButton.qml b/resources/qml/ApplicationSwitcher/ApplicationButton.qml index a6176f3153..e3bee3d5fc 100644 --- a/resources/qml/ApplicationSwitcher/ApplicationButton.qml +++ b/resources/qml/ApplicationSwitcher/ApplicationButton.qml @@ -95,6 +95,7 @@ Button verticalAlignment: Text.AlignVCenter wrapMode: Text.Wrap elide: Text.ElideRight + color: UM.Theme.getColor("primary_text") } } } From a3d04bc752ba0d6a343277b3a2f7b6d1dc399f48 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Tue, 21 Sep 2021 16:16:14 +0200 Subject: [PATCH 15/32] Use the correct color for the label CURA-8421 --- resources/qml/ApplicationSwitcher/ApplicationButton.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/ApplicationSwitcher/ApplicationButton.qml b/resources/qml/ApplicationSwitcher/ApplicationButton.qml index e3bee3d5fc..dd3195b268 100644 --- a/resources/qml/ApplicationSwitcher/ApplicationButton.qml +++ b/resources/qml/ApplicationSwitcher/ApplicationButton.qml @@ -95,7 +95,7 @@ Button verticalAlignment: Text.AlignVCenter wrapMode: Text.Wrap elide: Text.ElideRight - color: UM.Theme.getColor("primary_text") + color: UM.Theme.getColor("text") } } } From 2f75e299f5129dd4890eec1abf7193a74cbe5d8e Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Tue, 21 Sep 2021 17:31:37 +0200 Subject: [PATCH 16/32] Set the width in the parent item Fixes review comment https://github.com/Ultimaker/Cura/pull/10491#discussion_r713127038. CURA-8421 --- resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml b/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml index 326c0c79e8..3a5e24ff97 100644 --- a/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml +++ b/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml @@ -11,17 +11,14 @@ import Cura 1.1 as Cura Item { id: applicationSwitcherWidget - width: applicationSwitcherButton.width + width: Math.round(0.5 * UM.Theme.getSize("main_window_header").height) height: width Button { id: applicationSwitcherButton - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - width: Math.round(0.5 * UM.Theme.getSize("main_window_header").height) - height: width + anchors.fill: parent background: Item { From c73f815b6964aee7c9eedf97d20e33c0edef8085 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Tue, 21 Sep 2021 17:32:06 +0200 Subject: [PATCH 17/32] Use anchors instead of setting the width Fixes review comment https://github.com/Ultimaker/Cura/pull/10491#discussion_r713119985. CURA-8421 --- resources/qml/ApplicationSwitcher/ApplicationButton.qml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/resources/qml/ApplicationSwitcher/ApplicationButton.qml b/resources/qml/ApplicationSwitcher/ApplicationButton.qml index dd3195b268..153a8996b9 100644 --- a/resources/qml/ApplicationSwitcher/ApplicationButton.qml +++ b/resources/qml/ApplicationSwitcher/ApplicationButton.qml @@ -35,7 +35,9 @@ Button Column { id: applicationButtonContent - anchors.centerIn: parent + anchors.left: parent.left + anchors.right: parent.right + anchors.verticalCenter: parent.verticalCenter UM.RecolorImage { @@ -87,9 +89,9 @@ Button { id: applicationDisplayName - anchors.horizontalCenter: parent.horizontalCenter + anchors.left: parent.left + anchors.right: parent.right - 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 verticalAlignment: Text.AlignVCenter From 96436fbedd04c61f5f70ff578ead512a0663e857 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Tue, 21 Sep 2021 17:36:04 +0200 Subject: [PATCH 18/32] Remove unnecessary anchor Fixes review comment https://github.com/Ultimaker/Cura/pull/10491#discussion_r713124155. CURA-8421 --- resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml | 2 -- 1 file changed, 2 deletions(-) diff --git a/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml b/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml index 3a5e24ff97..24ca0e3e3d 100644 --- a/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml +++ b/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml @@ -22,8 +22,6 @@ Item background: Item { - anchors.fill: parent - Rectangle { anchors.fill: parent From e0b38f278266d70d5699910f2717c4b372e3b75d Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 22 Sep 2021 09:29:47 +0200 Subject: [PATCH 19/32] Add animation to hover effect CURA-8421 --- .../ApplicationSwitcher/ApplicationButton.qml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/resources/qml/ApplicationSwitcher/ApplicationButton.qml b/resources/qml/ApplicationSwitcher/ApplicationButton.qml index 153a8996b9..be8e6e4baf 100644 --- a/resources/qml/ApplicationSwitcher/ApplicationButton.qml +++ b/resources/qml/ApplicationSwitcher/ApplicationButton.qml @@ -15,14 +15,17 @@ Button property alias displayName: applicationDisplayName.text property alias tooltipText: tooltip.text property bool isExternalLink: false + property color backgroundColor: hovered ? UM.Theme.getColor("primary") : "transparent" + Behavior on backgroundColor { ColorAnimation { duration: 200; } } + width: UM.Theme.getSize("application_switcher_item").width height: UM.Theme.getSize("application_switcher_item").height background: Rectangle { - color: parent.hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button") - border.color: parent.hovered ? UM.Theme.getColor("primary") : "transparent" + color: backgroundColor + border.color: backgroundColor border.width: UM.Theme.getSize("default_lining").width } @@ -62,16 +65,6 @@ Button rightMargin: - Math.round(width * 5 / 6) } - Rectangle - { - id: externalLinkIndicatorBackground - anchors.centerIn: parent - 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 - } - UM.RecolorImage { id: externalLinkIndicatorIcon From dc181a3426051e94dca09981922ffd2131e35579 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 22 Sep 2021 09:33:13 +0200 Subject: [PATCH 20/32] Simplify QML of application button CURA-8421 --- .../ApplicationSwitcher/ApplicationButton.qml | 20 ++++++------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/resources/qml/ApplicationSwitcher/ApplicationButton.qml b/resources/qml/ApplicationSwitcher/ApplicationButton.qml index be8e6e4baf..f90103ab7e 100644 --- a/resources/qml/ApplicationSwitcher/ApplicationButton.qml +++ b/resources/qml/ApplicationSwitcher/ApplicationButton.qml @@ -51,10 +51,9 @@ Button width: UM.Theme.getSize("application_switcher_icon").width height: width - Item + UM.RecolorImage { - id: externalLinkIndicator - + id: externalLinkIndicatorIcon visible: base.isExternalLink anchors @@ -64,17 +63,10 @@ Button right: parent.right rightMargin: - Math.round(width * 5 / 6) } - - UM.RecolorImage - { - id: externalLinkIndicatorIcon - anchors.centerIn: parent - - width: UM.Theme.getSize("icon_indicator").width - height: width - color: UM.Theme.getColor("icon") - source: UM.Theme.getIcon("LinkExternal") - } + width: UM.Theme.getSize("icon_indicator").width + height: width + color: UM.Theme.getColor("icon") + source: UM.Theme.getIcon("LinkExternal") } } From f55e3363d08d8dbe79204665fb83874c046596e0 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 22 Sep 2021 09:35:09 +0200 Subject: [PATCH 21/32] Remove unneeded property change CURA-8421 --- resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml b/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml index 24ca0e3e3d..5b07b13bca 100644 --- a/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml +++ b/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml @@ -26,7 +26,7 @@ Item { anchors.fill: parent radius: UM.Theme.getSize("action_button_radius").width - color: applicationSwitcherButton.hovered ? UM.Theme.getColor("primary_text") : "transparent" + color: UM.Theme.getColor("primary_text") opacity: applicationSwitcherButton.hovered ? 0.2 : 0 } From 9bf5d85be12e148aedc2cd118e58e888844cc7d2 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 22 Sep 2021 09:36:47 +0200 Subject: [PATCH 22/32] Add animation to hover effect CURA-8421 --- resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml b/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml index 5b07b13bca..d89f283e18 100644 --- a/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml +++ b/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml @@ -28,6 +28,7 @@ Item radius: UM.Theme.getSize("action_button_radius").width color: UM.Theme.getColor("primary_text") opacity: applicationSwitcherButton.hovered ? 0.2 : 0 + Behavior on opacity { NumberAnimation { duration: 100; } } } UM.RecolorImage From fd0804646a63192a4f3503b8d121b89edabbebbb Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 22 Sep 2021 09:40:32 +0200 Subject: [PATCH 23/32] Simplify the QML of application switcher CURA-8421 --- .../ApplicationSwitcher.qml | 150 ++++++++---------- 1 file changed, 70 insertions(+), 80 deletions(-) diff --git a/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml b/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml index d89f283e18..574061907e 100644 --- a/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml +++ b/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml @@ -64,9 +64,7 @@ Item opacity: opened ? 1 : 0 Behavior on opacity { NumberAnimation { duration: 100 } } - padding: 0 - width: contentWidth + 2 * UM.Theme.getSize("wide_margin").width - height: contentHeight + 2 * UM.Theme.getSize("wide_margin").width + padding: UM.Theme.getSize("wide_margin").width contentItem: Item { @@ -74,93 +72,85 @@ Item anchors.fill: parent anchors.margins: UM.Theme.getSize("wide_margin").width - Column + Grid { - id: contentsColumn + id: ultimakerPlatformLinksGrid + columns: 3 + spacing: UM.Theme.getSize("default_margin").width anchors.top: parent.top anchors.left: parent.left - width: ultimakerPlatformLinksGrid.width - - Grid + Repeater { - id: ultimakerPlatformLinksGrid - columns: 3 - spacing: UM.Theme.getSize("default_margin").width - - Repeater - { - model: - [ - { - displayName: catalog.i18nc("@label:button", "My printers"), - thumbnail: UM.Theme.getIcon("PrinterTriple", "high"), - description: catalog.i18nc("@tooltip:button", "Manage your printers in the Digital Factory."), - link: "https://digitalfactory.ultimaker.com/app/printers?utm_source=cura&utm_medium=software&utm_campaign=switcher-digital-factory-printers" - }, - { - displayName: "Digital Library", //Not translated, since it's a brand name. - thumbnail: UM.Theme.getIcon("Library", "high"), - description: catalog.i18nc("@tooltip:button", "Manage your files in the Digital Library."), - link: "https://digitalfactory.ultimaker.com/app/library?utm_source=cura&utm_medium=software&utm_campaign=switcher-library" - }, - { - displayName: catalog.i18nc("@label:button", "Print jobs"), - thumbnail: UM.Theme.getIcon("FoodBeverages"), - description: catalog.i18nc("@tooltip:button", "Manage things that are being printed."), - link: "https://digitalfactory.ultimaker.com/app/print-jobs?utm_source=cura&utm_medium=software&utm_campaign=switcher-digital-factory- printjobs" - }, - { - displayName: "Ultimaker Marketplace", //Not translated, since it's a brand name. - thumbnail: UM.Theme.getIcon("Shop", "high"), - description: catalog.i18nc("@tooltip:button", "Extend Ultimaker Cura with new plug-ins and profiles."), - link: "https://marketplace.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-marketplace-materials" - }, - { - displayName: "Ultimaker Academy", //Not translated, since it's a brand name. - thumbnail: UM.Theme.getIcon("Knowledge"), - description: catalog.i18nc("@tooltip:button", "Become an expert in 3D printing."), - link: "https://academy.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-academy" - }, - { - displayName: catalog.i18nc("@label:button", "Ultimaker support"), - thumbnail: UM.Theme.getIcon("Help", "high"), - description: catalog.i18nc("@tooltip:button", "Get help with how to use Ultimaker Cura."), - link: "https://support.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-support" - }, - { - displayName: catalog.i18nc("@label:button", "Ask a question"), - thumbnail: UM.Theme.getIcon("Speak", "high"), - description: catalog.i18nc("@tooltip:button", "Consult the Ultimaker community."), - link: "https://community.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-community" - }, - { - displayName: catalog.i18nc("@label:button", "Report a bug"), - thumbnail: UM.Theme.getIcon("Bug", "high"), - description: catalog.i18nc("@tooltip:button", "Notify the developers that something is going wrong."), - link: "https://github.com/Ultimaker/Cura/issues/new/choose" - }, - { - displayName: "Ultimaker.com", //Not translated, since it's a URL. - thumbnail: UM.Theme.getIcon("Browser"), - description: catalog.i18nc("@tooltip:button", "Visit Ultimaker's website."), - link: "https://ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-umwebsite" - } - ] - - delegate: ApplicationButton + model: + [ { - displayName: modelData.displayName - iconSource: modelData.thumbnail - tooltipText: modelData.description - isExternalLink: true - - onClicked: Qt.openUrlExternally(modelData.link) + displayName: catalog.i18nc("@label:button", "My printers"), + thumbnail: UM.Theme.getIcon("PrinterTriple", "high"), + description: catalog.i18nc("@tooltip:button", "Manage your printers in the Digital Factory."), + link: "https://digitalfactory.ultimaker.com/app/printers?utm_source=cura&utm_medium=software&utm_campaign=switcher-digital-factory-printers" + }, + { + displayName: "Digital Library", //Not translated, since it's a brand name. + thumbnail: UM.Theme.getIcon("Library", "high"), + description: catalog.i18nc("@tooltip:button", "Manage your files in the Digital Library."), + link: "https://digitalfactory.ultimaker.com/app/library?utm_source=cura&utm_medium=software&utm_campaign=switcher-library" + }, + { + displayName: catalog.i18nc("@label:button", "Print jobs"), + thumbnail: UM.Theme.getIcon("FoodBeverages"), + description: catalog.i18nc("@tooltip:button", "Manage things that are being printed."), + link: "https://digitalfactory.ultimaker.com/app/print-jobs?utm_source=cura&utm_medium=software&utm_campaign=switcher-digital-factory- printjobs" + }, + { + displayName: "Ultimaker Marketplace", //Not translated, since it's a brand name. + thumbnail: UM.Theme.getIcon("Shop", "high"), + description: catalog.i18nc("@tooltip:button", "Extend Ultimaker Cura with new plug-ins and profiles."), + link: "https://marketplace.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-marketplace-materials" + }, + { + displayName: "Ultimaker Academy", //Not translated, since it's a brand name. + thumbnail: UM.Theme.getIcon("Knowledge"), + description: catalog.i18nc("@tooltip:button", "Become an expert in 3D printing."), + link: "https://academy.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-academy" + }, + { + displayName: catalog.i18nc("@label:button", "Ultimaker support"), + thumbnail: UM.Theme.getIcon("Help", "high"), + description: catalog.i18nc("@tooltip:button", "Get help with how to use Ultimaker Cura."), + link: "https://support.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-support" + }, + { + displayName: catalog.i18nc("@label:button", "Ask a question"), + thumbnail: UM.Theme.getIcon("Speak", "high"), + description: catalog.i18nc("@tooltip:button", "Consult the Ultimaker community."), + link: "https://community.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-community" + }, + { + displayName: catalog.i18nc("@label:button", "Report a bug"), + thumbnail: UM.Theme.getIcon("Bug", "high"), + description: catalog.i18nc("@tooltip:button", "Notify the developers that something is going wrong."), + link: "https://github.com/Ultimaker/Cura/issues/new/choose" + }, + { + displayName: "Ultimaker.com", //Not translated, since it's a URL. + thumbnail: UM.Theme.getIcon("Browser"), + description: catalog.i18nc("@tooltip:button", "Visit Ultimaker's website."), + link: "https://ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-umwebsite" } + ] + + delegate: ApplicationButton + { + displayName: modelData.displayName + iconSource: modelData.thumbnail + tooltipText: modelData.description + isExternalLink: true + + onClicked: Qt.openUrlExternally(modelData.link) } } } - } background: UM.PointingRectangle From 0c9ef1e64787ec27cb1bbf318c86fb50aa53566d Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 22 Sep 2021 09:43:49 +0200 Subject: [PATCH 24/32] Move ApplicationSwitcherPopup to it's own file CURA-8421 --- .../ApplicationSwitcher.qml | 109 +--------------- .../ApplicationSwitcherPopup.qml | 119 ++++++++++++++++++ 2 files changed, 120 insertions(+), 108 deletions(-) create mode 100644 resources/qml/ApplicationSwitcher/ApplicationSwitcherPopup.qml diff --git a/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml b/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml index 574061907e..a8ea2312a5 100644 --- a/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml +++ b/resources/qml/ApplicationSwitcher/ApplicationSwitcher.qml @@ -50,119 +50,12 @@ Item } } } - - Popup + ApplicationSwitcherPopup { id: applicationSwitcherPopup - y: parent.height + UM.Theme.getSize("default_arrow").height // Move the x position by the default margin so that the arrow isn't drawn exactly on the corner x: parent.width - width + UM.Theme.getSize("default_margin").width - - closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent - - opacity: opened ? 1 : 0 - Behavior on opacity { NumberAnimation { duration: 100 } } - padding: UM.Theme.getSize("wide_margin").width - - contentItem: Item - { - id: applicationsContainer - anchors.fill: parent - anchors.margins: UM.Theme.getSize("wide_margin").width - - Grid - { - id: ultimakerPlatformLinksGrid - columns: 3 - spacing: UM.Theme.getSize("default_margin").width - anchors.top: parent.top - anchors.left: parent.left - - Repeater - { - model: - [ - { - displayName: catalog.i18nc("@label:button", "My printers"), - thumbnail: UM.Theme.getIcon("PrinterTriple", "high"), - description: catalog.i18nc("@tooltip:button", "Manage your printers in the Digital Factory."), - link: "https://digitalfactory.ultimaker.com/app/printers?utm_source=cura&utm_medium=software&utm_campaign=switcher-digital-factory-printers" - }, - { - displayName: "Digital Library", //Not translated, since it's a brand name. - thumbnail: UM.Theme.getIcon("Library", "high"), - description: catalog.i18nc("@tooltip:button", "Manage your files in the Digital Library."), - link: "https://digitalfactory.ultimaker.com/app/library?utm_source=cura&utm_medium=software&utm_campaign=switcher-library" - }, - { - displayName: catalog.i18nc("@label:button", "Print jobs"), - thumbnail: UM.Theme.getIcon("FoodBeverages"), - description: catalog.i18nc("@tooltip:button", "Manage things that are being printed."), - link: "https://digitalfactory.ultimaker.com/app/print-jobs?utm_source=cura&utm_medium=software&utm_campaign=switcher-digital-factory- printjobs" - }, - { - displayName: "Ultimaker Marketplace", //Not translated, since it's a brand name. - thumbnail: UM.Theme.getIcon("Shop", "high"), - description: catalog.i18nc("@tooltip:button", "Extend Ultimaker Cura with new plug-ins and profiles."), - link: "https://marketplace.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-marketplace-materials" - }, - { - displayName: "Ultimaker Academy", //Not translated, since it's a brand name. - thumbnail: UM.Theme.getIcon("Knowledge"), - description: catalog.i18nc("@tooltip:button", "Become an expert in 3D printing."), - link: "https://academy.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-academy" - }, - { - displayName: catalog.i18nc("@label:button", "Ultimaker support"), - thumbnail: UM.Theme.getIcon("Help", "high"), - description: catalog.i18nc("@tooltip:button", "Get help with how to use Ultimaker Cura."), - link: "https://support.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-support" - }, - { - displayName: catalog.i18nc("@label:button", "Ask a question"), - thumbnail: UM.Theme.getIcon("Speak", "high"), - description: catalog.i18nc("@tooltip:button", "Consult the Ultimaker community."), - link: "https://community.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-community" - }, - { - displayName: catalog.i18nc("@label:button", "Report a bug"), - thumbnail: UM.Theme.getIcon("Bug", "high"), - description: catalog.i18nc("@tooltip:button", "Notify the developers that something is going wrong."), - link: "https://github.com/Ultimaker/Cura/issues/new/choose" - }, - { - displayName: "Ultimaker.com", //Not translated, since it's a URL. - thumbnail: UM.Theme.getIcon("Browser"), - description: catalog.i18nc("@tooltip:button", "Visit Ultimaker's website."), - link: "https://ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-umwebsite" - } - ] - - delegate: ApplicationButton - { - displayName: modelData.displayName - iconSource: modelData.thumbnail - tooltipText: modelData.description - isExternalLink: true - - onClicked: Qt.openUrlExternally(modelData.link) - } - } - } - } - - background: UM.PointingRectangle - { - color: UM.Theme.getColor("tool_panel_background") - borderColor: UM.Theme.getColor("lining") - borderWidth: UM.Theme.getSize("default_lining").width - - // Move the target by the default margin so that the arrow isn't drawn exactly on the corner - target: Qt.point(width - UM.Theme.getSize("default_margin").width - (applicationSwitcherButton.width / 2), -10) - - arrowSize: UM.Theme.getSize("default_arrow").width - } } } \ No newline at end of file diff --git a/resources/qml/ApplicationSwitcher/ApplicationSwitcherPopup.qml b/resources/qml/ApplicationSwitcher/ApplicationSwitcherPopup.qml new file mode 100644 index 0000000000..25d4539cf9 --- /dev/null +++ b/resources/qml/ApplicationSwitcher/ApplicationSwitcherPopup.qml @@ -0,0 +1,119 @@ +// Copyright (c) 2021 Ultimaker B.V. +// Cura is released under the terms of the LGPLv3 or higher. + +import QtQuick 2.10 +import QtQuick.Controls 2.3 +import QtQuick.Layouts 1.15 + +import UM 1.4 as UM +import Cura 1.1 as Cura + +Popup +{ + id: applicationSwitcherPopup + + closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent + + opacity: opened ? 1 : 0 + Behavior on opacity { NumberAnimation { duration: 100 } } + padding: UM.Theme.getSize("wide_margin").width + + contentItem: Item + { + id: applicationsContainer + anchors.fill: parent + anchors.margins: UM.Theme.getSize("wide_margin").width + + Grid + { + id: ultimakerPlatformLinksGrid + columns: 3 + spacing: UM.Theme.getSize("default_margin").width + anchors.top: parent.top + anchors.left: parent.left + + Repeater + { + model: + [ + { + displayName: catalog.i18nc("@label:button", "My printers"), + thumbnail: UM.Theme.getIcon("PrinterTriple", "high"), + description: catalog.i18nc("@tooltip:button", "Manage your printers in the Digital Factory."), + link: "https://digitalfactory.ultimaker.com/app/printers?utm_source=cura&utm_medium=software&utm_campaign=switcher-digital-factory-printers" + }, + { + displayName: "Digital Library", //Not translated, since it's a brand name. + thumbnail: UM.Theme.getIcon("Library", "high"), + description: catalog.i18nc("@tooltip:button", "Manage your files in the Digital Library."), + link: "https://digitalfactory.ultimaker.com/app/library?utm_source=cura&utm_medium=software&utm_campaign=switcher-library" + }, + { + displayName: catalog.i18nc("@label:button", "Print jobs"), + thumbnail: UM.Theme.getIcon("FoodBeverages"), + description: catalog.i18nc("@tooltip:button", "Manage things that are being printed."), + link: "https://digitalfactory.ultimaker.com/app/print-jobs?utm_source=cura&utm_medium=software&utm_campaign=switcher-digital-factory- printjobs" + }, + { + displayName: "Ultimaker Marketplace", //Not translated, since it's a brand name. + thumbnail: UM.Theme.getIcon("Shop", "high"), + description: catalog.i18nc("@tooltip:button", "Extend Ultimaker Cura with new plug-ins and profiles."), + link: "https://marketplace.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-marketplace-materials" + }, + { + displayName: "Ultimaker Academy", //Not translated, since it's a brand name. + thumbnail: UM.Theme.getIcon("Knowledge"), + description: catalog.i18nc("@tooltip:button", "Become an expert in 3D printing."), + link: "https://academy.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-academy" + }, + { + displayName: catalog.i18nc("@label:button", "Ultimaker support"), + thumbnail: UM.Theme.getIcon("Help", "high"), + description: catalog.i18nc("@tooltip:button", "Get help with how to use Ultimaker Cura."), + link: "https://support.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-support" + }, + { + displayName: catalog.i18nc("@label:button", "Ask a question"), + thumbnail: UM.Theme.getIcon("Speak", "high"), + description: catalog.i18nc("@tooltip:button", "Consult the Ultimaker community."), + link: "https://community.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-community" + }, + { + displayName: catalog.i18nc("@label:button", "Report a bug"), + thumbnail: UM.Theme.getIcon("Bug", "high"), + description: catalog.i18nc("@tooltip:button", "Notify the developers that something is going wrong."), + link: "https://github.com/Ultimaker/Cura/issues/new/choose" + }, + { + displayName: "Ultimaker.com", //Not translated, since it's a URL. + thumbnail: UM.Theme.getIcon("Browser"), + description: catalog.i18nc("@tooltip:button", "Visit Ultimaker's website."), + link: "https://ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-umwebsite" + } + ] + + delegate: ApplicationButton + { + displayName: modelData.displayName + iconSource: modelData.thumbnail + tooltipText: modelData.description + isExternalLink: true + + onClicked: Qt.openUrlExternally(modelData.link) + } + } + } + } + + background: UM.PointingRectangle + { + color: UM.Theme.getColor("tool_panel_background") + borderColor: UM.Theme.getColor("lining") + borderWidth: UM.Theme.getSize("default_lining").width + + // Move the target by the default margin so that the arrow isn't drawn exactly on the corner + target: Qt.point(width - UM.Theme.getSize("default_margin").width - (applicationSwitcherButton.width / 2), -10) + + arrowSize: UM.Theme.getSize("default_arrow").width + } +} \ No newline at end of file From 90bfdce3bb1f5854e1a63d82dfc72bca01277a28 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 22 Sep 2021 09:45:53 +0200 Subject: [PATCH 25/32] Further simplify the qml of applicationSwitcherPopup CURA-8421 --- .../ApplicationSwitcherPopup.qml | 147 ++++++++---------- 1 file changed, 69 insertions(+), 78 deletions(-) diff --git a/resources/qml/ApplicationSwitcher/ApplicationSwitcherPopup.qml b/resources/qml/ApplicationSwitcher/ApplicationSwitcherPopup.qml index 25d4539cf9..db19c827df 100644 --- a/resources/qml/ApplicationSwitcher/ApplicationSwitcherPopup.qml +++ b/resources/qml/ApplicationSwitcher/ApplicationSwitcherPopup.qml @@ -18,89 +18,80 @@ Popup Behavior on opacity { NumberAnimation { duration: 100 } } padding: UM.Theme.getSize("wide_margin").width - contentItem: Item + contentItem: Grid { - id: applicationsContainer - anchors.fill: parent - anchors.margins: UM.Theme.getSize("wide_margin").width + id: ultimakerPlatformLinksGrid + columns: 3 + spacing: UM.Theme.getSize("default_margin").width - Grid + Repeater { - id: ultimakerPlatformLinksGrid - columns: 3 - spacing: UM.Theme.getSize("default_margin").width - anchors.top: parent.top - anchors.left: parent.left - - Repeater - { - model: - [ - { - displayName: catalog.i18nc("@label:button", "My printers"), - thumbnail: UM.Theme.getIcon("PrinterTriple", "high"), - description: catalog.i18nc("@tooltip:button", "Manage your printers in the Digital Factory."), - link: "https://digitalfactory.ultimaker.com/app/printers?utm_source=cura&utm_medium=software&utm_campaign=switcher-digital-factory-printers" - }, - { - displayName: "Digital Library", //Not translated, since it's a brand name. - thumbnail: UM.Theme.getIcon("Library", "high"), - description: catalog.i18nc("@tooltip:button", "Manage your files in the Digital Library."), - link: "https://digitalfactory.ultimaker.com/app/library?utm_source=cura&utm_medium=software&utm_campaign=switcher-library" - }, - { - displayName: catalog.i18nc("@label:button", "Print jobs"), - thumbnail: UM.Theme.getIcon("FoodBeverages"), - description: catalog.i18nc("@tooltip:button", "Manage things that are being printed."), - link: "https://digitalfactory.ultimaker.com/app/print-jobs?utm_source=cura&utm_medium=software&utm_campaign=switcher-digital-factory- printjobs" - }, - { - displayName: "Ultimaker Marketplace", //Not translated, since it's a brand name. - thumbnail: UM.Theme.getIcon("Shop", "high"), - description: catalog.i18nc("@tooltip:button", "Extend Ultimaker Cura with new plug-ins and profiles."), - link: "https://marketplace.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-marketplace-materials" - }, - { - displayName: "Ultimaker Academy", //Not translated, since it's a brand name. - thumbnail: UM.Theme.getIcon("Knowledge"), - description: catalog.i18nc("@tooltip:button", "Become an expert in 3D printing."), - link: "https://academy.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-academy" - }, - { - displayName: catalog.i18nc("@label:button", "Ultimaker support"), - thumbnail: UM.Theme.getIcon("Help", "high"), - description: catalog.i18nc("@tooltip:button", "Get help with how to use Ultimaker Cura."), - link: "https://support.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-support" - }, - { - displayName: catalog.i18nc("@label:button", "Ask a question"), - thumbnail: UM.Theme.getIcon("Speak", "high"), - description: catalog.i18nc("@tooltip:button", "Consult the Ultimaker community."), - link: "https://community.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-community" - }, - { - displayName: catalog.i18nc("@label:button", "Report a bug"), - thumbnail: UM.Theme.getIcon("Bug", "high"), - description: catalog.i18nc("@tooltip:button", "Notify the developers that something is going wrong."), - link: "https://github.com/Ultimaker/Cura/issues/new/choose" - }, - { - displayName: "Ultimaker.com", //Not translated, since it's a URL. - thumbnail: UM.Theme.getIcon("Browser"), - description: catalog.i18nc("@tooltip:button", "Visit Ultimaker's website."), - link: "https://ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-umwebsite" - } - ] - - delegate: ApplicationButton + model: + [ { - displayName: modelData.displayName - iconSource: modelData.thumbnail - tooltipText: modelData.description - isExternalLink: true - - onClicked: Qt.openUrlExternally(modelData.link) + displayName: catalog.i18nc("@label:button", "My printers"), + thumbnail: UM.Theme.getIcon("PrinterTriple", "high"), + description: catalog.i18nc("@tooltip:button", "Manage your printers in the Digital Factory."), + link: "https://digitalfactory.ultimaker.com/app/printers?utm_source=cura&utm_medium=software&utm_campaign=switcher-digital-factory-printers" + }, + { + displayName: "Digital Library", //Not translated, since it's a brand name. + thumbnail: UM.Theme.getIcon("Library", "high"), + description: catalog.i18nc("@tooltip:button", "Manage your files in the Digital Library."), + link: "https://digitalfactory.ultimaker.com/app/library?utm_source=cura&utm_medium=software&utm_campaign=switcher-library" + }, + { + displayName: catalog.i18nc("@label:button", "Print jobs"), + thumbnail: UM.Theme.getIcon("FoodBeverages"), + description: catalog.i18nc("@tooltip:button", "Manage things that are being printed."), + link: "https://digitalfactory.ultimaker.com/app/print-jobs?utm_source=cura&utm_medium=software&utm_campaign=switcher-digital-factory- printjobs" + }, + { + displayName: "Ultimaker Marketplace", //Not translated, since it's a brand name. + thumbnail: UM.Theme.getIcon("Shop", "high"), + description: catalog.i18nc("@tooltip:button", "Extend Ultimaker Cura with new plug-ins and profiles."), + link: "https://marketplace.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-marketplace-materials" + }, + { + displayName: "Ultimaker Academy", //Not translated, since it's a brand name. + thumbnail: UM.Theme.getIcon("Knowledge"), + description: catalog.i18nc("@tooltip:button", "Become an expert in 3D printing."), + link: "https://academy.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-academy" + }, + { + displayName: catalog.i18nc("@label:button", "Ultimaker support"), + thumbnail: UM.Theme.getIcon("Help", "high"), + description: catalog.i18nc("@tooltip:button", "Get help with how to use Ultimaker Cura."), + link: "https://support.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-support" + }, + { + displayName: catalog.i18nc("@label:button", "Ask a question"), + thumbnail: UM.Theme.getIcon("Speak", "high"), + description: catalog.i18nc("@tooltip:button", "Consult the Ultimaker community."), + link: "https://community.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-community" + }, + { + displayName: catalog.i18nc("@label:button", "Report a bug"), + thumbnail: UM.Theme.getIcon("Bug", "high"), + description: catalog.i18nc("@tooltip:button", "Notify the developers that something is going wrong."), + link: "https://github.com/Ultimaker/Cura/issues/new/choose" + }, + { + displayName: "Ultimaker.com", //Not translated, since it's a URL. + thumbnail: UM.Theme.getIcon("Browser"), + description: catalog.i18nc("@tooltip:button", "Visit Ultimaker's website."), + link: "https://ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-umwebsite" } + ] + + delegate: ApplicationButton + { + displayName: modelData.displayName + iconSource: modelData.thumbnail + tooltipText: modelData.description + isExternalLink: true + + onClicked: Qt.openUrlExternally(modelData.link) } } } From aa905a80fec6dfa22c06619b57b87682033063d3 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 22 Sep 2021 09:48:27 +0200 Subject: [PATCH 26/32] Add animations to hover effect CURA-8421 --- resources/qml/Account/AccountWidget.qml | 2 ++ resources/qml/MainWindow/MainWindowHeader.qml | 1 + 2 files changed, 3 insertions(+) diff --git a/resources/qml/Account/AccountWidget.qml b/resources/qml/Account/AccountWidget.qml index ceb3988ca4..b058ead22f 100644 --- a/resources/qml/Account/AccountWidget.qml +++ b/resources/qml/Account/AccountWidget.qml @@ -42,6 +42,7 @@ Item radius: parent.radius color: UM.Theme.getColor("primary_text") opacity: signInButton.hovered ? 0.2 : 0 + Behavior on opacity { NumberAnimation { duration: 100 } } } } @@ -108,6 +109,7 @@ Item radius: parent.radius color: UM.Theme.getColor("primary_text") opacity: accountWidget.hovered ? 0.2 : 0 + Behavior on opacity { NumberAnimation { duration: 100 } } } } diff --git a/resources/qml/MainWindow/MainWindowHeader.qml b/resources/qml/MainWindow/MainWindowHeader.qml index 5282731537..815ddff732 100644 --- a/resources/qml/MainWindow/MainWindowHeader.qml +++ b/resources/qml/MainWindow/MainWindowHeader.qml @@ -108,6 +108,7 @@ Item radius: parent.radius color: UM.Theme.getColor("primary_text") opacity: marketplaceButton.hovered ? 0.2 : 0 + Behavior on opacity { NumberAnimation { duration: 100 } } } } From 5a8396651e7f6d90f424b799873f5989eb718303 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 22 Sep 2021 12:59:43 +0200 Subject: [PATCH 27/32] Update the copy of the tooltips CURA-8422 --- .../ApplicationSwitcherPopup.qml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/resources/qml/ApplicationSwitcher/ApplicationSwitcherPopup.qml b/resources/qml/ApplicationSwitcher/ApplicationSwitcherPopup.qml index db19c827df..7d08b766a8 100644 --- a/resources/qml/ApplicationSwitcher/ApplicationSwitcherPopup.qml +++ b/resources/qml/ApplicationSwitcher/ApplicationSwitcherPopup.qml @@ -31,55 +31,55 @@ Popup { displayName: catalog.i18nc("@label:button", "My printers"), thumbnail: UM.Theme.getIcon("PrinterTriple", "high"), - description: catalog.i18nc("@tooltip:button", "Manage your printers in the Digital Factory."), + description: catalog.i18nc("@tooltip:button", "Monitor printers in Ultimaker Digital Factory."), link: "https://digitalfactory.ultimaker.com/app/printers?utm_source=cura&utm_medium=software&utm_campaign=switcher-digital-factory-printers" }, { displayName: "Digital Library", //Not translated, since it's a brand name. thumbnail: UM.Theme.getIcon("Library", "high"), - description: catalog.i18nc("@tooltip:button", "Manage your files in the Digital Library."), + description: catalog.i18nc("@tooltip:button", "Create print projects in Digital Library."), link: "https://digitalfactory.ultimaker.com/app/library?utm_source=cura&utm_medium=software&utm_campaign=switcher-library" }, { displayName: catalog.i18nc("@label:button", "Print jobs"), thumbnail: UM.Theme.getIcon("FoodBeverages"), - description: catalog.i18nc("@tooltip:button", "Manage things that are being printed."), + description: catalog.i18nc("@tooltip:button", "Monitor print jobs and reprint from your print history."), link: "https://digitalfactory.ultimaker.com/app/print-jobs?utm_source=cura&utm_medium=software&utm_campaign=switcher-digital-factory- printjobs" }, { displayName: "Ultimaker Marketplace", //Not translated, since it's a brand name. thumbnail: UM.Theme.getIcon("Shop", "high"), - description: catalog.i18nc("@tooltip:button", "Extend Ultimaker Cura with new plug-ins and profiles."), + description: catalog.i18nc("@tooltip:button", "Extend Ultimaker Cura with plugins and material profiles."), link: "https://marketplace.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-marketplace-materials" }, { displayName: "Ultimaker Academy", //Not translated, since it's a brand name. thumbnail: UM.Theme.getIcon("Knowledge"), - description: catalog.i18nc("@tooltip:button", "Become an expert in 3D printing."), + description: catalog.i18nc("@tooltip:button", "Become a 3D printing expert with Ultimaker e-learning."), link: "https://academy.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-academy" }, { displayName: catalog.i18nc("@label:button", "Ultimaker support"), thumbnail: UM.Theme.getIcon("Help", "high"), - description: catalog.i18nc("@tooltip:button", "Get help with how to use Ultimaker Cura."), + description: catalog.i18nc("@tooltip:button", "Learn how to get started with Ultimaker Cura."), link: "https://support.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-support" }, { displayName: catalog.i18nc("@label:button", "Ask a question"), thumbnail: UM.Theme.getIcon("Speak", "high"), - description: catalog.i18nc("@tooltip:button", "Consult the Ultimaker community."), + description: catalog.i18nc("@tooltip:button", "Consult the Ultimaker Community."), link: "https://community.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-community" }, { displayName: catalog.i18nc("@label:button", "Report a bug"), thumbnail: UM.Theme.getIcon("Bug", "high"), - description: catalog.i18nc("@tooltip:button", "Notify the developers that something is going wrong."), + description: catalog.i18nc("@tooltip:button", "Let developers know that something is going wrong."), link: "https://github.com/Ultimaker/Cura/issues/new/choose" }, { displayName: "Ultimaker.com", //Not translated, since it's a URL. thumbnail: UM.Theme.getIcon("Browser"), - description: catalog.i18nc("@tooltip:button", "Visit Ultimaker's website."), + description: catalog.i18nc("@tooltip:button", "Visit the Ultimaker website."), link: "https://ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-umwebsite" } ] From 9b3103e62410e3ac1147fd11f514eac42f72e4a9 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 22 Sep 2021 13:00:45 +0200 Subject: [PATCH 28/32] Fix typo in changelog Found it when making the same typo in search. --- resources/texts/change_log.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/texts/change_log.txt b/resources/texts/change_log.txt index 6dc8835de1..d089d2c16b 100644 --- a/resources/texts/change_log.txt +++ b/resources/texts/change_log.txt @@ -98,7 +98,7 @@ When double clicking on a file in the open project dialog in Digital Factory it - Fixed a bug when the seam was not placed in sharpest corner. - Fixed the gantry height for S-line printers. - Fixed a bug where a model is partially below build plate if center selected model is used. -- Fixed a bug where a tootip arrow appeared when the "Manage printers" button is hovered. +- Fixed a bug where a tooltip arrow appeared when the "Manage printers" button is hovered. - Fixed a bug where assemblies were not arranged in the center of the build plate. * Printer definitions, profiles and materials. From e39675e447a149fe7dfe7cc74d805c4a1676e763 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 22 Sep 2021 13:44:45 +0200 Subject: [PATCH 29/32] Use styled tooltip CURA-8422 --- resources/qml/ApplicationSwitcher/ApplicationButton.qml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/resources/qml/ApplicationSwitcher/ApplicationButton.qml b/resources/qml/ApplicationSwitcher/ApplicationButton.qml index f90103ab7e..3ea5dc6f37 100644 --- a/resources/qml/ApplicationSwitcher/ApplicationButton.qml +++ b/resources/qml/ApplicationSwitcher/ApplicationButton.qml @@ -18,7 +18,7 @@ Button property color backgroundColor: hovered ? UM.Theme.getColor("primary") : "transparent" Behavior on backgroundColor { ColorAnimation { duration: 200; } } - + hoverEnabled: true width: UM.Theme.getSize("application_switcher_item").width height: UM.Theme.getSize("application_switcher_item").height @@ -29,10 +29,11 @@ Button border.width: UM.Theme.getSize("default_lining").width } - UM.TooltipArea + Cura.ToolTip { id: tooltip - anchors.fill: parent + tooltipText: base.text + visible: base.hovered } Column From 7d46e0a96c306a2a30f9e22947254f20f8292713 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 22 Sep 2021 13:52:54 +0200 Subject: [PATCH 30/32] Fix styling of application button Fixes previous mistake that I made while simplifying the QML CURA-8421 --- resources/qml/ApplicationSwitcher/ApplicationButton.qml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/resources/qml/ApplicationSwitcher/ApplicationButton.qml b/resources/qml/ApplicationSwitcher/ApplicationButton.qml index f90103ab7e..f4a3129798 100644 --- a/resources/qml/ApplicationSwitcher/ApplicationButton.qml +++ b/resources/qml/ApplicationSwitcher/ApplicationButton.qml @@ -15,8 +15,10 @@ Button property alias displayName: applicationDisplayName.text property alias tooltipText: tooltip.text property bool isExternalLink: false - property color backgroundColor: hovered ? UM.Theme.getColor("primary") : "transparent" + property color borderColor: hovered ? UM.Theme.getColor("primary") : "transparent" + property color backgroundColor: hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button") Behavior on backgroundColor { ColorAnimation { duration: 200; } } + Behavior on borderColor { ColorAnimation { duration: 200; } } width: UM.Theme.getSize("application_switcher_item").width @@ -24,8 +26,8 @@ Button background: Rectangle { - color: backgroundColor - border.color: backgroundColor + color:backgroundColor + border.color: borderColor border.width: UM.Theme.getSize("default_lining").width } From 0656e11afa28235aeee42e5219172e2e76f10f3d Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 22 Sep 2021 13:52:54 +0200 Subject: [PATCH 31/32] Fix styling of application button Fixes previous mistake that I made while simplifying the QML CURA-8421 --- resources/qml/ApplicationSwitcher/ApplicationButton.qml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/resources/qml/ApplicationSwitcher/ApplicationButton.qml b/resources/qml/ApplicationSwitcher/ApplicationButton.qml index 3ea5dc6f37..bcf780753c 100644 --- a/resources/qml/ApplicationSwitcher/ApplicationButton.qml +++ b/resources/qml/ApplicationSwitcher/ApplicationButton.qml @@ -15,8 +15,10 @@ Button property alias displayName: applicationDisplayName.text property alias tooltipText: tooltip.text property bool isExternalLink: false - property color backgroundColor: hovered ? UM.Theme.getColor("primary") : "transparent" + property color borderColor: hovered ? UM.Theme.getColor("primary") : "transparent" + property color backgroundColor: hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button") Behavior on backgroundColor { ColorAnimation { duration: 200; } } + Behavior on borderColor { ColorAnimation { duration: 200; } } hoverEnabled: true width: UM.Theme.getSize("application_switcher_item").width @@ -24,8 +26,8 @@ Button background: Rectangle { - color: backgroundColor - border.color: backgroundColor + color:backgroundColor + border.color: borderColor border.width: UM.Theme.getSize("default_lining").width } From b020f8efd429929edbcac9b39cd1c618ff3f7799 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 22 Sep 2021 15:28:53 +0200 Subject: [PATCH 32/32] Also update version number of Digital Library in bundled versions Otherwise we still get an update notification when starting from factory defaults. The plug-in's real version is 1.1.0 now. --- resources/bundled_packages/cura.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/bundled_packages/cura.json b/resources/bundled_packages/cura.json index f1af8a7a90..c39684bc1f 100644 --- a/resources/bundled_packages/cura.json +++ b/resources/bundled_packages/cura.json @@ -124,7 +124,7 @@ "package_type": "plugin", "display_name": "Ultimaker Digital Library", "description": "Connects to the Digital Library, allowing Cura to open files from and save files to the Digital Library.", - "package_version": "1.0.0", + "package_version": "1.1.0", "sdk_version": "7.8.0", "website": "https://ultimaker.com", "author": {