From 129c1ab3d4cd4c1dcfe103325af79798ade22f3f Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 29 Mar 2019 13:32:05 +0100 Subject: [PATCH] Fix welcome page buttons text not fitting On some operating systems the text would not fit due to different font rendering. Also, after translation, it probably wouldn't fit either. Usually we have the button size adjusting to the text inside it. The design didn't do this, either because it was too difficult to do in Zeplin, because the designer was lazy, or because the designer didn't know that this was the normal style in the rest of Cura. And the programmer took that over literally. Contributes to issue CURA-6057. --- .../qml/WelcomePages/AddNetworkOrLocalPrinterContent.qml | 2 -- resources/qml/WelcomePages/AddPrinterByIpContent.qml | 6 ------ resources/qml/WelcomePages/CloudContent.qml | 4 ---- resources/qml/WelcomePages/DataCollectionsContent.qml | 2 -- .../qml/WelcomePages/FirstStartMachineActionsContent.qml | 2 -- resources/qml/WelcomePages/UserAgreementContent.qml | 4 ---- resources/qml/WelcomePages/WelcomeContent.qml | 2 -- resources/qml/WelcomePages/WhatsNewContent.qml | 2 -- resources/themes/cura-light/theme.json | 1 - 9 files changed, 25 deletions(-) diff --git a/resources/qml/WelcomePages/AddNetworkOrLocalPrinterContent.qml b/resources/qml/WelcomePages/AddNetworkOrLocalPrinterContent.qml index 60b9089c82..86220bf7e7 100644 --- a/resources/qml/WelcomePages/AddNetworkOrLocalPrinterContent.qml +++ b/resources/qml/WelcomePages/AddNetworkOrLocalPrinterContent.qml @@ -125,8 +125,6 @@ Item } text: catalog.i18nc("@button", "Next") - width: UM.Theme.getSize("welcome_pages_button").width - fixedWidthMode: true onClicked: { // Create a network printer or a local printer according to the selection diff --git a/resources/qml/WelcomePages/AddPrinterByIpContent.qml b/resources/qml/WelcomePages/AddPrinterByIpContent.qml index 4fdffa5a79..c403fad159 100644 --- a/resources/qml/WelcomePages/AddPrinterByIpContent.qml +++ b/resources/qml/WelcomePages/AddPrinterByIpContent.qml @@ -96,8 +96,6 @@ Item anchors.top: parent.top anchors.right: parent.right anchors.margins: UM.Theme.getSize("default_margin").width - width: UM.Theme.getSize("action_button").width - fixedWidthMode: true text: catalog.i18nc("@button", "Add") onClicked: @@ -245,8 +243,6 @@ Item anchors.bottom: parent.bottom anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width text: catalog.i18nc("@button", "Cancel") - width: UM.Theme.getSize("action_button").width - fixedWidthMode: true onClicked: base.showPreviousPage() } @@ -257,8 +253,6 @@ Item anchors.bottom: parent.bottom anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width text: catalog.i18nc("@button", "Connect") - width: UM.Theme.getSize("action_button").width - fixedWidthMode: true onClicked: { CuraApplication.getDiscoveredPrintersModel().createMachineFromDiscoveredPrinterAddress( diff --git a/resources/qml/WelcomePages/CloudContent.qml b/resources/qml/WelcomePages/CloudContent.qml index 5ecda41a89..e2279f5ce1 100644 --- a/resources/qml/WelcomePages/CloudContent.qml +++ b/resources/qml/WelcomePages/CloudContent.qml @@ -103,8 +103,6 @@ Item anchors.bottom: parent.bottom anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width text: catalog.i18nc("@button", "Finish") - width: UM.Theme.getSize("welcome_pages_button").width - fixedWidthMode: true onClicked: base.showNextPage() } @@ -115,8 +113,6 @@ Item anchors.verticalCenter: finishButton.verticalCenter anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width text: catalog.i18nc("@button", "Create an account") - width: UM.Theme.getSize("welcome_pages_button").width - fixedWidthMode: true onClicked: Qt.openUrlExternally(CuraApplication.ultimakerCloudAccountRootUrl + "/app/create") } diff --git a/resources/qml/WelcomePages/DataCollectionsContent.qml b/resources/qml/WelcomePages/DataCollectionsContent.qml index 8b67e1fdeb..c63eb1839c 100644 --- a/resources/qml/WelcomePages/DataCollectionsContent.qml +++ b/resources/qml/WelcomePages/DataCollectionsContent.qml @@ -89,8 +89,6 @@ Item anchors.bottom: parent.bottom anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width text: catalog.i18nc("@button", "Next") - width: UM.Theme.getSize("welcome_pages_button").width - fixedWidthMode: true onClicked: base.showNextPage() } } diff --git a/resources/qml/WelcomePages/FirstStartMachineActionsContent.qml b/resources/qml/WelcomePages/FirstStartMachineActionsContent.qml index f1a178e018..b9cb0da0d7 100644 --- a/resources/qml/WelcomePages/FirstStartMachineActionsContent.qml +++ b/resources/qml/WelcomePages/FirstStartMachineActionsContent.qml @@ -73,8 +73,6 @@ Item anchors.bottom: parent.bottom anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width text: catalog.i18nc("@button", "Next") - width: UM.Theme.getSize("welcome_pages_button").width - fixedWidthMode: true onClicked: machineActionsModel.goToNextAction() } } diff --git a/resources/qml/WelcomePages/UserAgreementContent.qml b/resources/qml/WelcomePages/UserAgreementContent.qml index 62e30ebbf7..10f71be57b 100644 --- a/resources/qml/WelcomePages/UserAgreementContent.qml +++ b/resources/qml/WelcomePages/UserAgreementContent.qml @@ -61,8 +61,6 @@ Item anchors.bottom: parent.bottom anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width text: catalog.i18nc("@button", "Agree") - width: UM.Theme.getSize("welcome_pages_button").width - fixedWidthMode: true onClicked: { CuraApplication.writeToLog("i", "User accepted the User-Agreement.") @@ -78,8 +76,6 @@ Item anchors.bottom: parent.bottom anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width text: catalog.i18nc("@button", "Decline and close") - width: UM.Theme.getSize("welcome_pages_button").width - fixedWidthMode: true onClicked: { CuraApplication.writeToLog("i", "User declined the User Agreement.") diff --git a/resources/qml/WelcomePages/WelcomeContent.qml b/resources/qml/WelcomePages/WelcomeContent.qml index ed56dd36fd..bdaa0a0b48 100644 --- a/resources/qml/WelcomePages/WelcomeContent.qml +++ b/resources/qml/WelcomePages/WelcomeContent.qml @@ -57,8 +57,6 @@ Item anchors.horizontalCenter: parent.horizontalCenter anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width text: catalog.i18nc("@button", "Get started") - width: UM.Theme.getSize("welcome_pages_button").width - fixedWidthMode: true onClicked: base.showNextPage() } } diff --git a/resources/qml/WelcomePages/WhatsNewContent.qml b/resources/qml/WelcomePages/WhatsNewContent.qml index 298aaa7d4d..f089006926 100644 --- a/resources/qml/WelcomePages/WhatsNewContent.qml +++ b/resources/qml/WelcomePages/WhatsNewContent.qml @@ -67,8 +67,6 @@ Item anchors.bottom: parent.bottom anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width text: catalog.i18nc("@button", "Next") - width: UM.Theme.getSize("welcome_pages_button").width - fixedWidthMode: true onClicked: base.showNextPage() } } diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index ccd7a5dddf..62fca2b221 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -509,7 +509,6 @@ "button_icon": [2.5, 2.5], "button_lining": [0, 0], - "welcome_pages_button": [12.0, 2.5], "welcome_pages_default_margin": [2.5, 2.5], "action_button": [15.0, 2.5],