diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 6c240bcb48..3ff1fb5200 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -339,11 +339,13 @@ UM.MainWindow { id: toolbar; - anchors - { - horizontalCenter: parent.horizontalCenter - horizontalCenterOffset: -(UM.Theme.sizes.panel.width / 2) - top: parent.top; + anchors { + left: parent.left + top: parent.top + topMargin: 74 + //horizontalCenter: parent.horizontalCenter + //horizontalCenterOffset: -(UM.Theme.sizes.sidebar.width / 2) + //top: parent.top; } } @@ -358,7 +360,7 @@ UM.MainWindow right: parent.right; } - width: UM.Theme.sizes.panel.width; + width: UM.Theme.sizes.sidebar.width; addMachineAction: actions.addMachine; configureMachinesAction: actions.configureMachines; diff --git a/resources/qml/SaveButton.qml b/resources/qml/SaveButton.qml index 50cbdf04b6..58d8281555 100644 --- a/resources/qml/SaveButton.qml +++ b/resources/qml/SaveButton.qml @@ -15,6 +15,7 @@ Rectangle property real progress: UM.Backend.progress; property bool activity: Printer.getPlatformActivity; Behavior on progress { NumberAnimation { duration: 250; } } + property int totalHeight: childrenRect.height property variant printDuration: PrintInformation.currentPrintTime; property real printMaterialAmount: PrintInformation.materialAmount; @@ -38,90 +39,134 @@ Rectangle anchors.topMargin: UM.Theme.sizes.default_margin.height; anchors.left: parent.left anchors.leftMargin: UM.Theme.sizes.default_margin.width; - - border.width: UM.Theme.sizes.save_button_border.width - border.color: UM.Theme.colors.save_button_border - color: UM.Theme.colors.save_button_estimated_text_background; - Label + anchors.verticalCenter: parent.verticalCenter + font: UM.Theme.fonts.default; + color: UM.Theme.colors.text_white + } + TextField + { + id: printJobTextfield + anchors.right: parent.right + anchors.rightMargin: UM.Theme.sizes.default_margin.width; + anchors.verticalCenter: parent.verticalCenter + width: parent.width/100*55 + height: UM.Theme.sizes.sidebar_inputFields.height + property int unremovableSpacing: 5 + text: "UM2" + "_" + "filename" ///TODO KOMT NOG + onEditingFinished: { - id: label; - anchors.verticalCenter: parent.verticalCenter - anchors.left: parent.left - anchors.leftMargin: UM.Theme.sizes.save_button_text_margin.width; - visible: base.progress >= 0 && base.progress < 0.99 ? false : true - color: UM.Theme.colors.save_button_estimated_text; - font: UM.Theme.fonts.small; - text: + if (printJobTextfield.text != '') { - if(base.activity == false) - { - return catalog.i18nc("@label","Please load a 3D model"); - } else if (base.progress < 0.99) - { - return catalog.i18nc("@label","Calculating Print-time"); - } else if (base.printDuration.days > 0 || base.progress == null) - { - return ""; - } - else if (base.progress > 0.99) - { - return catalog.i18nc("@label","Estimated Print-time"); - } - return ""; + printJobTextfield.focus = false } } - Label + validator: RegExpValidator { - id: printDurationLabel - anchors.verticalCenter: parent.verticalCenter - anchors.left: label.right; - anchors.leftMargin: UM.Theme.sizes.save_button_text_margin.width; - color: UM.Theme.colors.save_button_printtime_text; - font: UM.Theme.fonts.small; - visible: base.activity == false || base.progress < 0.99 ? false : true - text: (!base.printDuration || !base.printDuration.valid) ? "" : base.printDuration.getDisplayString(UM.DurationFormat.Long); + regExp: /^[0-9a-zA-Z\_\-]*$/ } - Label + style: TextFieldStyle { - id: printMaterialLabel - anchors.verticalCenter: parent.verticalCenter - anchors.left: printDurationLabel.right; - anchors.leftMargin: UM.Theme.sizes.save_button_text_margin.width; - color: base.printDuration.days > 0 ? UM.Theme.colors.save_button_estimated_text : UM.Theme.colors.save_button_printtime_text; - font: UM.Theme.fonts.small; - property bool mediumLengthDuration: base.printDuration.hours > 9 && base.printMaterialAmount > 9.99 && base.printDuration.days == 0 - width: mediumLengthDuration ? 50 : undefined - elide: mediumLengthDuration ? Text.ElideRight : Text.ElideNone - visible: base.activity == false || base.progress < 0.99 ? false : true - //: Print material amount save button label - text: base.printMaterialAmount < 0 ? "" : catalog.i18nc("@label","%1m of Material").arg(base.printMaterialAmount); + textColor: UM.Theme.colors.setting_control_text; + font: UM.Theme.fonts.default; + background: Rectangle + { + radius: 0 + implicitWidth: parent.width + implicitHeight: parent.height + border.width: 1; + border.color: UM.Theme.colors.slider_groove_border; + } } } - Rectangle + } + + Rectangle + { + id: specsRow + implicitWidth: base.width + implicitHeight: UM.Theme.sizes.sidebar_specs_bar.height + anchors.top: printJobRow.bottom + Item { - id: infoBoxOverlay - anchors + id: time + width: (parent.width / 100 * 45) - UM.Theme.sizes.default_margin.width * 2 + height: parent.height + anchors.left: parent.left + anchors.leftMargin: UM.Theme.sizes.default_margin.width + anchors.top: parent.top + visible: base.printMaterialAmount > 0 ? true : false + UM.RecolorImage { - left: infoBox.left; - top: infoBox.top; - bottom: infoBox.bottom; + id: timeIcon + anchors.verticalCenter: parent.verticalCenter + anchors.left: parent.left + width: UM.Theme.sizes.save_button_specs_icons.width + height: UM.Theme.sizes.save_button_specs_icons.height + sourceSize.width: width + sourceSize.height: width + color: UM.Theme.colors.text_hover + source: UM.Theme.icons.print_time; + } + Label + { + id: timeSpec + anchors.verticalCenter: parent.verticalCenter + anchors.left: timeIcon.right + anchors.leftMargin: UM.Theme.sizes.default_margin.width/2 + font: UM.Theme.fonts.default + color: UM.Theme.colors.text + text: (!base.printDuration || !base.printDuration.valid) ? "" : catalog.i18nc("@label","%1 h:m").arg(base.printDuration.getDisplayString(UM.DurationFormat.Short)) } - width: Math.max(infoBox.width * base.progress); - color: UM.Theme.colors.save_button_active - visible: progress > 0.99 ? false : true } + Item + { + width: parent.width / 100 * 55 + height: parent.height + anchors.left: time.right + anchors.top: parent.top + visible: base.printMaterialAmount > 0 ? true : false + UM.RecolorImage + { + id: lengthIcon + anchors.verticalCenter: parent.verticalCenter + anchors.left: parent.left + width: UM.Theme.sizes.save_button_specs_icons.width + height: UM.Theme.sizes.save_button_specs_icons.height + sourceSize.width: width + sourceSize.height: width + color: UM.Theme.colors.text_hover + source: UM.Theme.icons.category_material; + } + Label + { + id: lengthSpec + anchors.verticalCenter: parent.verticalCenter + anchors.left: lengthIcon.right + anchors.leftMargin: UM.Theme.sizes.default_margin.width/2 + font: UM.Theme.fonts.default + color: UM.Theme.colors.text + text: base.printMaterialAmount <= 0 ? "" : catalog.i18nc("@label","%1 m").arg(base.printMaterialAmount) + } + } + } + + Item + { + id: saveRow + implicitWidth: base.width / 100 * 55 + implicitHeight: saveToButton.height + (UM.Theme.sizes.default_margin.height / 2) // height + bottomMargin + anchors.top: specsRow.bottom + anchors.right: parent.right + anchors.rightMargin: UM.Theme.sizes.default_margin.width Button { id: saveToButton - anchors.top: infoBox.bottom - anchors.topMargin: UM.Theme.sizes.save_button_text_margin.height; anchors.left: parent.left - anchors.leftMargin: UM.Theme.sizes.default_margin.width; tooltip: UM.OutputDeviceManager.activeDeviceDescription; enabled: progress > 0.99 && base.activity == true - width: infoBox.width/6*4.5 + width: parent.width - UM.Theme.sizes.save_button_save_to_button.height - 2 height: UM.Theme.sizes.save_button_save_to_button.height text: UM.OutputDeviceManager.activeDeviceShortDescription; @@ -130,13 +175,14 @@ Rectangle { background: Rectangle { - color: !control.enabled ? UM.Theme.colors.save_button_inactive : control.hovered ? UM.Theme.colors.save_button_active_hover : UM.Theme.colors.save_button_active; + color: control.hovered ? UM.Theme.colors.load_save_button_hover : UM.Theme.colors.load_save_button + Behavior on color { ColorAnimation { duration: 50; } } Label { anchors.centerIn: parent - color: UM.Theme.colors.save_button_safe_to_text; - font: UM.Theme.fonts.sidebar_save_to; + color: UM.Theme.colors.load_save_button_text + font: UM.Theme.fonts.default text: control.text; } } @@ -148,56 +194,35 @@ Rectangle Button { id: deviceSelectionMenu; - anchors.top: infoBox.bottom - anchors.topMargin: UM.Theme.sizes.save_button_text_margin.height + tooltip: catalog.i18nc("@action:button","Select the active output device"); anchors.right: parent.right - anchors.rightMargin: UM.Theme.sizes.default_margin.width; - - tooltip: catalog.i18nc("@info:tooltip","Select the active output device"); - - width: infoBox.width/6*1.3 - UM.Theme.sizes.save_button_text_margin.height; + width: UM.Theme.sizes.save_button_save_to_button.height height: UM.Theme.sizes.save_button_save_to_button.height - - iconSource: UM.Theme.icons[UM.OutputDeviceManager.activeDeviceIconName]; + //iconSource: UM.Theme.icons[UM.OutputDeviceManager.activeDeviceIconName]; style: ButtonStyle { - background: Rectangle - { - color: UM.Theme.colors.save_button_background; - border.width: control.hovered ? UM.Theme.sizes.save_button_border.width : 0 - border.color: UM.Theme.colors.save_button_border + background: Rectangle { + id: deviceSelectionIcon + color: control.hovered ? UM.Theme.colors.load_save_button_hover : UM.Theme.colors.load_save_button + Behavior on color { ColorAnimation { duration: 50; } } + anchors.left: parent.left + anchors.leftMargin: UM.Theme.sizes.save_button_text_margin.width / 2; + width: parent.height + height: parent.height - Rectangle - { - id: deviceSelectionIcon - color: UM.Theme.colors.save_button_background; - anchors.left: parent.left - anchors.leftMargin: UM.Theme.sizes.save_button_text_margin.width / 2; - anchors.verticalCenter: parent.verticalCenter; - width: parent.height - UM.Theme.sizes.save_button_text_margin.width ; - height: parent.height - UM.Theme.sizes.save_button_text_margin.width; - - UM.RecolorImage - { - anchors.fill: parent; - sourceSize.width: width; - sourceSize.height: height; - color: UM.Theme.colors.save_button_active - source: control.iconSource; - } - } - Label - { - id: deviceSelectionArrow - anchors.right: parent.right; - anchors.rightMargin: UM.Theme.sizes.save_button_text_margin.height - anchors.verticalCenter: parent.verticalCenter; - text: "▼"; - font: UM.Theme.fonts.tiny; - color: UM.Theme.colors.save_button_active; + UM.RecolorImage { + id: lengthIcon + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + width: UM.Theme.sizes.standard_arrow.width + height: UM.Theme.sizes.standard_arrow.height + sourceSize.width: width + sourceSize.height: width + color: UM.Theme.colors.load_save_button_text + source: UM.Theme.icons.arrow_bottom } } - label: Item { } + label: Label{ } } menu: Menu @@ -212,7 +237,10 @@ Rectangle checkable: true; checked: model.id == UM.OutputDeviceManager.activeDevice; exclusiveGroup: devicesMenuGroup; - onTriggered: UM.OutputDeviceManager.setActiveDevice(model.id); + onTriggered: + { + UM.OutputDeviceManager.setActiveDevice(model.id); + } } onObjectAdded: devicesMenu.insertItem(index, object) onObjectRemoved: devicesMenu.removeItem(object) @@ -220,10 +248,6 @@ Rectangle ExclusiveGroup { id: devicesMenuGroup; } } } + UM.OutputDevicesModel { id: devicesModel; } } - - UM.OutputDevicesModel - { - id: devicesModel; - } -} +} \ No newline at end of file diff --git a/resources/qml/Sidebar.qml b/resources/qml/Sidebar.qml index 6c10cf6136..60ebfb8a81 100644 --- a/resources/qml/Sidebar.qml +++ b/resources/qml/Sidebar.qml @@ -102,7 +102,7 @@ Rectangle { id: saveButton; implicitWidth: base.width - implicitHeight: UM.Theme.sizes.save_button_text_margin.height * 2 + UM.Theme.sizes.save_button_slicing_bar.height + UM.Theme.sizes.save_button_save_to_button.height + UM.Theme.sizes.default_margin.height + implicitHeight: totalHeight } } diff --git a/resources/qml/Toolbar.qml b/resources/qml/Toolbar.qml index 542aceaa15..ca6b625b1b 100644 --- a/resources/qml/Toolbar.qml +++ b/resources/qml/Toolbar.qml @@ -13,8 +13,9 @@ Item { width: buttons.width; height: buttons.height + property int activeY - RowLayout { + ColumnLayout { id: buttons; anchors.bottom: parent.bottom; @@ -39,26 +40,30 @@ Item { //just catch the click so we do not trigger that behaviour. MouseArea { anchors.fill: parent; - onClicked: parent.checked ? UM.Controller.setActiveTool(null) : UM.Controller.setActiveTool(model.id); + onClicked: { + parent.checked ? UM.Controller.setActiveTool(null) : UM.Controller.setActiveTool(model.id); + base.activeY = parent.y + + } } } } } Rectangle { - width: base.width - 10 - height: base.height - z: parent.z - 1 - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - color: UM.Theme.colors.lining - } + width: base.width + height: base.height + z: parent.z - 1 + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + color: UM.Theme.colors.lining + } Rectangle { id: panelBackground; - anchors.left: parent.left; - anchors.top: buttons.bottom; + anchors.left: parent.right; + y: base.activeY width: panel.item ? Math.max(panel.width + 2 * UM.Theme.sizes.default_margin.width) : 0; height: panel.item ? panel.height + 2 * UM.Theme.sizes.default_margin.height : 0; diff --git a/resources/themes/cura/icons/arrow_bottom.svg b/resources/themes/cura/icons/arrow_bottom.svg new file mode 100644 index 0000000000..792972dcba --- /dev/null +++ b/resources/themes/cura/icons/arrow_bottom.svg @@ -0,0 +1,7 @@ + + + + + diff --git a/resources/themes/cura/icons/arrow_left.svg b/resources/themes/cura/icons/arrow_left.svg new file mode 100644 index 0000000000..4d9ac60bde --- /dev/null +++ b/resources/themes/cura/icons/arrow_left.svg @@ -0,0 +1,7 @@ + + + + + diff --git a/resources/themes/cura/icons/arrow_right.svg b/resources/themes/cura/icons/arrow_right.svg new file mode 100644 index 0000000000..561b0c8200 --- /dev/null +++ b/resources/themes/cura/icons/arrow_right.svg @@ -0,0 +1,7 @@ + + + + + diff --git a/resources/themes/cura/icons/arrow_top.svg b/resources/themes/cura/icons/arrow_top.svg new file mode 100644 index 0000000000..750783af0c --- /dev/null +++ b/resources/themes/cura/icons/arrow_top.svg @@ -0,0 +1,7 @@ + + + + + diff --git a/resources/themes/cura/icons/basic.svg b/resources/themes/cura/icons/basic.svg new file mode 100644 index 0000000000..48b2adad19 --- /dev/null +++ b/resources/themes/cura/icons/basic.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + diff --git a/resources/themes/cura/icons/light.svg b/resources/themes/cura/icons/light.svg new file mode 100644 index 0000000000..e32a7345b1 --- /dev/null +++ b/resources/themes/cura/icons/light.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + diff --git a/resources/themes/cura/icons/medium.svg b/resources/themes/cura/icons/medium.svg new file mode 100644 index 0000000000..44097c21de --- /dev/null +++ b/resources/themes/cura/icons/medium.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + diff --git a/resources/themes/cura/icons/plus.svg b/resources/themes/cura/icons/plus.svg new file mode 100644 index 0000000000..a8f9f201ca --- /dev/null +++ b/resources/themes/cura/icons/plus.svg @@ -0,0 +1,8 @@ + + + + + + diff --git a/resources/themes/cura/icons/print_time.svg b/resources/themes/cura/icons/print_time.svg new file mode 100644 index 0000000000..787c7c3eb7 --- /dev/null +++ b/resources/themes/cura/icons/print_time.svg @@ -0,0 +1,8 @@ + + + + + diff --git a/resources/themes/cura/icons/quick.svg b/resources/themes/cura/icons/quick.svg new file mode 100644 index 0000000000..9b1c07a584 --- /dev/null +++ b/resources/themes/cura/icons/quick.svg @@ -0,0 +1,10 @@ + + + + + + + + + diff --git a/resources/themes/cura/icons/setting_per_object.svg b/resources/themes/cura/icons/setting_per_object.svg new file mode 100644 index 0000000000..9c5bd9bc8d --- /dev/null +++ b/resources/themes/cura/icons/setting_per_object.svg @@ -0,0 +1,7 @@ + + + + + diff --git a/resources/themes/cura/icons/strong.svg b/resources/themes/cura/icons/strong.svg new file mode 100644 index 0000000000..9c527ecc92 --- /dev/null +++ b/resources/themes/cura/icons/strong.svg @@ -0,0 +1,14 @@ + + + + + + + + + diff --git a/resources/themes/cura/icons/ulti.svg b/resources/themes/cura/icons/ulti.svg new file mode 100644 index 0000000000..48b2adad19 --- /dev/null +++ b/resources/themes/cura/icons/ulti.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index f5f93bf547..01267eadb3 100644 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -67,11 +67,14 @@ QtObject { Rectangle { id: tool_button_background - anchors.top: parent.bottom + anchors.left: parent.right + anchors.verticalCenter: parent.verticalCenter + //anchors.top: parent.bottom - width: label.width > parent.width ? label.width : parent.width - height: control.hovered ? label.height : 0; - Behavior on height { NumberAnimation { duration: 100; } } + //width: label.width > parent.width ? label.width : parent.width + width: control.hovered ? label.width : 0; + height: label.height + Behavior on width { NumberAnimation { duration: 100; } } opacity: control.hovered ? 1.0 : 0.0; Behavior on opacity { NumberAnimation { duration: 100; } } diff --git a/resources/themes/cura/theme.json b/resources/themes/cura/theme.json index 6989cdc475..919abbda6f 100644 --- a/resources/themes/cura/theme.json +++ b/resources/themes/cura/theme.json @@ -32,10 +32,6 @@ "capitalize": true, "family": "ProximaNova" }, - "sidebar_save_to": { - "size": 1.0, - "family": "ProximaNova" - }, "timeslider_time": { "size": 1.0, "bold": true, @@ -64,9 +60,12 @@ "text": [140, 144, 154, 255], "text_inactive": [174, 174, 174, 255], + "text_white": [255, 255, 255, 255], "text_hover": [35, 35, 35, 255], "text_pressed": [12, 169, 227, 255], + "sidebar_header_bar": [12, 169, 227, 255], + "button": [139, 143, 153, 255], "button_hover": [77, 184, 226, 255], "button_active": [32, 166, 219, 255], @@ -142,14 +141,20 @@ "window_margin": [2.0, 2.0], "default_margin": [1.0, 1.0], "default_lining": [0.1, 0.1], - "panel": [22.0, 10.0], "logo": [9.5, 2.0], "toolbar_button": [2.0, 2.0], "toolbar_spacing": [1.0, 1.0], + "loadfile_button": [11.0, 2.4], "loadfile_margin": [0.8, 0.4], + "sidebar": [24.0, 10.0], + "sidebar_header": [0.0, 3.2], + "sidebar_subParts": [0.0, 2.4], + "sidebar_specs_bar": [0.0, 2.2], + "sidebar_inputFields": [0.0, 1.9], + "section": [22.0, 3.0], "section_icon": [2.14, 2.14], "section_text_margin": [0.33, 0.33], @@ -162,6 +167,7 @@ "standard_list_lineheight": [1.5, 1.5], "standard_list_input": [20.0, 25.0], + "standard_arrow": [0.6, 0.6], "button": [3.2, 3.2], "button_icon": [2.5, 2.5], @@ -189,6 +195,7 @@ "save_button_slicing_bar": [0.0, 2.2], "save_button_label_margin": [0.5, 0.5], "save_button_save_to_button": [0.3, 2.7], + "save_button_specs_icons": [1.4, 1.4], "modal_window_minimum": [30.0, 30.0], "wizard_progress": [10.0, 0.0],