mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-10-10 07:17:52 -06:00
Merge branch '2.1' of https://github.com/Ultimaker/Cura
This commit is contained in:
commit
a9bd73f32a
133 changed files with 2246 additions and 1502 deletions
|
@ -24,7 +24,7 @@ UM.Dialog
|
|||
width: parent.width * 0.75
|
||||
height: width * (1/4.25)
|
||||
|
||||
source: UM.Theme.images.logo
|
||||
source: UM.Theme.getImage("logo")
|
||||
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
|
@ -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
|
||||
|
|
|
@ -92,7 +92,7 @@ UM.MainWindow
|
|||
text: catalog.i18nc("@action:inmenu menubar:file", "&Save Selection to File");
|
||||
enabled: UM.Selection.hasSelection;
|
||||
iconName: "document-save-as";
|
||||
onTriggered: UM.OutputDeviceManager.requestWriteSelectionToDevice("local_file", Printer.jobName, false);
|
||||
onTriggered: UM.OutputDeviceManager.requestWriteSelectionToDevice("local_file", Printer.jobName, { "filter_by_machine": false });
|
||||
}
|
||||
Menu
|
||||
{
|
||||
|
@ -108,7 +108,7 @@ UM.MainWindow
|
|||
MenuItem
|
||||
{
|
||||
text: model.description;
|
||||
onTriggered: UM.OutputDeviceManager.requestWriteToDevice(model.id, Printer.jobName, false);
|
||||
onTriggered: UM.OutputDeviceManager.requestWriteToDevice(model.id, Printer.jobName, { "filter_by_machine": false });
|
||||
}
|
||||
onObjectAdded: saveAllMenu.insertItem(index, object)
|
||||
onObjectRemoved: saveAllMenu.removeItem(object)
|
||||
|
@ -214,13 +214,24 @@ UM.MainWindow
|
|||
|
||||
Instantiator
|
||||
{
|
||||
id: profileMenuInstantiator
|
||||
model: UM.ProfilesModel { }
|
||||
MenuItem {
|
||||
text: model.name;
|
||||
checkable: true;
|
||||
checked: model.active;
|
||||
exclusiveGroup: profileMenuGroup;
|
||||
onTriggered: UM.MachineManager.setActiveProfile(model.name)
|
||||
onTriggered:
|
||||
{
|
||||
UM.MachineManager.setActiveProfile(model.name);
|
||||
if (!model.active) {
|
||||
//Selecting a profile was canceled; undo menu selection
|
||||
profileMenuInstantiator.model.setProperty(index, "active", false);
|
||||
var activeProfileName = UM.MachineManager.activeProfile;
|
||||
var activeProfileIndex = profileMenuInstantiator.model.find("name", activeProfileName);
|
||||
profileMenuInstantiator.model.setProperty(activeProfileIndex, "active", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
onObjectAdded: profileMenu.insertItem(index, object)
|
||||
onObjectRemoved: profileMenu.removeItem(object)
|
||||
|
@ -326,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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -336,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;
|
||||
}
|
||||
|
@ -350,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;
|
||||
|
||||
|
@ -365,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;
|
||||
}
|
||||
|
@ -384,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;
|
||||
source: UM.Theme.getImage("logo");
|
||||
width: UM.Theme.getSize("logo").width;
|
||||
height: UM.Theme.getSize("logo").height;
|
||||
z: -1;
|
||||
|
||||
sourceSize.width: width;
|
||||
|
@ -405,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: '';
|
||||
|
@ -442,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;
|
||||
}
|
||||
}
|
||||
|
@ -458,18 +469,28 @@ UM.MainWindow
|
|||
right: parent.right;
|
||||
}
|
||||
|
||||
width: UM.Theme.sizes.sidebar.width;
|
||||
width: UM.Theme.getSize("sidebar").width;
|
||||
|
||||
addMachineAction: actions.addMachine;
|
||||
configureMachinesAction: actions.configureMachines;
|
||||
addProfileAction: actions.addProfile;
|
||||
manageProfilesAction: actions.manageProfiles;
|
||||
|
||||
configureSettingsAction: Action
|
||||
{
|
||||
onTriggered:
|
||||
{
|
||||
preferences.visible = true;
|
||||
preferences.setPage(2);
|
||||
preferences.getCurrentItem().scrollToSection(source.key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
@ -491,25 +512,22 @@ UM.MainWindow
|
|||
{
|
||||
//; Remove & re-add the general page as we want to use our own instead of uranium standard.
|
||||
removePage(0);
|
||||
insertPage(0, catalog.i18nc("@title:tab","General"), generalPage);
|
||||
insertPage(0, catalog.i18nc("@title:tab","General"), Qt.resolvedUrl("GeneralPage.qml"));
|
||||
|
||||
//: View preferences page title
|
||||
insertPage(1, catalog.i18nc("@title:tab","View"), viewPage);
|
||||
insertPage(1, catalog.i18nc("@title:tab","View"), Qt.resolvedUrl("ViewPage.qml"));
|
||||
|
||||
//Force refresh
|
||||
setPage(0)
|
||||
}
|
||||
|
||||
Item {
|
||||
visible: false
|
||||
GeneralPage
|
||||
onVisibleChanged:
|
||||
{
|
||||
if(!visible)
|
||||
{
|
||||
id: generalPage
|
||||
}
|
||||
|
||||
ViewPage
|
||||
{
|
||||
id: viewPage
|
||||
// When the dialog closes, switch to the General page.
|
||||
// This prevents us from having a heavy page like Setting Visiblity active in the background.
|
||||
setPage(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -582,7 +600,7 @@ UM.MainWindow
|
|||
addMachine.onTriggered: addMachineWizard.visible = true;
|
||||
addProfile.onTriggered: { UM.MachineManager.createProfile(); preferences.visible = true; preferences.setPage(4); }
|
||||
|
||||
preferences.onTriggered: { preferences.visible = true; preferences.setPage(0); }
|
||||
preferences.onTriggered: { preferences.visible = true; }
|
||||
configureMachines.onTriggered: { preferences.visible = true; preferences.setPage(3); }
|
||||
manageProfiles.onTriggered: { preferences.visible = true; preferences.setPage(4); }
|
||||
|
||||
|
@ -649,7 +667,7 @@ UM.MainWindow
|
|||
//TODO: Support multiple file selection, workaround bug in KDE file dialog
|
||||
//selectMultiple: true
|
||||
nameFilters: UM.MeshFileHandler.supportedReadFileTypes;
|
||||
|
||||
folder: Printer.getDefaultPath()
|
||||
onAccepted:
|
||||
{
|
||||
//Because several implementations of the file dialog only update the folder
|
||||
|
@ -688,11 +706,6 @@ UM.MainWindow
|
|||
}
|
||||
}
|
||||
|
||||
Component.onCompleted:
|
||||
{
|
||||
UM.Theme.load(UM.Resources.getPath(UM.Resources.Themes, "cura"))
|
||||
}
|
||||
|
||||
Timer
|
||||
{
|
||||
id: startupTimer;
|
||||
|
|
|
@ -25,7 +25,6 @@ Rectangle {
|
|||
property variant printDuration: PrintInformation.currentPrintTime;
|
||||
property real printMaterialAmount: PrintInformation.materialAmount;
|
||||
|
||||
width: UM.Theme.sizes.jobspecs.width
|
||||
height: childrenRect.height
|
||||
color: "transparent"
|
||||
|
||||
|
@ -80,7 +79,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 +92,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,30 +107,31 @@ 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");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TextField
|
||||
TextField
|
||||
{
|
||||
id: printJobTextfield
|
||||
anchors.right: printJobPencilIcon.left
|
||||
anchors.rightMargin: UM.Theme.sizes.default_margin.width/2
|
||||
height: UM.Theme.sizes.jobspecs_line.height
|
||||
width: base.width
|
||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width/2
|
||||
height: UM.Theme.getSize("jobspecs_line").height
|
||||
width: __contentWidth + UM.Theme.getSize("default_margin").width
|
||||
maximumLength: 120
|
||||
property int unremovableSpacing: 5
|
||||
text: ''
|
||||
horizontalAlignment: TextInput.AlignRight
|
||||
onTextChanged: {
|
||||
if(text != ''){
|
||||
//this prevent that is sets an empty string as jobname
|
||||
//Prevent that jobname is set to an empty string
|
||||
Printer.setJobName(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)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
@ -49,6 +49,7 @@ Item{
|
|||
id: profileSelectionMenu
|
||||
Instantiator
|
||||
{
|
||||
id: profileSelectionInstantiator
|
||||
model: UM.ProfilesModel { }
|
||||
MenuItem
|
||||
{
|
||||
|
@ -56,7 +57,17 @@ Item{
|
|||
checkable: true;
|
||||
checked: model.active;
|
||||
exclusiveGroup: profileSelectionMenuGroup;
|
||||
onTriggered: UM.MachineManager.setActiveProfile(model.name)
|
||||
onTriggered:
|
||||
{
|
||||
UM.MachineManager.setActiveProfile(model.name);
|
||||
if (!model.active) {
|
||||
//Selecting a profile was canceled; undo menu selection
|
||||
profileSelectionInstantiator.model.setProperty(index, "active", false);
|
||||
var activeProfileName = UM.MachineManager.activeProfile;
|
||||
var activeProfileIndex = profileSelectionInstantiator.model.find("name", activeProfileName);
|
||||
profileSelectionInstantiator.model.setProperty(activeProfileIndex, "active", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
onObjectAdded: profileSelectionMenu.insertItem(index, object)
|
||||
onObjectRemoved: profileSelectionMenu.removeItem(object)
|
||||
|
|
|
@ -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,32 +34,32 @@ 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
|
||||
color: UM.Theme.colors.progressbar_control
|
||||
radius: UM.Theme.sizes.progressbar_radius.width
|
||||
color: UM.Theme.getColor("progressbar_control")
|
||||
radius: UM.Theme.getSize("progressbar_radius").width
|
||||
visible: base.backendState == 1 ? true : false
|
||||
}
|
||||
}
|
||||
|
@ -69,48 +69,48 @@ 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
|
||||
|
||||
tooltip: UM.OutputDeviceManager.activeDeviceDescription;
|
||||
enabled: base.backendState == 2 && base.activity == true
|
||||
height: UM.Theme.sizes.save_button_save_to_button.height
|
||||
width: 150
|
||||
anchors.top:parent.top
|
||||
height: UM.Theme.getSize("save_button_save_to_button").height
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.right: deviceSelectionMenu.left;
|
||||
anchors.rightMargin: -3 * UM.Theme.getSize("default_lining").width;
|
||||
|
||||
text: UM.OutputDeviceManager.activeDeviceShortDescription
|
||||
onClicked:
|
||||
{
|
||||
UM.OutputDeviceManager.requestWriteToDevice(UM.OutputDeviceManager.activeDevice, Printer.jobName, true)
|
||||
UM.OutputDeviceManager.requestWriteToDevice(UM.OutputDeviceManager.activeDevice, Printer.jobName, { "filter_by_machine": true })
|
||||
}
|
||||
|
||||
style: ButtonStyle {
|
||||
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
|
||||
background:
|
||||
Rectangle
|
||||
{
|
||||
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)
|
||||
return saveToButton.resizedWidth
|
||||
}
|
||||
|
||||
implicitWidth: actualLabel.contentWidth + (UM.Theme.getSize("default_margin").width * 2)
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -121,41 +121,43 @@ Rectangle {
|
|||
Button {
|
||||
id: deviceSelectionMenu
|
||||
tooltip: catalog.i18nc("@info:tooltip","Select the active output device");
|
||||
anchors.top:parent.top
|
||||
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{ }
|
||||
|
|
|
@ -16,9 +16,10 @@ Rectangle
|
|||
property Action configureMachinesAction;
|
||||
property Action addProfileAction;
|
||||
property Action manageProfilesAction;
|
||||
property Action configureSettingsAction;
|
||||
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 +57,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 +68,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 +95,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 +127,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 +166,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 +202,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
|
||||
|
@ -239,7 +240,7 @@ Rectangle
|
|||
id: sidebarAdvanced;
|
||||
visible: false;
|
||||
|
||||
configureSettings: base.configureMachinesAction;
|
||||
configureSettings: base.configureSettingsAction;
|
||||
onShowTooltip: base.showTooltip(item, location, text)
|
||||
onHideTooltip: base.hideTooltip()
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
@ -129,6 +129,7 @@ Item
|
|||
id: variantsSelectionMenu
|
||||
Instantiator
|
||||
{
|
||||
id: variantSelectionInstantiator
|
||||
model: UM.MachineVariantsModel { id: variantsModel }
|
||||
MenuItem
|
||||
{
|
||||
|
@ -136,7 +137,17 @@ Item
|
|||
checkable: true;
|
||||
checked: model.active;
|
||||
exclusiveGroup: variantSelectionMenuGroup;
|
||||
onTriggered: UM.MachineManager.setActiveMachineVariant(variantsModel.getItem(index).name)
|
||||
onTriggered:
|
||||
{
|
||||
UM.MachineManager.setActiveMachineVariant(variantsModel.getItem(index).name);
|
||||
if (typeof(model) !== "undefined" && !model.active) {
|
||||
//Selecting a variant was canceled; undo menu selection
|
||||
variantSelectionInstantiator.model.setProperty(index, "active", false);
|
||||
var activeMachineVariantName = UM.MachineManager.activeMachineVariant;
|
||||
var activeMachineVariantIndex = variantSelectionInstantiator.model.find("name", activeMachineVariantName);
|
||||
variantSelectionInstantiator.model.setProperty(activeMachineVariantIndex, "active", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
onObjectAdded: variantsSelectionMenu.insertItem(index, object)
|
||||
onObjectRemoved: variantsSelectionMenu.removeItem(object)
|
||||
|
@ -150,30 +161,30 @@ Item
|
|||
Rectangle {
|
||||
id: materialSelectionRow
|
||||
anchors.top: variantRow.bottom
|
||||
anchors.topMargin: UM.MachineManager.hasMaterials ? UM.Theme.sizes.default_margin.height : 0
|
||||
anchors.topMargin: UM.MachineManager.hasMaterials ? UM.Theme.getSize("default_margin").height : 0
|
||||
width: base.width
|
||||
height: UM.MachineManager.hasMaterials ? UM.Theme.sizes.sidebar_setup.height : 0
|
||||
height: UM.MachineManager.hasMaterials ? UM.Theme.getSize("sidebar_setup").height : 0
|
||||
visible: UM.MachineManager.hasMaterials
|
||||
|
||||
Label{
|
||||
id: materialSelectionLabel
|
||||
text: catalog.i18nc("@label","Material:");
|
||||
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: materialSelection
|
||||
text: UM.MachineManager.activeMaterial
|
||||
width: parent.width/100*55
|
||||
height: UM.Theme.sizes.setting_control.height
|
||||
height: UM.Theme.getSize("setting_control").height
|
||||
tooltip: UM.MachineManager.activeMaterial;
|
||||
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
|
||||
|
||||
|
@ -182,6 +193,7 @@ Item
|
|||
id: materialSelectionMenu
|
||||
Instantiator
|
||||
{
|
||||
id: materialSelectionInstantiator
|
||||
model: UM.MachineMaterialsModel { id: machineMaterialsModel }
|
||||
MenuItem
|
||||
{
|
||||
|
@ -189,7 +201,17 @@ Item
|
|||
checkable: true;
|
||||
checked: model.active;
|
||||
exclusiveGroup: materialSelectionMenuGroup;
|
||||
onTriggered: UM.MachineManager.setActiveMaterial(machineMaterialsModel.getItem(index).name)
|
||||
onTriggered:
|
||||
{
|
||||
UM.MachineManager.setActiveMaterial(machineMaterialsModel.getItem(index).name);
|
||||
if (typeof(model) !== "undefined" && !model.active) {
|
||||
//Selecting a material was canceled; undo menu selection
|
||||
materialSelectionInstantiator.model.setProperty(index, "active", false);
|
||||
var activeMaterialName = UM.MachineManager.activeMaterial;
|
||||
var activeMaterialIndex = materialSelectionInstantiator.model.find("name", activeMaterialName);
|
||||
materialSelectionInstantiator.model.setProperty(activeMaterialIndex, "active", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
onObjectAdded: materialSelectionMenu.insertItem(index, object)
|
||||
onObjectRemoved: materialSelectionMenu.removeItem(object)
|
||||
|
|
|
@ -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,32 @@ 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: {
|
||||
if(infillListView.activeIndex == index)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_selected")
|
||||
}
|
||||
else if(mousearea.containsMouse)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_border_highlight")
|
||||
}
|
||||
return 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
|
||||
source: UM.Theme.getIcon(model.icon);
|
||||
color: (infillListView.activeIndex == index) ? UM.Theme.getColor("text_white") : UM.Theme.getColor("text")
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
|
@ -107,7 +116,6 @@ Item
|
|||
onClicked: {
|
||||
if (infillListView.activeIndex != index)
|
||||
{
|
||||
infillListView.activeIndex = index
|
||||
UM.MachineManager.setSettingValue("infill_sparse_density", model.percentage)
|
||||
}
|
||||
}
|
||||
|
@ -123,7 +131,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
|
||||
}
|
||||
}
|
||||
|
@ -173,25 +181,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{
|
||||
|
@ -211,8 +219,7 @@ Item
|
|||
hoverEnabled: true
|
||||
onClicked:
|
||||
{
|
||||
parent.checked = !parent.checked
|
||||
UM.MachineManager.setSettingValue("adhesion_type", parent.checked?"brim":"skirt")
|
||||
UM.MachineManager.setSettingValue("adhesion_type", !parent.checked?"brim":"skirt")
|
||||
}
|
||||
onEntered:
|
||||
{
|
||||
|
@ -232,7 +239,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
|
||||
|
@ -245,8 +252,7 @@ Item
|
|||
hoverEnabled: true
|
||||
onClicked:
|
||||
{
|
||||
parent.checked = !parent.checked
|
||||
UM.MachineManager.setSettingValue("support_enable", parent.checked)
|
||||
UM.MachineManager.setSettingValue("support_enable", !parent.checked)
|
||||
}
|
||||
onEntered:
|
||||
{
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
@ -29,11 +29,11 @@ Item {
|
|||
|
||||
Button {
|
||||
text: model.name
|
||||
iconSource: UM.Theme.icons[model.icon];
|
||||
iconSource: UM.Theme.getIcon(model.icon);
|
||||
|
||||
checkable: true;
|
||||
checked: model.active;
|
||||
enabled: UM.Selection.hasSelection && UM.Controller.toolsEnabled;
|
||||
enabled: model.enabled && UM.Selection.hasSelection && UM.Controller.toolsEnabled;
|
||||
|
||||
style: UM.Theme.styles.tool_button;
|
||||
|
||||
|
@ -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
|
||||
opacity: panel.item && panel.width > 0 ? 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;
|
||||
|
|
|
@ -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,8 @@ Item
|
|||
{
|
||||
id: machineName;
|
||||
text: getMachineName()
|
||||
implicitWidth: UM.Theme.sizes.standard_list_input.width
|
||||
implicitWidth: UM.Theme.getSize("standard_list_input").width
|
||||
maximumLength: 120
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -212,6 +232,9 @@ Item
|
|||
case "SelectUpgradedParts":
|
||||
base.wizard.appendPage(Qt.resolvedUrl("SelectUpgradedParts.qml"), catalog.i18nc("@title", "Select Upgraded Parts"));
|
||||
break;
|
||||
case "SelectUpgradedPartsUM2":
|
||||
base.wizard.appendPage(Qt.resolvedUrl("SelectUpgradedPartsUM2.qml"), catalog.i18nc("@title", "Select Upgraded Parts"));
|
||||
break;
|
||||
case "UpgradeFirmware":
|
||||
base.wizard.appendPage(Qt.resolvedUrl("UpgradeFirmware.qml"), catalog.i18nc("@title", "Upgrade Firmware"));
|
||||
break;
|
||||
|
|
|
@ -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,11 +103,22 @@ 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;
|
||||
onClicked: {
|
||||
if(wizardPage.wizard.lastPage == true){
|
||||
var old_page_count = wizardPage.wizard.getPageCount()
|
||||
// Delete old pages (if any)
|
||||
for (var i = old_page_count - 1; i > 0; i--)
|
||||
{
|
||||
wizardPage.wizard.removePage(i)
|
||||
}
|
||||
wizardPage.wizard.currentPage = 0
|
||||
wizardPage.wizard.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -116,7 +127,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
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
80
resources/qml/WizardPages/SelectUpgradedPartsUM2.qml
Normal file
80
resources/qml/WizardPages/SelectUpgradedPartsUM2.qml
Normal file
|
@ -0,0 +1,80 @@
|
|||
// Copyright (c) 2015 Ultimaker B.V.
|
||||
// Cura is released under the terms of the AGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick.Window 2.1
|
||||
|
||||
import UM 1.1 as UM
|
||||
|
||||
Item
|
||||
{
|
||||
id: wizardPage
|
||||
property string title
|
||||
|
||||
SystemPalette{id: palette}
|
||||
UM.I18nCatalog { id: catalog; name:"cura"}
|
||||
|
||||
property variant wizard: null;
|
||||
|
||||
Connections
|
||||
{
|
||||
target: wizardPage.wizard
|
||||
onNextClicked: //You can add functions here that get triggered when the final button is clicked in the wizard-element
|
||||
{
|
||||
if(wizardPage.wizard.lastPage == true){
|
||||
wizardPage.wizard.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component.onDestruction:
|
||||
{
|
||||
if (hotendCheckBox.checked == true){
|
||||
switch(UM.MachineManager.getMachineDefinitionType()) {
|
||||
case "ultimaker2":
|
||||
UM.MachineManager.setMachineDefinitionType("ultimaker2_olsson")
|
||||
break;
|
||||
case "ultimaker2_extended":
|
||||
UM.MachineManager.setMachineDefinitionType("ultimaker2_extended_olsson")
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Label
|
||||
{
|
||||
id: pageTitle
|
||||
width: parent.width
|
||||
text: catalog.i18nc("@title", "Select Upgraded Parts")
|
||||
wrapMode: Text.WordWrap
|
||||
font.pointSize: 18
|
||||
}
|
||||
Label
|
||||
{
|
||||
id: pageDescription
|
||||
anchors.top: pageTitle.bottom
|
||||
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:")
|
||||
}
|
||||
|
||||
Item
|
||||
{
|
||||
id: pageCheckboxes
|
||||
height: childrenRect.height
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
anchors.top: pageDescription.bottom
|
||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||
width: parent.width - UM.Theme.getSize("default_margin").width
|
||||
CheckBox
|
||||
{
|
||||
id: hotendCheckBox
|
||||
text: catalog.i18nc("@option:check","Olsson Block")
|
||||
checked: false
|
||||
}
|
||||
}
|
||||
|
||||
ExclusiveGroup { id: printerGroup; }
|
||||
}
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue