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.
This commit is contained in:
Ghostkeeper 2019-03-29 13:32:05 +01:00
parent 3ca8ba421a
commit 129c1ab3d4
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276
9 changed files with 0 additions and 25 deletions

View file

@ -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

View file

@ -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(

View file

@ -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")
}

View file

@ -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()
}
}

View file

@ -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()
}
}

View file

@ -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.")

View file

@ -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()
}
}

View file

@ -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()
}
}

View file

@ -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],