Replace Theme property accessors with getThing calls

This commit is contained in:
Arjen Hiemstra 2016-01-21 18:56:18 +01:00 committed by Ghostkeeper
parent c50c223124
commit 720324f0c6
15 changed files with 255 additions and 229 deletions

View file

@ -27,7 +27,7 @@ Item
{
id: pageDescription
anchors.top: pageTitle.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.topMargin: UM.Theme.getSize("default_margin").height
width: parent.width
wrapMode: Text.WordWrap
text: catalog.i18nc("@label","Firmware is the piece of software running directly on your 3D printer. This firmware controls the step motors, regulates the temperature and ultimately makes your printer work.")
@ -37,7 +37,7 @@ Item
{
id: upgradeText1
anchors.top: pageDescription.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.topMargin: UM.Theme.getSize("default_margin").height
width: parent.width
wrapMode: Text.WordWrap
text: catalog.i18nc("@label","The firmware shipping with new Ultimakers works, but upgrades have been made to make better prints, and make calibration easier.");
@ -47,16 +47,16 @@ Item
{
id: upgradeText2
anchors.top: upgradeText1.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.topMargin: UM.Theme.getSize("default_margin").height
width: parent.width
wrapMode: Text.WordWrap
text: catalog.i18nc("@label","Cura requires these new features and thus your firmware will most likely need to be upgraded. You can do so now.");
}
Item{
anchors.top: upgradeText2.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.topMargin: UM.Theme.getSize("default_margin").height
anchors.horizontalCenter: parent.horizontalCenter
width: upgradeButton.width + skipUpgradeButton.width + UM.Theme.sizes.default_margin.height < wizardPage.width ? upgradeButton.width + skipUpgradeButton.width + UM.Theme.sizes.default_margin.height : wizardPage.width
width: upgradeButton.width + skipUpgradeButton.width + UM.Theme.getSize("default_margin").height < wizardPage.width ? upgradeButton.width + skipUpgradeButton.width + UM.Theme.getSize("default_margin").height : wizardPage.width
Button {
id: upgradeButton
anchors.top: parent.top
@ -67,9 +67,9 @@ Item
Button {
id: skipUpgradeButton
anchors.top: parent.width < wizardPage.width ? parent.top : upgradeButton.bottom
anchors.topMargin: parent.width < wizardPage.width ? 0 : UM.Theme.sizes.default_margin.height/2
anchors.topMargin: parent.width < wizardPage.width ? 0 : UM.Theme.getSize("default_margin").height/2
anchors.left: parent.width < wizardPage.width ? upgradeButton.right : parent.left
anchors.leftMargin: parent.width < wizardPage.width ? UM.Theme.sizes.default_margin.width : 0
anchors.leftMargin: parent.width < wizardPage.width ? UM.Theme.getSize("default_margin").width : 0
text: catalog.i18nc("@action:button","Skip Upgrade");
onClicked: {
base.currentPage += 1