Browse Source

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.
Ghostkeeper 6 years ago
parent
commit
129c1ab3d4

+ 0 - 2
resources/qml/WelcomePages/AddNetworkOrLocalPrinterContent.qml

@@ -125,8 +125,6 @@ Item
         }
         }
 
 
         text: catalog.i18nc("@button", "Next")
         text: catalog.i18nc("@button", "Next")
-        width: UM.Theme.getSize("welcome_pages_button").width
-        fixedWidthMode: true
         onClicked:
         onClicked:
         {
         {
             // Create a network printer or a local printer according to the selection
             // Create a network printer or a local printer according to the selection

+ 0 - 6
resources/qml/WelcomePages/AddPrinterByIpContent.qml

@@ -96,8 +96,6 @@ Item
                     anchors.top: parent.top
                     anchors.top: parent.top
                     anchors.right: parent.right
                     anchors.right: parent.right
                     anchors.margins: UM.Theme.getSize("default_margin").width
                     anchors.margins: UM.Theme.getSize("default_margin").width
-                    width: UM.Theme.getSize("action_button").width
-                    fixedWidthMode: true
 
 
                     text: catalog.i18nc("@button", "Add")
                     text: catalog.i18nc("@button", "Add")
                     onClicked:
                     onClicked:
@@ -245,8 +243,6 @@ Item
         anchors.bottom: parent.bottom
         anchors.bottom: parent.bottom
         anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
         anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
         text: catalog.i18nc("@button", "Cancel")
         text: catalog.i18nc("@button", "Cancel")
-        width: UM.Theme.getSize("action_button").width
-        fixedWidthMode: true
         onClicked: base.showPreviousPage()
         onClicked: base.showPreviousPage()
     }
     }
 
 
@@ -257,8 +253,6 @@ Item
         anchors.bottom: parent.bottom
         anchors.bottom: parent.bottom
         anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
         anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
         text: catalog.i18nc("@button", "Connect")
         text: catalog.i18nc("@button", "Connect")
-        width: UM.Theme.getSize("action_button").width
-        fixedWidthMode: true
         onClicked:
         onClicked:
         {
         {
             CuraApplication.getDiscoveredPrintersModel().createMachineFromDiscoveredPrinterAddress(
             CuraApplication.getDiscoveredPrintersModel().createMachineFromDiscoveredPrinterAddress(

+ 0 - 4
resources/qml/WelcomePages/CloudContent.qml

@@ -103,8 +103,6 @@ Item
         anchors.bottom: parent.bottom
         anchors.bottom: parent.bottom
         anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
         anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
         text: catalog.i18nc("@button", "Finish")
         text: catalog.i18nc("@button", "Finish")
-        width: UM.Theme.getSize("welcome_pages_button").width
-        fixedWidthMode: true
         onClicked: base.showNextPage()
         onClicked: base.showNextPage()
     }
     }
 
 
@@ -115,8 +113,6 @@ Item
         anchors.verticalCenter: finishButton.verticalCenter
         anchors.verticalCenter: finishButton.verticalCenter
         anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
         anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
         text: catalog.i18nc("@button", "Create an account")
         text: catalog.i18nc("@button", "Create an account")
-        width: UM.Theme.getSize("welcome_pages_button").width
-        fixedWidthMode: true
         onClicked: Qt.openUrlExternally(CuraApplication.ultimakerCloudAccountRootUrl + "/app/create")
         onClicked: Qt.openUrlExternally(CuraApplication.ultimakerCloudAccountRootUrl + "/app/create")
     }
     }
 
 

+ 0 - 2
resources/qml/WelcomePages/DataCollectionsContent.qml

@@ -89,8 +89,6 @@ Item
         anchors.bottom: parent.bottom
         anchors.bottom: parent.bottom
         anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
         anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
         text: catalog.i18nc("@button", "Next")
         text: catalog.i18nc("@button", "Next")
-        width: UM.Theme.getSize("welcome_pages_button").width
-        fixedWidthMode: true
         onClicked: base.showNextPage()
         onClicked: base.showNextPage()
     }
     }
 }
 }

+ 0 - 2
resources/qml/WelcomePages/FirstStartMachineActionsContent.qml

@@ -73,8 +73,6 @@ Item
         anchors.bottom: parent.bottom
         anchors.bottom: parent.bottom
         anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
         anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
         text: catalog.i18nc("@button", "Next")
         text: catalog.i18nc("@button", "Next")
-        width: UM.Theme.getSize("welcome_pages_button").width
-        fixedWidthMode: true
         onClicked: machineActionsModel.goToNextAction()
         onClicked: machineActionsModel.goToNextAction()
     }
     }
 }
 }

+ 0 - 4
resources/qml/WelcomePages/UserAgreementContent.qml

@@ -61,8 +61,6 @@ Item
         anchors.bottom: parent.bottom
         anchors.bottom: parent.bottom
         anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
         anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
         text: catalog.i18nc("@button", "Agree")
         text: catalog.i18nc("@button", "Agree")
-        width: UM.Theme.getSize("welcome_pages_button").width
-        fixedWidthMode: true
         onClicked:
         onClicked:
         {
         {
             CuraApplication.writeToLog("i", "User accepted the User-Agreement.")
             CuraApplication.writeToLog("i", "User accepted the User-Agreement.")
@@ -78,8 +76,6 @@ Item
         anchors.bottom: parent.bottom
         anchors.bottom: parent.bottom
         anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
         anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
         text: catalog.i18nc("@button", "Decline and close")
         text: catalog.i18nc("@button", "Decline and close")
-        width: UM.Theme.getSize("welcome_pages_button").width
-        fixedWidthMode: true
         onClicked:
         onClicked:
         {
         {
             CuraApplication.writeToLog("i", "User declined the User Agreement.")
             CuraApplication.writeToLog("i", "User declined the User Agreement.")

+ 0 - 2
resources/qml/WelcomePages/WelcomeContent.qml

@@ -57,8 +57,6 @@ Item
             anchors.horizontalCenter: parent.horizontalCenter
             anchors.horizontalCenter: parent.horizontalCenter
             anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
             anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
             text: catalog.i18nc("@button", "Get started")
             text: catalog.i18nc("@button", "Get started")
-            width: UM.Theme.getSize("welcome_pages_button").width
-            fixedWidthMode: true
             onClicked: base.showNextPage()
             onClicked: base.showNextPage()
         }
         }
     }
     }

+ 0 - 2
resources/qml/WelcomePages/WhatsNewContent.qml

@@ -67,8 +67,6 @@ Item
         anchors.bottom: parent.bottom
         anchors.bottom: parent.bottom
         anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
         anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
         text: catalog.i18nc("@button", "Next")
         text: catalog.i18nc("@button", "Next")
-        width: UM.Theme.getSize("welcome_pages_button").width
-        fixedWidthMode: true
         onClicked: base.showNextPage()
         onClicked: base.showNextPage()
     }
     }
 }
 }

+ 0 - 1
resources/themes/cura-light/theme.json

@@ -509,7 +509,6 @@
         "button_icon": [2.5, 2.5],
         "button_icon": [2.5, 2.5],
         "button_lining": [0, 0],
         "button_lining": [0, 0],
 
 
-        "welcome_pages_button": [12.0, 2.5],
         "welcome_pages_default_margin": [2.5, 2.5],
         "welcome_pages_default_margin": [2.5, 2.5],
 
 
         "action_button": [15.0, 2.5],
         "action_button": [15.0, 2.5],