From 5028290e0dd91af204b56c1d8652931e2293c4b4 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 29 Mar 2019 13:36:05 +0100 Subject: [PATCH] Remove welcome_pages_default_margin theme entry Use the wide margin instead. It's practically the same, nobody is going to notice. It still looks spacey and nice, and it's more consistent with the rest of the interface. We had previously agreed that we will not make any new widget-specific theme entries any more. Contributes to issue CURA-6057. --- .../WelcomePages/AddNetworkOrLocalPrinterContent.qml | 4 ++-- resources/qml/WelcomePages/AddPrinterByIpContent.qml | 6 +++--- resources/qml/WelcomePages/CloudContent.qml | 8 ++++---- resources/qml/WelcomePages/DataCollectionsContent.qml | 8 ++++---- .../WelcomePages/FirstStartMachineActionsContent.qml | 4 ++-- resources/qml/WelcomePages/UserAgreementContent.qml | 10 +++++----- resources/qml/WelcomePages/WelcomeContent.qml | 6 +++--- resources/qml/WelcomePages/WhatsNewContent.qml | 8 ++++---- resources/themes/cura-light/theme.json | 2 -- 9 files changed, 27 insertions(+), 29 deletions(-) diff --git a/resources/qml/WelcomePages/AddNetworkOrLocalPrinterContent.qml b/resources/qml/WelcomePages/AddNetworkOrLocalPrinterContent.qml index 86220bf7e7..91380c38dd 100644 --- a/resources/qml/WelcomePages/AddNetworkOrLocalPrinterContent.qml +++ b/resources/qml/WelcomePages/AddNetworkOrLocalPrinterContent.qml @@ -19,7 +19,7 @@ Item { id: titleLabel anchors.top: parent.top - anchors.topMargin: UM.Theme.getSize("welcome_pages_default_margin").height + anchors.topMargin: UM.Theme.getSize("wide_margin").height anchors.horizontalCenter: parent.horizontalCenter horizontalAlignment: Text.AlignHCenter text: catalog.i18nc("@label", "Add a printer") @@ -110,7 +110,7 @@ Item id: nextButton anchors.right: parent.right anchors.bottom: parent.bottom - anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width + anchors.margins: UM.Theme.getSize("wide_margin").width enabled: { // If the network printer dropdown is expanded, make sure that there is a selected item diff --git a/resources/qml/WelcomePages/AddPrinterByIpContent.qml b/resources/qml/WelcomePages/AddPrinterByIpContent.qml index c403fad159..b0085c1774 100644 --- a/resources/qml/WelcomePages/AddPrinterByIpContent.qml +++ b/resources/qml/WelcomePages/AddPrinterByIpContent.qml @@ -29,7 +29,7 @@ Item { id: titleLabel anchors.top: parent.top - anchors.topMargin: UM.Theme.getSize("welcome_pages_default_margin").height + anchors.topMargin: UM.Theme.getSize("wide_margin").height anchors.horizontalCenter: parent.horizontalCenter horizontalAlignment: Text.AlignHCenter text: catalog.i18nc("@label", "Add printer by IP address") @@ -241,7 +241,7 @@ Item id: backButton anchors.left: parent.left anchors.bottom: parent.bottom - anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width + anchors.margins: UM.Theme.getSize("wide_margin").width text: catalog.i18nc("@button", "Cancel") onClicked: base.showPreviousPage() } @@ -251,7 +251,7 @@ Item id: connectButton anchors.right: parent.right anchors.bottom: parent.bottom - anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width + anchors.margins: UM.Theme.getSize("wide_margin").width text: catalog.i18nc("@button", "Connect") onClicked: { diff --git a/resources/qml/WelcomePages/CloudContent.qml b/resources/qml/WelcomePages/CloudContent.qml index e2279f5ce1..c4eb9db714 100644 --- a/resources/qml/WelcomePages/CloudContent.qml +++ b/resources/qml/WelcomePages/CloudContent.qml @@ -19,7 +19,7 @@ Item { id: titleLabel anchors.top: parent.top - anchors.topMargin: UM.Theme.getSize("welcome_pages_default_margin").height + anchors.topMargin: UM.Theme.getSize("wide_margin").height anchors.horizontalCenter: parent.horizontalCenter horizontalAlignment: Text.AlignHCenter text: catalog.i18nc("@label", "Ultimaker Cloud") @@ -101,7 +101,7 @@ Item id: finishButton anchors.right: parent.right anchors.bottom: parent.bottom - anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width + anchors.margins: UM.Theme.getSize("wide_margin").width text: catalog.i18nc("@button", "Finish") onClicked: base.showNextPage() } @@ -111,7 +111,7 @@ Item id: createAccountButton anchors.left: parent.left anchors.verticalCenter: finishButton.verticalCenter - anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width + anchors.margins: UM.Theme.getSize("wide_margin").width text: catalog.i18nc("@button", "Create an account") onClicked: Qt.openUrlExternally(CuraApplication.ultimakerCloudAccountRootUrl + "/app/create") } @@ -121,7 +121,7 @@ Item id: signInButton anchors.left: createAccountButton.right anchors.verticalCenter: finishButton.verticalCenter - anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width + anchors.margins: UM.Theme.getSize("wide_margin").width text: catalog.i18nc("@button", "Sign in") color: UM.Theme.getColor("secondary_button_text") font: UM.Theme.getFont("medium") diff --git a/resources/qml/WelcomePages/DataCollectionsContent.qml b/resources/qml/WelcomePages/DataCollectionsContent.qml index c63eb1839c..79e4b0e3de 100644 --- a/resources/qml/WelcomePages/DataCollectionsContent.qml +++ b/resources/qml/WelcomePages/DataCollectionsContent.qml @@ -19,7 +19,7 @@ Item { id: titleLabel anchors.top: parent.top - anchors.topMargin: UM.Theme.getSize("welcome_pages_default_margin").height + anchors.topMargin: UM.Theme.getSize("wide_margin").height anchors.horizontalCenter: parent.horizontalCenter horizontalAlignment: Text.AlignHCenter text: catalog.i18nc("@label", "Help us to improve Ultimaker Cura") @@ -36,14 +36,14 @@ Item anchors.bottom: getStartedButton.top anchors.left: parent.left anchors.right: parent.right - anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width + anchors.margins: UM.Theme.getSize("wide_margin").width Column { anchors.centerIn: parent width: parent.width - spacing: UM.Theme.getSize("welcome_pages_default_margin").height + spacing: UM.Theme.getSize("wide_margin").height Image { @@ -87,7 +87,7 @@ Item id: getStartedButton anchors.right: parent.right anchors.bottom: parent.bottom - anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width + anchors.margins: UM.Theme.getSize("wide_margin").width text: catalog.i18nc("@button", "Next") onClicked: base.showNextPage() } diff --git a/resources/qml/WelcomePages/FirstStartMachineActionsContent.qml b/resources/qml/WelcomePages/FirstStartMachineActionsContent.qml index b9cb0da0d7..7bf3d369b5 100644 --- a/resources/qml/WelcomePages/FirstStartMachineActionsContent.qml +++ b/resources/qml/WelcomePages/FirstStartMachineActionsContent.qml @@ -40,7 +40,7 @@ Item { id: titleLabel anchors.top: parent.top - anchors.topMargin: UM.Theme.getSize("welcome_pages_default_margin").height + anchors.topMargin: UM.Theme.getSize("wide_margin").height anchors.horizontalCenter: parent.horizontalCenter horizontalAlignment: Text.AlignHCenter text: machineActionsModel.currentItem.title == undefined ? "" : machineActionsModel.currentItem.title @@ -71,7 +71,7 @@ Item id: nextButton anchors.right: parent.right anchors.bottom: parent.bottom - anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width + anchors.margins: UM.Theme.getSize("wide_margin").width text: catalog.i18nc("@button", "Next") onClicked: machineActionsModel.goToNextAction() } diff --git a/resources/qml/WelcomePages/UserAgreementContent.qml b/resources/qml/WelcomePages/UserAgreementContent.qml index 10f71be57b..a1a197df54 100644 --- a/resources/qml/WelcomePages/UserAgreementContent.qml +++ b/resources/qml/WelcomePages/UserAgreementContent.qml @@ -18,7 +18,7 @@ Item { id: titleLabel anchors.top: parent.top - anchors.topMargin: UM.Theme.getSize("welcome_pages_default_margin").height + anchors.topMargin: UM.Theme.getSize("wide_margin").height anchors.horizontalCenter: parent.horizontalCenter horizontalAlignment: Text.AlignHCenter text: catalog.i18nc("@label", "User Agreement") @@ -33,13 +33,13 @@ Item anchors.bottom: agreeButton.top anchors.left: parent.left anchors.right: parent.right - anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width + anchors.margins: UM.Theme.getSize("wide_margin").width Label { id: disclaimerLineLabel anchors.centerIn: parent - anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width + anchors.margins: UM.Theme.getSize("wide_margin").width width: (parent.width * 2 / 3) | 0 @@ -59,7 +59,7 @@ Item id: agreeButton anchors.right: parent.right anchors.bottom: parent.bottom - anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width + anchors.margins: UM.Theme.getSize("wide_margin").width text: catalog.i18nc("@button", "Agree") onClicked: { @@ -74,7 +74,7 @@ Item id: declineButton anchors.left: parent.left anchors.bottom: parent.bottom - anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width + anchors.margins: UM.Theme.getSize("wide_margin").width text: catalog.i18nc("@button", "Decline and close") onClicked: { diff --git a/resources/qml/WelcomePages/WelcomeContent.qml b/resources/qml/WelcomePages/WelcomeContent.qml index bdaa0a0b48..454c5585e2 100644 --- a/resources/qml/WelcomePages/WelcomeContent.qml +++ b/resources/qml/WelcomePages/WelcomeContent.qml @@ -15,13 +15,13 @@ Item { UM.I18nCatalog { id: catalog; name: "cura" } - anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width + anchors.margins: UM.Theme.getSize("wide_margin").width Column // Arrange the items vertically and put everything in the center { anchors.centerIn: parent width: parent.width - spacing: UM.Theme.getSize("welcome_pages_default_margin").height + spacing: UM.Theme.getSize("wide_margin").height Label { @@ -55,7 +55,7 @@ Item { id: getStartedButton anchors.horizontalCenter: parent.horizontalCenter - anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width + anchors.margins: UM.Theme.getSize("wide_margin").width text: catalog.i18nc("@button", "Get started") onClicked: base.showNextPage() } diff --git a/resources/qml/WelcomePages/WhatsNewContent.qml b/resources/qml/WelcomePages/WhatsNewContent.qml index f089006926..17bbe04f6f 100644 --- a/resources/qml/WelcomePages/WhatsNewContent.qml +++ b/resources/qml/WelcomePages/WhatsNewContent.qml @@ -19,7 +19,7 @@ Item { id: titleLabel anchors.top: parent.top - anchors.topMargin: UM.Theme.getSize("welcome_pages_default_margin").height + anchors.topMargin: UM.Theme.getSize("wide_margin").height anchors.horizontalCenter: parent.horizontalCenter horizontalAlignment: Text.AlignHCenter text: catalog.i18nc("@label", "What's new in Ultimaker Cura") @@ -32,8 +32,8 @@ Item { anchors.top: titleLabel.bottom anchors.bottom: getStartedButton.top - anchors.topMargin: UM.Theme.getSize("welcome_pages_default_margin").height - anchors.bottomMargin: UM.Theme.getSize("welcome_pages_default_margin").height + anchors.topMargin: UM.Theme.getSize("wide_margin").height + anchors.bottomMargin: UM.Theme.getSize("wide_margin").height anchors.horizontalCenter: parent.horizontalCenter width: (parent.width * 3 / 4) | 0 @@ -65,7 +65,7 @@ Item id: getStartedButton anchors.right: parent.right anchors.bottom: parent.bottom - anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width + anchors.margins: UM.Theme.getSize("wide_margin").width text: catalog.i18nc("@button", "Next") onClicked: base.showNextPage() } diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 62fca2b221..e6a9d495a2 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -509,8 +509,6 @@ "button_icon": [2.5, 2.5], "button_lining": [0, 0], - "welcome_pages_default_margin": [2.5, 2.5], - "action_button": [15.0, 2.5], "action_button_icon": [1.0, 1.0], "action_button_radius": [0.15, 0.15],