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

@ -38,7 +38,7 @@ UM.Dialog
id: version
text: "Cura %1".arg(UM.Application.version)
font: UM.Theme.fonts.large
font: UM.Theme.getFont("large")
anchors.horizontalCenter : logo.horizontalCenter
anchors.horizontalCenterOffset : (logo.width * 0.25)
anchors.top: logo.bottom

View file

@ -337,8 +337,8 @@ UM.MainWindow
{
bottom: parent.bottom;
right: sidebar.left;
bottomMargin: UM.Theme.sizes.default_margin.height;
rightMargin: UM.Theme.sizes.default_margin.width;
bottomMargin: UM.Theme.getSize("default_margin").height;
rightMargin: UM.Theme.getSize("default_margin").width;
}
}
@ -347,7 +347,7 @@ UM.MainWindow
anchors
{
horizontalCenter: parent.horizontalCenter
horizontalCenterOffset: -(UM.Theme.sizes.sidebar.width/ 2)
horizontalCenterOffset: -(UM.Theme.getSize("sidebar").width/ 2)
top: parent.verticalCenter;
bottom: parent.bottom;
}
@ -361,10 +361,10 @@ UM.MainWindow
//anchors.right: parent.right;
//anchors.bottom: parent.bottom
anchors.top: viewModeButton.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height;
anchors.topMargin: UM.Theme.getSize("default_margin").height;
anchors.left: viewModeButton.left;
//anchors.bottom: buttons.top;
//anchors.bottomMargin: UM.Theme.sizes.default_margin.height;
//anchors.bottomMargin: UM.Theme.getSize("default_margin").height;
height: childrenRect.height;
@ -376,15 +376,15 @@ UM.MainWindow
id: openFileButton;
//style: UM.Backend.progress < 0 ? UM.Theme.styles.open_file_button : UM.Theme.styles.tool_button;
text: catalog.i18nc("@action:button","Open File");
iconSource: UM.Theme.icons.load
iconSource: UM.Theme.getIcon("load")
style: UM.Theme.styles.tool_button
tooltip: '';
anchors
{
top: parent.top;
//topMargin: UM.Theme.sizes.loadfile_margin.height
//topMargin: UM.Theme.getSize("loadfile_margin").height
left: parent.left;
//leftMargin: UM.Theme.sizes.loadfile_margin.width
//leftMargin: UM.Theme.getSize("loadfile_margin").width
}
action: actions.open;
}
@ -395,14 +395,14 @@ UM.MainWindow
anchors
{
left: parent.left
leftMargin: UM.Theme.sizes.default_margin.width;
leftMargin: UM.Theme.getSize("default_margin").width;
bottom: parent.bottom
bottomMargin: UM.Theme.sizes.default_margin.height;
bottomMargin: UM.Theme.getSize("default_margin").height;
}
source: UM.Theme.images.logo;
width: UM.Theme.sizes.logo.width;
height: UM.Theme.sizes.logo.height;
width: UM.Theme.getSize("logo").width;
height: UM.Theme.getSize("logo").height;
z: -1;
sourceSize.width: width;
@ -416,11 +416,11 @@ UM.MainWindow
anchors
{
top: toolbar.bottom;
topMargin: UM.Theme.sizes.window_margin.height;
topMargin: UM.Theme.getSize("window_margin").height;
left: parent.left;
}
text: catalog.i18nc("@action:button","View Mode");
iconSource: UM.Theme.icons.viewmode;
iconSource: UM.Theme.getIcon("viewmode");
style: UM.Theme.styles.tool_button;
tooltip: '';
@ -453,7 +453,7 @@ UM.MainWindow
anchors {
top: openFileButton.bottom;
topMargin: UM.Theme.sizes.window_margin.height;
topMargin: UM.Theme.getSize("window_margin").height;
left: parent.left;
}
}
@ -469,7 +469,7 @@ UM.MainWindow
right: parent.right;
}
width: UM.Theme.sizes.sidebar.width;
width: UM.Theme.getSize("sidebar").width;
addMachineAction: actions.addMachine;
configureMachinesAction: actions.configureMachines;
@ -479,8 +479,8 @@ UM.MainWindow
Rectangle
{
x: base.mouseX + UM.Theme.sizes.default_margin.width;
y: base.mouseY + UM.Theme.sizes.default_margin.height;
x: base.mouseX + UM.Theme.getSize("default_margin").width;
y: base.mouseY + UM.Theme.getSize("default_margin").height;
width: childrenRect.width;
height: childrenRect.height;

View file

@ -25,7 +25,7 @@ Rectangle {
property variant printDuration: PrintInformation.currentPrintTime;
property real printMaterialAmount: PrintInformation.materialAmount;
width: UM.Theme.sizes.jobspecs.width
width: UM.Theme.getSize("jobspecs").width
height: childrenRect.height
color: "transparent"
@ -80,7 +80,7 @@ Rectangle {
id: jobNameRow
anchors.top: parent.top
anchors.right: parent.right
height: UM.Theme.sizes.jobspecs_line.height
height: UM.Theme.getSize("jobspecs_line").height
visible: base.activity
Item
@ -93,8 +93,8 @@ Rectangle {
id: printJobPencilIcon
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
width: UM.Theme.sizes.save_button_specs_icons.width
height: UM.Theme.sizes.save_button_specs_icons.height
width: UM.Theme.getSize("save_button_specs_icons").width
height: UM.Theme.getSize("save_button_specs_icons").height
onClicked:
{
@ -108,12 +108,12 @@ Rectangle {
color: "transparent"
UM.RecolorImage
{
width: UM.Theme.sizes.save_button_specs_icons.width
height: UM.Theme.sizes.save_button_specs_icons.height
width: UM.Theme.getSize("save_button_specs_icons").width
height: UM.Theme.getSize("save_button_specs_icons").height
sourceSize.width: width
sourceSize.height: width
color: control.hovered ? UM.Theme.colors.setting_control_button_hover : UM.Theme.colors.text
source: UM.Theme.icons.pencil;
color: control.hovered ? UM.Theme.getColor("setting_control_button_hover") : UM.Theme.getColor("text");
source: UM.Theme.getIcon("pencil");
}
}
}
@ -123,8 +123,8 @@ Rectangle {
{
id: printJobTextfield
anchors.right: printJobPencilIcon.left
anchors.rightMargin: UM.Theme.sizes.default_margin.width/2
height: UM.Theme.sizes.jobspecs_line.height
anchors.rightMargin: UM.Theme.getSize("default_margin").width/2
height: UM.Theme.getSize("jobspecs_line").height
width: base.width
property int unremovableSpacing: 5
text: ''
@ -144,8 +144,8 @@ Rectangle {
regExp: /^[^\\ \/ \.]*$/
}
style: TextFieldStyle{
textColor: UM.Theme.colors.setting_control_text;
font: UM.Theme.fonts.default_bold;
textColor: UM.Theme.getColor("setting_control_text");
font: UM.Theme.getFont("default_bold");
background: Rectangle {
opacity: 0
border.width: 0
@ -159,10 +159,10 @@ Rectangle {
id: boundingSpec
anchors.top: jobNameRow.bottom
anchors.right: parent.right
height: UM.Theme.sizes.jobspecs_line.height
height: UM.Theme.getSize("jobspecs_line").height
verticalAlignment: Text.AlignVCenter
font: UM.Theme.fonts.small
color: UM.Theme.colors.text_subtext
font: UM.Theme.getFont("small")
color: UM.Theme.getColor("text_subtext")
text: Printer.getSceneBoundingBoxString
}
@ -170,7 +170,7 @@ Rectangle {
id: specsRow
anchors.top: boundingSpec.bottom
anchors.right: parent.right
height: UM.Theme.sizes.jobspecs_line.height
height: UM.Theme.getSize("jobspecs_line").height
Item{
width: parent.width
@ -179,42 +179,42 @@ Rectangle {
UM.RecolorImage {
id: timeIcon
anchors.right: timeSpec.left
anchors.rightMargin: UM.Theme.sizes.default_margin.width/2
anchors.rightMargin: UM.Theme.getSize("default_margin").width/2
anchors.verticalCenter: parent.verticalCenter
width: UM.Theme.sizes.save_button_specs_icons.width
height: UM.Theme.sizes.save_button_specs_icons.height
width: UM.Theme.getSize("save_button_specs_icons").width
height: UM.Theme.getSize("save_button_specs_icons").height
sourceSize.width: width
sourceSize.height: width
color: UM.Theme.colors.text_subtext
source: UM.Theme.icons.print_time;
color: UM.Theme.getColor("text_subtext")
source: UM.Theme.getIcon("print_time");
}
Label{
id: timeSpec
anchors.right: lengthIcon.left
anchors.rightMargin: UM.Theme.sizes.default_margin.width
anchors.rightMargin: UM.Theme.getSize("default_margin").width
anchors.verticalCenter: parent.verticalCenter
font: UM.Theme.fonts.small
color: UM.Theme.colors.text_subtext
font: UM.Theme.getFont("small")
color: UM.Theme.getColor("text_subtext")
text: (!base.printDuration || !base.printDuration.valid) ? catalog.i18nc("@label", "00h 00min") : base.printDuration.getDisplayString(UM.DurationFormat.Short)
}
UM.RecolorImage {
id: lengthIcon
anchors.right: lengthSpec.left
anchors.rightMargin: UM.Theme.sizes.default_margin.width/2
anchors.rightMargin: UM.Theme.getSize("default_margin").width/2
anchors.verticalCenter: parent.verticalCenter
width: UM.Theme.sizes.save_button_specs_icons.width
height: UM.Theme.sizes.save_button_specs_icons.height
width: UM.Theme.getSize("save_button_specs_icons").width
height: UM.Theme.getSize("save_button_specs_icons").height
sourceSize.width: width
sourceSize.height: width
color: UM.Theme.colors.text_subtext
source: UM.Theme.icons.category_material;
color: UM.Theme.getColor("text_subtext")
source: UM.Theme.getIcon("category_material");
}
Label{
id: lengthSpec
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
font: UM.Theme.fonts.small
color: UM.Theme.colors.text_subtext
font: UM.Theme.getFont("small")
color: UM.Theme.getColor("text_subtext")
text: base.printMaterialAmount <= 0 ? catalog.i18nc("@label", "0.0 m") : catalog.i18nc("@label", "%1 m").arg(base.printMaterialAmount)
}
}

View file

@ -18,18 +18,18 @@ Item{
Rectangle{
id: globalProfileRow
anchors.top: base.top
height: UM.Theme.sizes.sidebar_setup.height
height: UM.Theme.getSize("sidebar_setup").height
width: base.width
Label{
id: globalProfileLabel
anchors.left: parent.left
anchors.leftMargin: UM.Theme.sizes.default_margin.width;
anchors.leftMargin: UM.Theme.getSize("default_margin").width;
anchors.verticalCenter: parent.verticalCenter
text: catalog.i18nc("@label","Profile:");
width: parent.width/100*45
font: UM.Theme.fonts.default;
color: UM.Theme.colors.text;
font: UM.Theme.getFont("default");
color: UM.Theme.getColor("text");
}
@ -37,9 +37,9 @@ Item{
id: globalProfileSelection
text: UM.MachineManager.activeProfile
width: parent.width/100*55
height: UM.Theme.sizes.setting_control.height
height: UM.Theme.getSize("setting_control").height
anchors.right: parent.right
anchors.rightMargin: UM.Theme.sizes.default_margin.width
anchors.rightMargin: UM.Theme.getSize("default_margin").width
anchors.verticalCenter: parent.verticalCenter
tooltip: UM.MachineManager.activeProfile
style: UM.Theme.styles.sidebar_header_button

View file

@ -16,7 +16,7 @@ Rectangle {
property int backendState: UM.Backend.state;
property bool activity: Printer.getPlatformActivity;
//Behavior on progress { NumberAnimation { duration: 250; } }
property int totalHeight: childrenRect.height + UM.Theme.sizes.default_margin.height
property int totalHeight: childrenRect.height + UM.Theme.getSize("default_margin").height
property string fileBaseName
property string statusText: {
if(base.backendState == 0) {
@ -34,33 +34,39 @@ Rectangle {
Label {
id: statusLabel
width: parent.width - 2 * UM.Theme.sizes.default_margin.width
width: parent.width - 2 * UM.Theme.getSize("default_margin").width
anchors.top: parent.top
anchors.left: parent.left
anchors.leftMargin: UM.Theme.sizes.default_margin.width
anchors.leftMargin: UM.Theme.getSize("default_margin").width
color: UM.Theme.colors.text
font: UM.Theme.fonts.large
color: UM.Theme.getColor("text")
font: UM.Theme.getFont("large")
text: statusText;
}
Rectangle{
id: progressBar
width: parent.width - 2 * UM.Theme.sizes.default_margin.width
height: UM.Theme.sizes.progressbar.height
width: parent.width - 2 * UM.Theme.getSize("default_margin").width
height: UM.Theme.getSize("progressbar").height
anchors.top: statusLabel.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height/4
anchors.topMargin: UM.Theme.getSize("default_margin").height/4
anchors.left: parent.left
anchors.leftMargin: UM.Theme.sizes.default_margin.width
radius: UM.Theme.sizes.progressbar_radius.width
color: UM.Theme.colors.progressbar_background
anchors.leftMargin: UM.Theme.getSize("default_margin").width
radius: UM.Theme.getSize("progressbar_radius").width
color: UM.Theme.getColor("progressbar_background")
Rectangle{
width: Math.max(parent.width * base.progress)
height: parent.height
<<<<<<< 041fa2b3592e015eebe779169c9d7f4565b3a788
color: UM.Theme.colors.progressbar_control
radius: UM.Theme.sizes.progressbar_radius.width
visible: base.backendState == 1 ? true : false
=======
color: UM.Theme.getColor("progressbar_control")
radius: UM.Theme.getSize("progressbar_radius").width
visible: base.progress > 0.99 ? false : true
>>>>>>> Replace Theme property accessors with getThing calls
}
}
@ -69,16 +75,16 @@ Rectangle {
width: base.width
height: saveToButton.height
anchors.top: progressBar.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.topMargin: UM.Theme.getSize("default_margin").height
anchors.left: parent.left
Button {
id: saveToButton
property int resizedWidth
x: base.width - saveToButton.resizedWidth - UM.Theme.sizes.default_margin.width - UM.Theme.sizes.save_button_save_to_button.height + UM.Theme.sizes.save_button_save_to_button.width
x: base.width - saveToButton.resizedWidth - UM.Theme.getSize("default_margin").width - UM.Theme.getSize("save_button_save_to_button").height + UM.Theme.getSize("save_button_save_to_button").width
tooltip: UM.OutputDeviceManager.activeDeviceDescription;
enabled: base.backendState == 2 && base.activity == true
height: UM.Theme.sizes.save_button_save_to_button.height
height: UM.Theme.getSize("save_button_save_to_button").height
width: 150
anchors.top:parent.top
text: UM.OutputDeviceManager.activeDeviceShortDescription
@ -91,26 +97,26 @@ Rectangle {
background: Rectangle {
//opacity: control.enabled ? 1.0 : 0.5
//Behavior on opacity { NumberAnimation { duration: 50; } }
border.width: UM.Theme.sizes.default_lining.width
border.color: !control.enabled ? UM.Theme.colors.action_button_disabled_border :
control.pressed ? UM.Theme.colors.action_button_active_border :
control.hovered ? UM.Theme.colors.action_button_hovered_border : UM.Theme.colors.action_button_border
color: !control.enabled ? UM.Theme.colors.action_button_disabled :
control.pressed ? UM.Theme.colors.action_button_active :
control.hovered ? UM.Theme.colors.action_button_hovered : UM.Theme.colors.action_button
border.width: UM.Theme.getSize("default_lining").width
border.color: !control.enabled ? UM.Theme.getColor("action_button_disabled_border") :
control.pressed ? UM.Theme.getColor("action_button_active_border") :
control.hovered ? UM.Theme.getColor("action_button_hovered_border") : UM.Theme.getColor("action_button_border")
color: !control.enabled ? UM.Theme.getColor("action_button_disabled") :
control.pressed ? UM.Theme.getColor("action_button_active") :
control.hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button")
Behavior on color { ColorAnimation { duration: 50; } }
width: {
saveToButton.resizedWidth = actualLabel.width + (UM.Theme.sizes.default_margin.width * 2)
saveToButton.resizedWidth = actualLabel.width + (UM.Theme.getSize("default_margin").width * 2)
return saveToButton.resizedWidth
}
Label {
id: actualLabel
//Behavior on opacity { NumberAnimation { duration: 50; } }
anchors.centerIn: parent
color: !control.enabled ? UM.Theme.colors.action_button_disabled_text :
control.pressed ? UM.Theme.colors.action_button_active_text :
control.hovered ? UM.Theme.colors.action_button_hovered_text : UM.Theme.colors.action_button_text
font: UM.Theme.fonts.action_button
color: !control.enabled ? UM.Theme.getColor("action_button_disabled_text") :
control.pressed ? UM.Theme.getColor("action_button_active_text") :
control.hovered ? UM.Theme.getColor("action_button_hovered_text") : UM.Theme.getColor("action_button_text")
font: UM.Theme.getFont("action_button")
text: control.text;
}
}
@ -123,39 +129,40 @@ Rectangle {
tooltip: catalog.i18nc("@info:tooltip","Select the active output device");
anchors.top:parent.top
anchors.right: parent.right
anchors.rightMargin: UM.Theme.sizes.default_margin.width
width: UM.Theme.sizes.save_button_save_to_button.height
height: UM.Theme.sizes.save_button_save_to_button.height
anchors.rightMargin: UM.Theme.getSize("default_margin").width
width: UM.Theme.getSize("save_button_save_to_button").height
height: UM.Theme.getSize("save_button_save_to_button").height
enabled: base.backendState == 2 && base.activity == true
//iconSource: UM.Theme.icons[UM.OutputDeviceManager.activeDeviceIconName];
style: ButtonStyle {
background: Rectangle {
id: deviceSelectionIcon
border.width: UM.Theme.sizes.default_lining.width
border.color: !control.enabled ? UM.Theme.colors.action_button_disabled_border :
control.pressed ? UM.Theme.colors.action_button_active_border :
control.hovered ? UM.Theme.colors.action_button_hovered_border : UM.Theme.colors.action_button_border
color: !control.enabled ? UM.Theme.colors.action_button_disabled :
control.pressed ? UM.Theme.colors.action_button_active :
control.hovered ? UM.Theme.colors.action_button_hovered : UM.Theme.colors.action_button
border.width: UM.Theme.getSize("default_lining").width
border.color: !control.enabled ? UM.Theme.getColor("action_button_disabled_border") :
control.pressed ? UM.Theme.getColor("action_button_active_border") :
control.hovered ? UM.Theme.getColor("action_button_hovered_border") : UM.Theme.getColor("action_button_border")
color: !control.enabled ? UM.Theme.getColor("action_button_disabled") :
control.pressed ? UM.Theme.getColor("action_button_active") :
control.hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button")
Behavior on color { ColorAnimation { duration: 50; } }
anchors.left: parent.left
anchors.leftMargin: UM.Theme.sizes.save_button_text_margin.width / 2;
anchors.leftMargin: UM.Theme.getSize("save_button_text_margin").width / 2;
width: parent.height
height: parent.height
UM.RecolorImage {
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
width: UM.Theme.sizes.standard_arrow.width
height: UM.Theme.sizes.standard_arrow.height
width: UM.Theme.getSize("standard_arrow").width
height: UM.Theme.getSize("standard_arrow").height
sourceSize.width: width
sourceSize.height: height
color: !control.enabled ? UM.Theme.colors.action_button_disabled_text :
control.pressed ? UM.Theme.colors.action_button_active_text :
control.hovered ? UM.Theme.colors.action_button_hovered_text : UM.Theme.colors.action_button_text;
source: UM.Theme.icons.arrow_bottom;
color: !control.enabled ? UM.Theme.getColor("action_button_disabled_text") :
control.pressed ? UM.Theme.getColor("action_button_active_text") : control.hovered ? UM.Theme.getColor("action_button_hovered_text") : UM.Theme.getColor("action_button_text");
source: UM.Theme.getIcon("arrow_bottom");
}
}
label: Label{ }

View file

@ -18,7 +18,7 @@ Rectangle
property Action manageProfilesAction;
property int currentModeIndex;
color: UM.Theme.colors.sidebar;
color: UM.Theme.getColor("sidebar");
UM.I18nCatalog { id: catalog; name:"cura"}
function showTooltip(item, position, text)
@ -56,10 +56,10 @@ Rectangle
Rectangle {
id: headerSeparator
width: parent.width
height: UM.Theme.sizes.sidebar_lining.height
color: UM.Theme.colors.sidebar_lining
height: UM.Theme.getSize("sidebar_lining").height
color: UM.Theme.getColor("sidebar_lining")
anchors.top: header.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.topMargin: UM.Theme.getSize("default_margin").height
}
ProfileSetup {
@ -67,7 +67,7 @@ Rectangle
addProfileAction: base.addProfileAction
manageProfilesAction: base.manageProfilesAction
anchors.top: settingsModeSelection.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.topMargin: UM.Theme.getSize("default_margin").height
width: parent.width
height: totalHeightProfileSetup
}
@ -94,22 +94,22 @@ Rectangle
id: settingsModeLabel
text: catalog.i18nc("@label:listbox","Setup");
anchors.left: parent.left
anchors.leftMargin: UM.Theme.sizes.default_margin.width;
anchors.leftMargin: UM.Theme.getSize("default_margin").width;
anchors.top: headerSeparator.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.topMargin: UM.Theme.getSize("default_margin").height
width: parent.width/100*45
font: UM.Theme.fonts.large;
color: UM.Theme.colors.text
font: UM.Theme.getFont("large");
color: UM.Theme.getColor("text")
}
Rectangle {
id: settingsModeSelection
width: parent.width/100*55
height: UM.Theme.sizes.sidebar_header_mode_toggle.height
height: UM.Theme.getSize("sidebar_header_mode_toggle").height
anchors.right: parent.right
anchors.rightMargin: UM.Theme.sizes.default_margin.width
anchors.rightMargin: UM.Theme.getSize("default_margin").width
anchors.top: headerSeparator.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.topMargin: UM.Theme.getSize("default_margin").height
Component{
id: wizardDelegate
Button {
@ -126,20 +126,20 @@ Rectangle
style: ButtonStyle {
background: Rectangle {
border.width: UM.Theme.sizes.default_lining.width
border.color: control.checked ? UM.Theme.colors.toggle_checked_border :
control.pressed ? UM.Theme.colors.toggle_active_border :
control.hovered ? UM.Theme.colors.toggle_hovered_border : UM.Theme.colors.toggle_unchecked_border
color: control.checked ? UM.Theme.colors.toggle_checked :
control.pressed ? UM.Theme.colors.toggle_active :
control.hovered ? UM.Theme.colors.toggle_hovered : UM.Theme.colors.toggle_unchecked
border.width: UM.Theme.getSize("default_lining").width
border.color: control.checked ? UM.Theme.getColor("toggle_checked_border : ")
control.pressed ? UM.Theme.getColor("toggle_active_border :")
control.hovered ? UM.Theme.getColor("toggle_hovered_border : UM").Theme.getColor("toggle_unchecked_border")
color: control.checked ? UM.Theme.getColor("toggle_checked : ")
control.pressed ? UM.Theme.getColor("toggle_active :")
control.hovered ? UM.Theme.getColor("toggle_hovered : UM").Theme.getColor("toggle_unchecked")
Behavior on color { ColorAnimation { duration: 50; } }
Label {
anchors.centerIn: parent
color: control.checked ? UM.Theme.colors.toggle_checked_text :
control.pressed ? UM.Theme.colors.toggle_active_text :
control.hovered ? UM.Theme.colors.toggle_hovered_text : UM.Theme.colors.toggle_unchecked_text
font: UM.Theme.fonts.default
color: control.checked ? UM.Theme.getColor("toggle_checked_text : ")
control.pressed ? UM.Theme.getColor("toggle_active_text :")
control.hovered ? UM.Theme.getColor("toggle_hovered_text : UM").Theme.getColor("toggle_unchecked_text")
font: UM.Theme.getFont("default")
text: control.text;
}
}
@ -165,7 +165,7 @@ Rectangle
anchors.bottom: footerSeparator.top
anchors.top: profileItem.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.topMargin: UM.Theme.getSize("default_margin").height
anchors.left: base.left
anchors.right: base.right
@ -201,10 +201,10 @@ Rectangle
Rectangle {
id: footerSeparator
width: parent.width
height: UM.Theme.sizes.sidebar_lining.height
color: UM.Theme.colors.sidebar_lining
height: UM.Theme.getSize("sidebar_lining").height
color: UM.Theme.getColor("sidebar_lining")
anchors.bottom: saveButton.top
anchors.bottomMargin: UM.Theme.sizes.default_margin.height
anchors.bottomMargin: UM.Theme.getSize("default_margin").height
}
SaveButton

View file

@ -21,27 +21,27 @@ Item
width: base.width
height: 0
anchors.top: parent.top
color: UM.Theme.colors.sidebar_header_bar
color: UM.Theme.getColor("sidebar_header_bar")
}
Label{
id: printjobTabLabel
text: catalog.i18nc("@label:listbox","Print Job");
anchors.left: parent.left
anchors.leftMargin: UM.Theme.sizes.default_margin.width;
anchors.leftMargin: UM.Theme.getSize("default_margin").width;
anchors.top: sidebarTabRow.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.topMargin: UM.Theme.getSize("default_margin").height
width: parent.width/100*45
font: UM.Theme.fonts.large;
color: UM.Theme.colors.text
font: UM.Theme.getFont("large");
color: UM.Theme.getColor("text")
}
Rectangle {
id: machineSelectionRow
width: base.width
height: UM.Theme.sizes.sidebar_setup.height
height: UM.Theme.getSize("sidebar_setup").height
anchors.top: printjobTabLabel.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.topMargin: UM.Theme.getSize("default_margin").height
anchors.horizontalCenter: parent.horizontalCenter
Label{
@ -49,20 +49,20 @@ Item
//: Machine selection label
text: catalog.i18nc("@label:listbox","Printer:");
anchors.left: parent.left
anchors.leftMargin: UM.Theme.sizes.default_margin.width
anchors.leftMargin: UM.Theme.getSize("default_margin").width
anchors.verticalCenter: parent.verticalCenter
font: UM.Theme.fonts.default;
color: UM.Theme.colors.text;
font: UM.Theme.getFont("default");
color: UM.Theme.getColor("text");
}
ToolButton {
id: machineSelection
text: UM.MachineManager.activeMachineInstance;
width: parent.width/100*55
height: UM.Theme.sizes.setting_control.height
height: UM.Theme.getSize("setting_control").height
tooltip: UM.MachineManager.activeMachineInstance;
anchors.right: parent.right
anchors.rightMargin: UM.Theme.sizes.default_margin.width
anchors.rightMargin: UM.Theme.getSize("default_margin").width
anchors.verticalCenter: parent.verticalCenter
style: UM.Theme.styles.sidebar_header_button
@ -97,30 +97,30 @@ Item
Rectangle {
id: variantRow
anchors.top: machineSelectionRow.bottom
anchors.topMargin: UM.MachineManager.hasVariants ? UM.Theme.sizes.default_margin.height : 0
anchors.topMargin: UM.MachineManager.hasVariants ? UM.Theme.getSize("default_margin").height : 0
width: base.width
height: UM.MachineManager.hasVariants ? UM.Theme.sizes.sidebar_setup.height : 0
height: UM.MachineManager.hasVariants ? UM.Theme.getSize("sidebar_setup").height : 0
visible: UM.MachineManager.hasVariants
Label{
id: variantLabel
text: catalog.i18nc("@label","Nozzle:");
anchors.left: parent.left
anchors.leftMargin: UM.Theme.sizes.default_margin.width;
anchors.leftMargin: UM.Theme.getSize("default_margin").width;
anchors.verticalCenter: parent.verticalCenter
width: parent.width/100*45
font: UM.Theme.fonts.default;
color: UM.Theme.colors.text;
font: UM.Theme.getFont("default");
color: UM.Theme.getColor("text");
}
ToolButton {
id: variantSelection
text: UM.MachineManager.activeMachineVariant
width: parent.width/100*55
height: UM.Theme.sizes.setting_control.height
height: UM.Theme.getSize("setting_control").height
tooltip: UM.MachineManager.activeMachineVariant;
anchors.right: parent.right
anchors.rightMargin: UM.Theme.sizes.default_margin.width
anchors.rightMargin: UM.Theme.getSize("default_margin").width
anchors.verticalCenter: parent.verticalCenter
style: UM.Theme.styles.sidebar_header_button

View file

@ -27,19 +27,19 @@ Item
id: infillCellLeft
anchors.top: parent.top
anchors.left: parent.left
width: base.width/100* 35 - UM.Theme.sizes.default_margin.width
width: base.width/100* 35 - UM.Theme.getSize("default_margin").width
height: childrenRect.height
Label{
id: infillLabel
//: Infill selection label
text: catalog.i18nc("@label","Infill:");
font: UM.Theme.fonts.default;
color: UM.Theme.colors.text;
font: UM.Theme.getFont("default");
color: UM.Theme.getColor("text");
anchors.top: parent.top
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.topMargin: UM.Theme.getSize("default_margin").height
anchors.left: parent.left
anchors.leftMargin: UM.Theme.sizes.default_margin.width
anchors.leftMargin: UM.Theme.getSize("default_margin").width
}
}
@ -48,7 +48,7 @@ Item
height: childrenRect.height;
width: base.width / 100 * 65
spacing: UM.Theme.sizes.default_margin.width
spacing: UM.Theme.getSize("default_margin").width
anchors.left: infillCellLeft.right
anchors.top: infillCellLeft.top
@ -81,23 +81,23 @@ Item
Rectangle{
id: infillIconLining
width: (infillCellRight.width - 3 * UM.Theme.sizes.default_margin.width) / 4;
width: (infillCellRight.width - 3 * UM.Theme.getSize("default_margin").width) / 4;
height: width
border.color: (infillListView.activeIndex == index) ? UM.Theme.colors.setting_control_selected :
(mousearea.containsMouse ? UM.Theme.colors.setting_control_border_highlight : UM.Theme.colors.setting_control_border)
border.width: UM.Theme.sizes.default_lining.width
color: infillListView.activeIndex == index ? UM.Theme.colors.setting_control_selected : "transparent"
border.color: (infillListView.activeIndex == index) ? UM.Theme.getColor("setting_control_selected :")
(mousearea.containsMouse ? UM.Theme.getColor("setting_control_border_highlight : UM").Theme.getColor("setting_control_border)")
border.width: UM.Theme.getSize("default_lining").width
color: infillListView.activeIndex == index ? UM.Theme.getColor("setting_control_selected : "transparent"")
UM.RecolorImage {
id: infillIcon
anchors.fill: parent;
anchors.margins: UM.Theme.sizes.infill_button_margin.width
anchors.margins: UM.Theme.getSize("infill_button_margin").width
sourceSize.width: width
sourceSize.height: width
source: UM.Theme.icons[model.icon];
color: (infillListView.activeIndex == index) ? UM.Theme.colors.text_white : UM.Theme.colors.text
color: (infillListView.activeIndex == index) ? UM.Theme.getColor("text_white : UM").Theme.getColor("text")
}
MouseArea {
@ -122,7 +122,7 @@ Item
id: infillLabel
anchors.top: infillIconLining.bottom
anchors.horizontalCenter: infillIconLining.horizontalCenter
color: infillListView.activeIndex == index ? UM.Theme.colors.setting_control_text : UM.Theme.colors.setting_control_border
color: infillListView.activeIndex == index ? UM.Theme.getColor("setting_control_text : UM").Theme.getColor("setting_control_border")
text: name
}
}
@ -172,25 +172,25 @@ Item
Rectangle {
id: helpersCellLeft
anchors.top: infillCellRight.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.topMargin: UM.Theme.getSize("default_margin").height
anchors.left: parent.left
width: parent.width/100*35 - UM.Theme.sizes.default_margin.width
width: parent.width/100*35 - UM.Theme.getSize("default_margin").width
height: childrenRect.height
Label{
anchors.left: parent.left
anchors.leftMargin: UM.Theme.sizes.default_margin.width
anchors.leftMargin: UM.Theme.getSize("default_margin").width
//: Helpers selection label
text: catalog.i18nc("@label:listbox","Helpers:");
font: UM.Theme.fonts.default;
color: UM.Theme.colors.text;
font: UM.Theme.getFont("default");
color: UM.Theme.getColor("text");
}
}
Rectangle {
id: helpersCellRight
anchors.top: helpersCellLeft.top
anchors.left: helpersCellLeft.right
width: parent.width/100*65 - UM.Theme.sizes.default_margin.width
width: parent.width/100*65 - UM.Theme.getSize("default_margin").width
height: childrenRect.height
CheckBox{
@ -230,7 +230,7 @@ Item
property bool hovered_ex: false
anchors.top: brimCheckBox.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.topMargin: UM.Theme.getSize("default_margin").height
anchors.left: parent.left
//: Setting enable support checkbox

View file

@ -11,11 +11,11 @@ import UM 1.0 as UM
UM.PointingRectangle {
id: base;
width: UM.Theme.sizes.tooltip.width;
height: label.height + UM.Theme.sizes.tooltip_margins.height * 2;
color: UM.Theme.colors.tooltip;
width: UM.Theme.getSize("tooltip").width;
height: label.height + UM.Theme.getSize("tooltip_margins").height * 2;
color: UM.Theme.getColor("tooltip");
arrowSize: UM.Theme.sizes.default_arrow.width
arrowSize: UM.Theme.getSize("default_arrow").width
opacity: 0;
Behavior on opacity { NumberAnimation { duration: 100; } }
@ -28,7 +28,7 @@ UM.PointingRectangle {
y = parent.height - base.height;
} else {
x = position.x - base.width;
y = position.y - UM.Theme.sizes.tooltip_arrow_margins.height;
y = position.y - UM.Theme.getSize("tooltip_arrow_margins").height;
}
base.opacity = 1;
target = Qt.point(40 , position.y)
@ -42,14 +42,14 @@ UM.PointingRectangle {
id: label;
anchors {
top: parent.top;
topMargin: UM.Theme.sizes.tooltip_margins.height;
topMargin: UM.Theme.getSize("tooltip_margins").height;
left: parent.left;
leftMargin: UM.Theme.sizes.tooltip_margins.width;
leftMargin: UM.Theme.getSize("tooltip_margins").width;
right: parent.right;
rightMargin: UM.Theme.sizes.tooltip_margins.width;
rightMargin: UM.Theme.getSize("tooltip_margins").width;
}
wrapMode: Text.Wrap;
font: UM.Theme.fonts.default;
color: UM.Theme.colors.tooltip_text;
font: UM.Theme.getFont("default");
color: UM.Theme.getColor("tooltip_text");
}
}

View file

@ -20,7 +20,7 @@ Item {
anchors.bottom: parent.bottom;
anchors.left: parent.left;
spacing: UM.Theme.sizes.button_lining.width
spacing: UM.Theme.getSize("button_lining").width
Repeater {
id: repeat
@ -54,47 +54,47 @@ Item {
id: panelBorder;
anchors.left: parent.right;
anchors.leftMargin: UM.Theme.sizes.default_margin.width;
anchors.leftMargin: UM.Theme.getSize("default_margin").width;
anchors.top: base.top;
anchors.topMargin: base.activeY
z: buttons.z -1
target: Qt.point(parent.right, base.activeY + UM.Theme.sizes.button.height/2)
arrowSize: UM.Theme.sizes.default_arrow.width
target: Qt.point(parent.right, base.activeY + UM.Theme.getSize("button").height/2)
arrowSize: UM.Theme.getSize("default_arrow").width
width: {
if (panel.item && panel.width > 0){
return Math.max(panel.width + 2 * UM.Theme.sizes.default_margin.width)
return Math.max(panel.width + 2 * UM.Theme.getSize("default_margin").width)
}
else {
return 0
}
}
height: panel.item ? panel.height + 2 * UM.Theme.sizes.default_margin.height : 0;
height: panel.item ? panel.height + 2 * UM.Theme.getSize("default_margin").height : 0;
opacity: panel.item ? 1 : 0
Behavior on opacity { NumberAnimation { duration: 100 } }
color: UM.Theme.colors.lining;
//border.width: UM.Theme.sizes.default_lining.width
//border.color: UM.Theme.colors.lining
color: UM.Theme.getColor("lining");
//border.width: UM.Theme.getSize("default_lining").width
//border.color: UM.Theme.getColor("lining")
UM.PointingRectangle {
id: panelBackground;
color: UM.Theme.colors.tool_panel_background;
color: UM.Theme.getColor("tool_panel_background");
anchors.fill: parent
anchors.margins: UM.Theme.sizes.default_lining.width
anchors.margins: UM.Theme.getSize("default_lining").width
target: Qt.point(-UM.Theme.sizes.default_margin.width, UM.Theme.sizes.button.height/2)
target: Qt.point(-UM.Theme.getSize("default_margin").width, UM.Theme.getSize("button").height/2)
arrowSize: parent.arrowSize
}
Loader {
id: panel
x: UM.Theme.sizes.default_margin.width;
y: UM.Theme.sizes.default_margin.height;
x: UM.Theme.getSize("default_margin").width;
y: UM.Theme.getSize("default_margin").height;
source: UM.ActiveTool.valid ? UM.ActiveTool.activeToolPanel : "";
enabled: UM.Controller.toolsEnabled;

View file

@ -98,12 +98,12 @@ Item
background: Rectangle {
border.width: 0
color: "transparent";
height: UM.Theme.sizes.standard_list_lineheight.height
height: UM.Theme.getSize("standard_list_lineheight").height
width: machineList.width
}
label: Text {
anchors.left: parent.left
anchors.leftMargin: UM.Theme.sizes.standard_arrow.width + UM.Theme.sizes.default_margin.width
anchors.leftMargin: UM.Theme.getSize("standard_arrow").width + UM.Theme.getSize("default_margin").width
text: control.text
color: palette.windowText
font.bold: true
@ -111,13 +111,13 @@ Item
id: downArrow
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.left
anchors.rightMargin: UM.Theme.sizes.default_margin.width
width: UM.Theme.sizes.standard_arrow.width
height: UM.Theme.sizes.standard_arrow.height
anchors.rightMargin: UM.Theme.getSize("default_margin").width
width: UM.Theme.getSize("standard_arrow").width
height: UM.Theme.getSize("standard_arrow").height
sourceSize.width: width
sourceSize.height: width
color: palette.windowText
source: base.activeManufacturer == section ? UM.Theme.icons.arrow_bottom : UM.Theme.icons.arrow_right
source: base.activeManufacturer == section ? UM.Theme.getIcon("arrow_bottom") : UM.Theme.getIcon("arrow_right")
}
}
}
@ -133,10 +133,10 @@ Item
id: machineButton
anchors.left: parent.left
anchors.leftMargin: UM.Theme.sizes.standard_list_lineheight.width
anchors.leftMargin: UM.Theme.getSize("standard_list_lineheight").width
opacity: 1;
height: UM.Theme.sizes.standard_list_lineheight.height;
height: UM.Theme.getSize("standard_list_lineheight").height;
checked: ListView.isCurrentItem;
@ -183,6 +183,25 @@ Item
id: machineNameHolder
anchors.bottom: parent.bottom;
Item
{
height: errorMessage.lineHeight
anchors.bottom: insertNameLabel.top
anchors.bottomMargin: insertNameLabel.height * errorMessage.lineCount
Label
{
id: errorMessage
property bool show: false
width: base.width
height: errorMessage.show ? errorMessage.lineHeight : 0
visible: errorMessage.show
text: catalog.i18nc("@label", "This printer name has already been used. Please choose a different printer name.");
wrapMode: Text.WordWrap
Behavior on height {NumberAnimation {duration: 75; }}
color: UM.Theme.getColor("error")
}
}
Label
{
id: insertNameLabel
@ -192,7 +211,7 @@ Item
{
id: machineName;
text: getMachineName()
implicitWidth: UM.Theme.sizes.standard_list_input.width
implicitWidth: UM.Theme.getSize("standard_list_input").width
}
}

View file

@ -47,7 +47,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","To make sure your prints will come out great, you can now adjust your buildplate. When you click 'Move to Next Position' the nozzle will move to the different positions that can be adjusted.")
@ -56,7 +56,7 @@ Item
{
id: bedlevelingText
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", "For every postition; insert a piece of paper under the nozzle and adjust the print bed height. The print bed height is right when the paper is slightly gripped by the tip of the nozzle.")
@ -65,10 +65,10 @@ Item
Item{
id: bedlevelingWrapper
anchors.top: bedlevelingText.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.topMargin: UM.Theme.getSize("default_margin").height
anchors.horizontalCenter: parent.horizontalCenter
height: skipBedlevelingButton.height
width: bedlevelingButton.width + skipBedlevelingButton.width + UM.Theme.sizes.default_margin.height < wizardPage.width ? bedlevelingButton.width + skipBedlevelingButton.width + UM.Theme.sizes.default_margin.height : wizardPage.width
width: bedlevelingButton.width + skipBedlevelingButton.width + UM.Theme.getSize("default_margin").height < wizardPage.width ? bedlevelingButton.width + skipBedlevelingButton.width + UM.Theme.getSize("default_margin").height : wizardPage.width
Button
{
id: bedlevelingButton
@ -103,9 +103,9 @@ Item
{
id: skipBedlevelingButton
anchors.top: parent.width < wizardPage.width ? parent.top : bedlevelingButton.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 ? bedlevelingButton.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 Bedleveling");
onClicked: base.visible = false;
}
@ -116,7 +116,7 @@ Item
id: resultText
visible: false
anchors.top: bedlevelingWrapper.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.topMargin: UM.Theme.getSize("default_margin").height
anchors.left: parent.left
width: parent.width
wrapMode: Text.WordWrap

View file

@ -36,7 +36,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","To assist you in having better default settings for your Ultimaker. Cura would like to know which upgrades you have in your machine:")
@ -47,10 +47,10 @@ Item
id: pageCheckboxes
height: childrenRect.height
anchors.left: parent.left
anchors.leftMargin: UM.Theme.sizes.default_margin.width
anchors.leftMargin: UM.Theme.getSize("default_margin").width
anchors.top: pageDescription.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
width: parent.width - UM.Theme.sizes.default_margin.width
anchors.topMargin: UM.Theme.getSize("default_margin").height
width: parent.width - UM.Theme.getSize("default_margin").width
CheckBox
{
id: extruderCheckBox
@ -85,7 +85,7 @@ Item
{
width: parent.width
anchors.top: pageCheckboxes.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.topMargin: UM.Theme.getSize("default_margin").height
wrapMode: Text.WordWrap
text: catalog.i18nc("@label","If you bought your Ultimaker after october 2012 you will have the Extruder drive upgrade. If you do not have this upgrade, it is highly recommended to improve reliability. This upgrade can be bought from the Ultimaker webshop or found on thingiverse as thing:26094");
}

View file

@ -78,7 +78,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","It's a good idea to do a few sanity checks on your Ultimaker. You can skip this step if you know your machine is functional");
@ -87,10 +87,10 @@ Item
Item{
id: startStopButtons
anchors.top: pageDescription.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.topMargin: UM.Theme.getSize("default_margin").height
anchors.horizontalCenter: parent.horizontalCenter
height: childrenRect.height
width: startCheckButton.width + skipCheckButton.width + UM.Theme.sizes.default_margin.height < wizardPage.width ? startCheckButton.width + skipCheckButton.width + UM.Theme.sizes.default_margin.height : wizardPage.width
width: startCheckButton.width + skipCheckButton.width + UM.Theme.getSize("default_margin").height < wizardPage.width ? startCheckButton.width + skipCheckButton.width + UM.Theme.getSize("default_margin").height : wizardPage.width
Button
{
id: startCheckButton
@ -109,9 +109,9 @@ Item
{
id: skipCheckButton
anchors.top: parent.width < wizardPage.width ? parent.top : startCheckButton.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 ? startCheckButton.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
//enabled: !alreadyTested
text: catalog.i18nc("@action:button","Skip Printer Check");
onClicked: {
@ -123,7 +123,7 @@ Item
Item{
id: checkupContent
anchors.top: startStopButtons.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.topMargin: UM.Theme.getSize("default_margin").height
visible: false
//////////////////////////////////////////////////////////
Label
@ -227,7 +227,7 @@ Item
height: nozzleTemp.height
anchors.top: nozzleTempLabel.top
anchors.left: bedTempStatus.right
anchors.leftMargin: UM.Theme.sizes.default_margin.width/2
anchors.leftMargin: UM.Theme.getSize("default_margin").width/2
Button
{
height: nozzleTemp.height - 2
@ -250,7 +250,7 @@ Item
id: nozzleTemp
anchors.top: nozzleTempLabel.top
anchors.left: nozzleTempButton.right
anchors.leftMargin: UM.Theme.sizes.default_margin.width
anchors.leftMargin: UM.Theme.getSize("default_margin").width
width: wizardPage.rightRow * 0.2
wrapMode: Text.WordWrap
text: printer_connection != null ? printer_connection.extruderTemperature + "°C" : "0°C"
@ -283,7 +283,7 @@ Item
height: bedTemp.height
anchors.top: bedTempLabel.top
anchors.left: bedTempStatus.right
anchors.leftMargin: UM.Theme.sizes.default_margin.width/2
anchors.leftMargin: UM.Theme.getSize("default_margin").width/2
Button
{
height: bedTemp.height - 2
@ -307,7 +307,7 @@ Item
width: wizardPage.rightRow * 0.2
anchors.top: bedTempLabel.top
anchors.left: bedTempButton.right
anchors.leftMargin: UM.Theme.sizes.default_margin.width
anchors.leftMargin: UM.Theme.getSize("default_margin").width
wrapMode: Text.WordWrap
text: printer_connection != null ? printer_connection.bedTemperature + "°C": "0°C"
font.bold: true
@ -317,7 +317,7 @@ Item
id: resultText
visible: false
anchors.top: bedTemp.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.topMargin: UM.Theme.getSize("default_margin").height
anchors.left: parent.left
width: parent.width
wrapMode: Text.WordWrap

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