From 42b8e87d0035c83510de79633efb6def15b9bb61 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 21 Aug 2017 10:50:36 +0200 Subject: [PATCH 01/74] Make opacity of print monitor themeable The new dark design specifies a colour for the print monitor overlay that is darker than what would be attainable with the default 75% opacity. So I'm making it 100% opacity (but still with a fade, so we need the opacity) and let the theme specify what opacity it wants. Contributes to issue CURA-4148. --- resources/qml/Cura.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 85b17e28a2..35048925eb 100755 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -447,7 +447,7 @@ UM.MainWindow right: sidebar.left } visible: opacity > 0 - opacity: base.showPrintMonitor ? 0.75 : 0 + opacity: base.showPrintMonitor ? 1 : 0 Behavior on opacity { NumberAnimation { duration: 100; } } From 226bb7b0702fca374be39e87b8865efba25cf8c3 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 21 Aug 2017 11:55:47 +0200 Subject: [PATCH 02/74] Write out border colour as full-fledged function This makes it easier to read and to modify this functionality rather than a string of ternary operators. It's about to become more complicated too. Contributes to issue CURA-4148. --- resources/themes/cura/styles.qml | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index 30e3ce9ab8..c8d5b07e03 100755 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -66,18 +66,37 @@ QtObject { else if(control.valueWarning) { return Theme.getColor("setting_validation_warning"); - } else + } + else { return Theme.getColor("setting_control"); } - } else { + } + else + { return Theme.getColor("setting_control_disabled"); } } border.width: Theme.getSize("default_lining").width - border.color: !control.enabled ? Theme.getColor("setting_control_disabled_border") : - control.hovered ? Theme.getColor("setting_control_border_highlight") : Theme.getColor("setting_control_border") + border.color: + { + if (control_enabled) + { + if (control.hovered) + { + return Theme.getColor("setting_control_border_highlight"); + } + else + { + return Theme.getColor("setting_control_border"); + } + } + else + { + return Theme.getColor("setting_control_disabled_border"); + } + } UM.RecolorImage { id: downArrow anchors.verticalCenter: parent.verticalCenter From 4b8152d6fe8c493695a964f8afb718b10ac34688 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 21 Aug 2017 13:21:33 +0200 Subject: [PATCH 03/74] Allow fallthrough of switch statement Makes it easier to modify. Contributes to issue CURA-4148. --- resources/qml/Settings/SettingTextField.qml | 3 --- 1 file changed, 3 deletions(-) diff --git a/resources/qml/Settings/SettingTextField.qml b/resources/qml/Settings/SettingTextField.qml index 2991c24d57..0c10d6edde 100644 --- a/resources/qml/Settings/SettingTextField.qml +++ b/resources/qml/Settings/SettingTextField.qml @@ -39,13 +39,10 @@ SettingItem switch(propertyProvider.properties.validationState) { case "ValidatorState.Exception": - return UM.Theme.getColor("setting_validation_error") case "ValidatorState.MinimumError": - return UM.Theme.getColor("setting_validation_error") case "ValidatorState.MaximumError": return UM.Theme.getColor("setting_validation_error") case "ValidatorState.MinimumWarning": - return UM.Theme.getColor("setting_validation_warning") case "ValidatorState.MaximumWarning": return UM.Theme.getColor("setting_validation_warning") case "ValidatorState.Valid": From d94956dd2355d2db9342ab956e50657d7af86c08 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 21 Aug 2017 13:51:36 +0200 Subject: [PATCH 04/74] Give time estimate a different text colour Apparently it needs to be highlit a bit more than the rest. Contributes to issue CURA-4148. --- resources/qml/Sidebar.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Sidebar.qml b/resources/qml/Sidebar.qml index 969848f456..1dc7fdc451 100755 --- a/resources/qml/Sidebar.qml +++ b/resources/qml/Sidebar.qml @@ -430,7 +430,7 @@ Rectangle anchors.left: parent.left anchors.bottom: parent.bottom font: UM.Theme.getFont("large") - color: UM.Theme.getColor("text_subtext") + color: UM.Theme.getColor("text_emphasis") text: (!base.printDuration || !base.printDuration.valid) ? catalog.i18nc("@label", "00h 00min") : base.printDuration.getDisplayString(UM.DurationFormat.Short) } } From 5652bccc58131630a48c4fcd4f0ecfbbba0d64f9 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 21 Aug 2017 13:56:07 +0200 Subject: [PATCH 05/74] Change control border colour depending on validation state The background colour was already changing, but the border colour was only depending on the hover state. Contributes to issue CURA-4148. --- resources/qml/Settings/SettingTextField.qml | 11 +++++++++++ resources/themes/cura/styles.qml | 12 ++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/resources/qml/Settings/SettingTextField.qml b/resources/qml/Settings/SettingTextField.qml index 0c10d6edde..d80daf23b0 100644 --- a/resources/qml/Settings/SettingTextField.qml +++ b/resources/qml/Settings/SettingTextField.qml @@ -24,6 +24,17 @@ SettingItem { return UM.Theme.getColor("setting_control_disabled_border") } + switch(propertyProvider.properties.validationState) + { + case "ValidatorState.Exception": + case "ValidatorState.MinimumError": + case "ValidatorState.MaximumError": + return UM.Theme.getColor("setting_validation_error_border"); + case "ValidatorState.MinimumWarning": + case "ValidatorState.MaximumWarning": + return UM.Theme.getColor("setting_validation_warning_border"); + } + //Validation is OK. if(hovered || input.activeFocus) { return UM.Theme.getColor("setting_control_border_highlight") diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index c8d5b07e03..b0013ca894 100755 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -81,9 +81,17 @@ QtObject { border.width: Theme.getSize("default_lining").width border.color: { - if (control_enabled) + if (control.enabled) { - if (control.hovered) + if (control.valueError) + { + return Theme.getColor("setting_validation_error_border"); + } + else if (control.valueWarning) + { + return Theme.getColor("setting_validation_warning_border"); + } + else if (control.hovered) { return Theme.getColor("setting_control_border_highlight"); } From d73bbabda9dea2cdb3536b59b219f0080fa60e77 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 21 Aug 2017 14:11:16 +0200 Subject: [PATCH 06/74] Change top bar text colour depending on hover and active state Too bad we have to introduce additional theme entries for this sort of thing. Makes it harder to modify the theme! Contributes to issue CURA-4148. --- resources/qml/Topbar.qml | 4 ++-- resources/themes/cura/styles.qml | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/resources/qml/Topbar.qml b/resources/qml/Topbar.qml index 1b5792124e..cae7fec108 100644 --- a/resources/qml/Topbar.qml +++ b/resources/qml/Topbar.qml @@ -44,7 +44,7 @@ Rectangle iconSource: UM.Theme.getIcon("tab_settings"); property color overlayColor: "transparent" property string overlayIconSource: "" - text: catalog.i18nc("@title:tab","Prepare") + text: catalog.i18nc("@title:tab", "Prepare") checkable: true checked: !base.monitoringPrint exclusiveGroup: sidebarHeaderBarGroup @@ -197,7 +197,7 @@ Rectangle Label { id: sidebarComboBoxLabel - color: UM.Theme.getColor("text_reversed") + color: UM.Theme.getColor("sidebar_header_text_active") text: control.text; elide: Text.ElideRight; anchors.left: parent.left; diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index b0013ca894..d3069287da 100755 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -210,7 +210,21 @@ QtObject { anchors.leftMargin: Theme.getSize("default_margin").width anchors.verticalCenter: parent.verticalCenter; font: UM.Theme.getFont("large"); - color: UM.Theme.getColor("text_reversed") + color: + { + if(control.hovered) + { + return UM.Theme.getColor("sidebar_header_text_hover"); + } + if(control.checked) + { + return UM.Theme.getColor("sidebar_header_text_active"); + } + else + { + return UM.Theme.getColor("sidebar_header_text_inactive"); + } + } } } } From f88ffee638a49cf970e368de6eb5138980c2a38d Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 21 Aug 2017 14:43:35 +0200 Subject: [PATCH 07/74] Make button text and icons change colour on active and hover Just like the background colour, the foreground colour may now also change. Contributes to issue CURA-4148. --- resources/themes/cura/styles.qml | 40 ++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index d3069287da..cc9e16fda1 100755 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -301,7 +301,25 @@ QtObject { sourceSize.width: width sourceSize.height: width visible: control.menu != null; - color: Theme.getColor("button_text") + color: + { + if(control.checkable && control.checked && control.hovered) + { + return Theme.getColor("button_text_active_hover"); + } + else if(control.pressed || (control.checkable && control.checked)) + { + return Theme.getColor("button_text_active"); + } + else if(control.hovered) + { + return Theme.getColor("button_text_hover"); + } + else + { + return Theme.getColor("button_text"); + } + } source: Theme.getIcon("arrow_bottom") } } @@ -314,7 +332,25 @@ QtObject { source: control.iconSource; width: Theme.getSize("button_icon").width; height: Theme.getSize("button_icon").height; - color: Theme.getColor("button_text") + color: + { + if(control.checkable && control.checked && control.hovered) + { + return Theme.getColor("button_text_active_hover"); + } + else if(control.pressed || (control.checkable && control.checked)) + { + return Theme.getColor("button_text_active"); + } + else if(control.hovered) + { + return Theme.getColor("button_text_hover"); + } + else + { + return Theme.getColor("button_text"); + } + } sourceSize: Theme.getSize("button_icon") } From d50f498fef6e3b8d0ac08b0a6fe0275e7aa51859 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 21 Aug 2017 14:50:27 +0200 Subject: [PATCH 08/74] Let button inactive opacity be defined by theme colours They have an alpha channel. Let's put it to use... Contributes to issue CURA-4148. --- resources/themes/cura/styles.qml | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index cc9e16fda1..5e9b584a3b 100755 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -291,7 +291,6 @@ QtObject { UM.RecolorImage { id: tool_button_arrow - opacity: !control.enabled ? 0.2 : 1.0 anchors.right: parent.right; anchors.rightMargin: (Theme.getSize("button").width - Theme.getSize("button_icon").width) / 4 anchors.bottom: parent.bottom; From 12de8372b9e93ac255a0b5cd131345d42ac6df91 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 21 Aug 2017 14:59:14 +0200 Subject: [PATCH 09/74] Use tooltip button colour for tooltips That's what the theme entry was made for, wasn't it? Contributes to issue CURA-4148. --- resources/themes/cura/styles.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index 5e9b584a3b..47473c0c78 100755 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -246,7 +246,7 @@ QtObject { target: Qt.point(parent.x, y + height/2) arrowSize: Theme.getSize("button_tooltip_arrow").width - color: Theme.getColor("tooltip") + color: Theme.getColor("button_tooltip") opacity: control.hovered ? 1.0 : 0.0; width: control.hovered ? button_tip.width + Theme.getSize("button_tooltip").width : 0 From b2338d9c2e32c2f1130cfb08585129f5d99c80ca Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 21 Aug 2017 15:11:07 +0200 Subject: [PATCH 10/74] Re-use action button styling now that toggle is gone We should keep these two types of buttons in sync, so have them share a theme. Contributes to issue CURA-4148. --- resources/qml/Sidebar.qml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/resources/qml/Sidebar.qml b/resources/qml/Sidebar.qml index 1dc7fdc451..c527e961df 100755 --- a/resources/qml/Sidebar.qml +++ b/resources/qml/Sidebar.qml @@ -168,18 +168,18 @@ Rectangle style: ButtonStyle { background: Rectangle { 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") + border.color: (control.checked || 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.checked || 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; } } Label { anchors.centerIn: parent - 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") + color: (control.checked || 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("default") text: control.text; } From 02e96f510aa412cb3ad4234902fb39cc351d68b4 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 21 Aug 2017 17:05:39 +0200 Subject: [PATCH 11/74] Add hover and active colours for setting category text They need to be able to have a different text colour depending on whether you're hovering, the category is expanded or not, etc. Contributes to issue CURA-4148. --- resources/themes/cura/styles.qml | 74 ++++++++++++++++++++++++++++++-- 1 file changed, 70 insertions(+), 4 deletions(-) diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index 47473c0c78..4014fbb94f 100755 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -114,7 +114,7 @@ QtObject { height: Theme.getSize("standard_arrow").height sourceSize.width: width sourceSize.height: width - color: control.enabled ? Theme.getColor("setting_category_text") : Theme.getColor("setting_control_disabled_text") + color: control.enabled ? Theme.getColor("setting_category_text") : Theme.getColor("setting_category_disabled_text") source: Theme.getIcon("arrow_bottom") } Label { @@ -458,7 +458,29 @@ QtObject { anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left anchors.leftMargin: Theme.getSize("default_margin").width - color: Theme.getColor("setting_category_text") + color: + { + if(!control.enabled) + { + return Theme.getColor("setting_category_disabled_text"); + } + else if((control.hovered || control.activeFocus) && control.checkable && control.checked) + { + return Theme.getColor("setting_category_active_hover_text"); + } + else if(control.pressed || (control.checkable && control.checked)) + { + return Theme.getColor("setting_category_active_text"); + } + else if(control.hovered || control.activeFocus) + { + return Theme.getColor("setting_category_hover_text"); + } + else + { + return Theme.getColor("setting_category_text"); + } + } source: control.iconSource; width: Theme.getSize("section_icon").width; height: Theme.getSize("section_icon").height; @@ -476,7 +498,29 @@ QtObject { } text: control.text; font: Theme.getFont("setting_category"); - color: Theme.getColor("setting_category_text"); + color: + { + if(!control.enabled) + { + return Theme.getColor("setting_category_disabled_text"); + } + else if((control.hovered || control.activeFocus) && control.checkable && control.checked) + { + return Theme.getColor("setting_category_active_hover_text"); + } + else if(control.pressed || (control.checkable && control.checked)) + { + return Theme.getColor("setting_category_active_text"); + } + else if(control.hovered || control.activeFocus) + { + return Theme.getColor("setting_category_hover_text"); + } + else + { + return Theme.getColor("setting_category_text"); + } + } fontSizeMode: Text.HorizontalFit; minimumPointSize: 8 } @@ -489,7 +533,29 @@ QtObject { height: Theme.getSize("standard_arrow").height sourceSize.width: width sourceSize.height: width - color: Theme.getColor("setting_category_text") + color: + { + if(!control.enabled) + { + return Theme.getColor("setting_category_disabled_text"); + } + else if((control.hovered || control.activeFocus) && control.checkable && control.checked) + { + return Theme.getColor("setting_category_active_hover_text"); + } + else if(control.pressed || (control.checkable && control.checked)) + { + return Theme.getColor("setting_category_active_text"); + } + else if(control.hovered || control.activeFocus) + { + return Theme.getColor("setting_category_hover_text"); + } + else + { + return Theme.getColor("setting_category_text"); + } + } source: control.checked ? Theme.getIcon("arrow_bottom") : Theme.getIcon("arrow_left") } } From 9d910be2124e2f31c49eb054cb40b095c12cfa5f Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 21 Aug 2017 18:28:06 +0200 Subject: [PATCH 12/74] Add borders to layer view slider handles And all other sliders, of which we have exactly 0. Contributes to issue CURA-4148. --- plugins/LayerView/LayerView.qml | 6 +++++- resources/themes/cura/styles.qml | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/LayerView/LayerView.qml b/plugins/LayerView/LayerView.qml index ad952f6ca1..095cc4d5b4 100755 --- a/plugins/LayerView/LayerView.qml +++ b/plugins/LayerView/LayerView.qml @@ -1,4 +1,4 @@ -// Copyright (c) 2015 Ultimaker B.V. +// Copyright (c) 2017 Ultimaker B.V. // Cura is released under the terms of the AGPLv3 or higher. import QtQuick 2.2 @@ -487,6 +487,8 @@ Item anchors.horizontalCenter: parent.horizontalCenter radius: parent.handleRadius color: parent.upperHandleColor + border.width: UM.Theme.getSize("default_lining").width + border.color: UM.Theme.getColor("slider_handle_border") visible: slider.layersVisible @@ -526,6 +528,8 @@ Item anchors.horizontalCenter: parent.horizontalCenter radius: parent.handleRadius color: parent.lowerHandleColor + border.width: UM.Theme.getSize("default_lining").width + border.color: UM.Theme.getColor("slider_handle_border") visible: slider.layersVisible diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index 4014fbb94f..63f2d3ac7d 100755 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -769,7 +769,9 @@ QtObject { width: Theme.getSize("slider_handle").width; height: Theme.getSize("slider_handle").height; color: control.hovered ? Theme.getColor("slider_handle_hover") : Theme.getColor("slider_handle"); - radius: Theme.getSize("slider_handle").width/2; + border.width: Theme.getSize("default_lining").width + border.color: control.hovered ? Theme.getColor("slider_handle_hover_border") : Theme.getColor("slider_handle_border") + radius: Theme.getSize("slider_handle").width / 2; //Round. Behavior on color { ColorAnimation { duration: 50; } } } } From ff30268dd74af2697293490a9379bc05f158415d Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 21 Aug 2017 18:41:58 +0200 Subject: [PATCH 13/74] Remove unused mode switch Don't want to have to fill in theme items for that thing too. Contributes to issue CURA-4148. --- resources/themes/cura/styles.qml | 44 -------------------------------- 1 file changed, 44 deletions(-) diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index 63f2d3ac7d..b5c4682e63 100755 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -8,50 +8,6 @@ import QtQuick.Controls.Styles 1.1 import UM 1.1 as UM QtObject { - property Component mode_switch: Component { - SwitchStyle { - groove: Rectangle { - implicitWidth: UM.Theme.getSize("mode_switch").width - implicitHeight: UM.Theme.getSize("mode_switch").height - radius: implicitHeight / 2 - color: { - if(control.hovered || control._hovered) { - return UM.Theme.getColor("mode_switch_hover"); - } else { - return UM.Theme.getColor("mode_switch"); - } - } - Behavior on color { ColorAnimation { duration: 50; } } - border.color: { - if(control.hovered || control._hovered) { - return UM.Theme.getColor("mode_switch_border_hover"); - } else { - return UM.Theme.getColor("mode_switch_border"); - } - } - Behavior on border.color { ColorAnimation { duration: 50; } } - border.width: 1 - } - - handle: Rectangle { - implicitWidth: implicitHeight - implicitHeight: UM.Theme.getSize("mode_switch").height - radius: implicitHeight / 2 - - color: { - if (control.pressed || (control.checkable && control.checked)) { - return UM.Theme.getColor("sidebar_header_active"); - } else if(control.hovered) { - return UM.Theme.getColor("sidebar_header_hover"); - } else { - return UM.Theme.getColor("sidebar_header_bar"); - } - } - Behavior on color { ColorAnimation { duration: 50; } } - } - } - } - property Component sidebar_header_button: Component { ButtonStyle { background: Rectangle { From 09fef6071194da308171f2417b2e8fa077add5e5 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 21 Aug 2017 19:11:57 +0200 Subject: [PATCH 14/74] Switch to dark colours This is the big one. The progress bar buttons and progress bars haven't been properly updated yet, since I have no new information about those. Also, some things currently look kind of weird because they were designed for a different layout. For instance, the layer view slider has a black rails on a black background, since it was designed for being on the white background of the 3D view. Contributes to issue CURA-4148. --- resources/themes/cura/theme.json | 251 +++++++++++++++---------------- 1 file changed, 121 insertions(+), 130 deletions(-) diff --git a/resources/themes/cura/theme.json b/resources/themes/cura/theme.json index d0919a8051..eb34b75298 100644 --- a/resources/themes/cura/theme.json +++ b/resources/themes/cura/theme.json @@ -48,151 +48,143 @@ }, "colors": { - "sidebar": [255, 255, 255, 255], - "lining": [127, 127, 127, 255], - "viewport_overlay": [24, 41, 77, 255], + "sidebar": [39, 44, 48, 255], + "lining": [64, 69, 72, 255], + "viewport_overlay": [0, 6, 9, 222], "primary": [12, 169, 227, 255], "primary_hover": [48, 182, 231, 255], - "primary_text": [255, 255, 255, 255], + "primary_text": [255, 255, 255, 204], "border": [127, 127, 127, 255], - "secondary": [245, 245, 245, 255], + "secondary": [241, 242, 242, 255], - "text": [24, 41, 77, 255], - "text_detail": [174, 174, 174, 128], - "text_link": [12, 169, 227, 255], - "text_inactive": [174, 174, 174, 255], - "text_hover": [70, 84, 113, 255], - "text_pressed": [12, 169, 227, 255], + "text": [255, 255, 255, 204], + "text_detail": [255, 255, 255, 172], + "text_link": [255, 255, 255, 127], + "text_inactive": [255, 255, 255, 88], + "text_hover": [255, 255, 255, 204], + "text_pressed": [255, 255, 255, 204], "text_reversed": [255, 255, 255, 255], - "text_subtext": [70, 84, 113, 255], + "text_subtext": [255, 255, 255, 172], + "text_emphasis": [255, 255, 255, 255], - "error": [255, 140, 0, 255], - "sidebar_header_bar": [24, 41, 77, 255], - "sidebar_header_active": [70, 84, 113, 255], - "sidebar_header_hover": [24, 41, 77, 255], - "sidebar_header_highlight": [12, 169, 227, 255], - "sidebar_header_highlight_hover": [255, 255, 255, 255], - "sidebar_lining": [245, 245, 245, 255], + "error": [212, 31, 53, 255], + "sidebar_header_bar": [39, 44, 48, 255], + "sidebar_header_active": [39, 44, 48, 255], + "sidebar_header_hover": [39, 44, 48, 255], + "sidebar_header_highlight": [68, 192, 255, 255], + "sidebar_header_highlight_hover": [68, 192, 255, 255], + "sidebar_header_text_active": [255, 255, 255, 255], + "sidebar_header_text_hover": [255, 255, 255, 255], + "sidebar_header_text_inactive": [255, 255, 255, 127], + "sidebar_lining": [31, 36, 39, 255], - "button": [24, 41, 77, 255], - "button_hover": [70, 84, 113, 255], - "button_active": [32, 166, 219, 255], - "button_active_hover": [12, 169, 227, 255], - "button_text": [255, 255, 255, 255], - "button_disabled": [24, 41, 77, 255], - "button_disabled_text": [70, 84, 113, 255], + "button": [39, 44, 48, 255], + "button_hover": [39, 44, 48, 255], + "button_active": [67, 72, 75, 255], + "button_active_hover": [67, 72, 75, 255], + "button_text": [255, 255, 255, 197], + "button_text_hover": [255, 255, 255, 255], + "button_text_active": [255, 255, 255, 255], + "button_text_active_hover": [255, 255, 255, 255], + "button_disabled": [39, 44, 48, 255], + "button_disabled_text": [255, 255, 255, 101], - "button_tooltip": [255, 255, 255, 255], - "button_tooltip_border": [24, 41, 77, 255], - "button_tooltip_text": [24, 41, 77, 255], + "button_tooltip": [39, 44, 48, 255], + "button_tooltip_border": [39, 44, 48, 255], + "button_tooltip_text": [255, 255, 255, 172], - "toggle_checked": [24, 41, 77, 255], - "toggle_checked_border": [24, 41, 77, 255], - "toggle_checked_text": [255, 255, 255, 255], - "toggle_unchecked": [255, 255, 255, 255], - "toggle_unchecked_border": [127, 127, 127, 255], - "toggle_unchecked_text": [24, 41, 77, 255], - "toggle_hovered": [255, 255, 255, 255], - "toggle_hovered_border": [32, 166, 219, 255], - "toggle_hovered_text": [24, 41, 77, 255], - "toggle_active": [32, 166, 219, 255], - "toggle_active_border": [32, 166, 219, 255], - "toggle_active_text": [24, 41, 77, 255], + "tab_checked": [39, 44, 48, 255], + "tab_checked_border": [255, 255, 255, 30], + "tab_checked_text": [255, 255, 255, 255], + "tab_unchecked": [39, 44, 48, 255], + "tab_unchecked_border": [255, 255, 255, 30], + "tab_unchecked_text": [255, 255, 255, 101], + "tab_hovered": [39, 44, 48, 255], + "tab_hovered_border": [255, 255, 255, 30], + "tab_hovered_text": [255, 255, 255, 255], + "tab_active": [39, 44, 48, 255], + "tab_active_border": [255, 255, 255, 30], + "tab_active_text": [255, 255, 255, 255], + "tab_background": [39, 44, 48, 255], - "tab_checked": [255, 255, 255, 255], - "tab_checked_border": [255, 255, 255, 255], - "tab_checked_text": [24, 41, 77, 255], - "tab_unchecked": [245, 245, 245, 255], - "tab_unchecked_border": [245, 245, 245, 255], - "tab_unchecked_text": [127, 127, 127, 255], - "tab_hovered": [245, 245, 245, 255], - "tab_hovered_border": [245, 245, 245, 255], - "tab_hovered_text": [32, 166, 219, 255], - "tab_active": [255, 255, 255, 255], - "tab_active_border": [255, 255, 255, 255], - "tab_active_text": [24, 41, 77, 255], - "tab_background": [245, 245, 245, 255], - - "action_button": [255, 255, 255, 255], - "action_button_text": [24, 41, 77, 255], - "action_button_border": [127, 127, 127, 255], - "action_button_hovered": [255, 255, 255, 255], - "action_button_hovered_text": [24, 41, 77, 255], - "action_button_hovered_border": [12, 169, 227, 255], - "action_button_active": [12, 169, 227, 255], + "action_button": [39, 44, 48, 255], + "action_button_text": [255, 255, 255, 101], + "action_button_border": [255, 255, 255, 30], + "action_button_hovered": [39, 44, 48, 255], + "action_button_hovered_text": [255, 255, 255, 255], + "action_button_hovered_border": [255, 255, 255, 30], + "action_button_active": [39, 44, 48, 30], "action_button_active_text": [255, 255, 255, 255], - "action_button_active_border": [12, 169, 227, 255], - "action_button_disabled": [245, 245, 245, 255], - "action_button_disabled_text": [127, 127, 127, 255], - "action_button_disabled_border": [245, 245, 245, 255], + "action_button_active_border": [255, 255, 255, 30], + "action_button_disabled": [39, 44, 48, 255], + "action_button_disabled_text": [255, 255, 255, 101], + "action_button_disabled_border": [255, 255, 255, 30], - "scrollbar_background": [255, 255, 255, 255], - "scrollbar_handle": [24, 41, 77, 255], - "scrollbar_handle_hover": [12, 159, 227, 255], - "scrollbar_handle_down": [12, 159, 227, 255], + "scrollbar_background": [39, 44, 48, 0], + "scrollbar_handle": [255, 255, 255, 105], + "scrollbar_handle_hover": [255, 255, 255, 255], + "scrollbar_handle_down": [255, 255, 255, 255], - "setting_category": [245, 245, 245, 255], - "setting_category_disabled": [255, 255, 255, 255], - "setting_category_hover": [245, 245, 245, 255], - "setting_category_active": [245, 245, 245, 255], - "setting_category_active_hover": [245, 245, 245, 255], - "setting_category_text": [24, 41, 77, 255], - "setting_category_border": [245, 245, 245, 255], - "setting_category_disabled_border": [245, 245, 245, 255], - "setting_category_hover_border": [12, 159, 227, 255], - "setting_category_active_border": [245, 245, 245, 255], - "setting_category_active_hover_border": [12, 159, 227, 255], + "setting_category": [39, 44, 48, 255], + "setting_category_disabled": [39, 44, 48, 255], + "setting_category_hover": [39, 44, 48, 255], + "setting_category_active": [39, 44, 48, 255], + "setting_category_active_hover": [39, 44, 48, 255], + "setting_category_text": [255, 255, 255, 152], + "setting_category_disabled_text": [255, 255, 255, 101], + "setting_category_hover_text": [255, 255, 255, 204], + "setting_category_active_text": [255, 255, 255, 204], + "setting_category_active_hover_text": [255, 255, 255, 204], + "setting_category_border": [39, 44, 48, 0], + "setting_category_disabled_border": [39, 44, 48, 0], + "setting_category_hover_border": [39, 44, 48, 0], + "setting_category_active_border": [39, 44, 48, 0], + "setting_category_active_hover_border": [39, 44, 48, 0], - "setting_control": [255, 255, 255, 255], - "setting_control_selected": [24, 41, 77, 255], + "setting_control": [43, 48, 52, 255], + "setting_control_selected": [34, 39, 42, 38], "setting_control_highlight": [255, 255, 255, 0], - "setting_control_border": [127, 127, 127, 255], - "setting_control_border_highlight": [12, 169, 227, 255], - "setting_control_text": [24, 41, 77, 255], - "setting_control_depth_line": [127, 127, 127, 255], - "setting_control_button": [127, 127, 127, 255], - "setting_control_button_hover": [70, 84, 113, 255], - "setting_control_disabled": [245, 245, 245, 255], - "setting_control_disabled_text": [127, 127, 127, 255], - "setting_control_disabled_border": [127, 127, 127, 255], - "setting_unit": [127, 127, 127, 255], - "setting_validation_error": [255, 57, 14, 255], - "setting_validation_warning": [255, 186, 15, 255], - "setting_validation_ok": [255, 255, 255, 255], + "setting_control_border": [255, 255, 255, 38], + "setting_control_border_highlight": [255, 255, 255, 38], + "setting_control_text": [255, 255, 255, 181], + "setting_control_button": [255, 255, 255, 127], + "setting_control_button_hover": [255, 255, 255, 204], + "setting_control_disabled": [34, 39, 42, 255], + "setting_control_disabled_text": [255, 255, 255, 101], + "setting_control_disabled_border": [255, 255, 255, 101], + "setting_unit": [255, 255, 255, 127], + "setting_validation_error": [59, 31, 53, 255], + "setting_validation_error_border": [212, 31, 53, 255], + "setting_validation_warning": [62, 54, 46, 255], + "setting_validation_warning_border": [245, 166, 35, 255], + "setting_validation_ok": [43, 48, 52, 255], - "progressbar_background": [245, 245, 245, 255], - "progressbar_control": [24, 41, 77, 255], + "progressbar_background": [255, 255, 255, 48], + "progressbar_control": [255, 255, 255, 197], - "slider_groove": [245, 245, 245, 255], - "slider_groove_border": [127, 127, 127, 255], - "slider_groove_fill": [127, 127, 127, 255], - "slider_handle": [32, 166, 219, 255], - "slider_handle_hover": [77, 182, 226, 255], - "slider_text_background": [255, 255, 255, 255], + "slider_groove": [39, 44, 48, 75], + "slider_groove_border": [39, 44, 48, 0], + "slider_groove_fill": [39, 44, 48, 182], + "slider_handle": [255, 255, 255, 255], + "slider_handle_border": [39, 44, 48, 255], + "slider_handle_hover": [255, 255, 255, 255], + "slider_handle_hover_border": [39, 44, 48, 255], + "slider_text_background": [39, 44, 48, 255], - "checkbox": [255, 255, 255, 255], - "checkbox_hover": [255, 255, 255, 255], - "checkbox_border": [127, 127, 127, 255], - "checkbox_border_hover": [12, 169, 227, 255], - "checkbox_mark": [24, 41, 77, 255], - "checkbox_text": [24, 41, 77, 255], + "checkbox": [43, 48, 52, 255], + "checkbox_hover": [43, 48, 52, 255], + "checkbox_border": [255, 255, 255, 38], + "checkbox_border_hover": [255, 255, 255, 38], + "checkbox_mark": [255, 255, 255, 181], + "checkbox_text": [255, 255, 255, 181], - "mode_switch": [255, 255, 255, 255], - "mode_switch_hover": [255, 255, 255, 255], - "mode_switch_border": [127, 127, 127, 255], - "mode_switch_border_hover": [12, 169, 227, 255], - "mode_switch_handle": [24, 41, 77, 255], - "mode_switch_text": [24, 41, 77, 255], - "mode_switch_text_hover": [24, 41, 77, 255], - "mode_switch_text_checked": [12, 169, 227, 255], + "tooltip": [39, 44, 48, 255], + "tooltip_text": [255, 255, 255, 204], - "tooltip": [12, 169, 227, 255], - "tooltip_text": [255, 255, 255, 255], - - "message_background": [24, 41, 77, 255], - "message_text": [255, 255, 255, 255], - "message_border": [24, 41, 77, 255], + "message_background": [255, 255, 255, 200], + "message_text": [0, 0, 0, 255], + "message_border": [191, 191, 191, 200], "message_button": [255, 255, 255, 255], "message_button_hover": [12, 169, 227, 255], "message_button_active": [32, 166, 219, 255], @@ -202,7 +194,7 @@ "message_progressbar_background": [255, 255, 255, 255], "message_progressbar_control": [12, 169, 227, 255], - "tool_panel_background": [255, 255, 255, 255], + "tool_panel_background": [39, 44, 48, 255], "status_offline": [0, 0, 0, 255], "status_ready": [0, 205, 0, 255], @@ -217,13 +209,13 @@ "z_axis": [0, 255, 0, 255], "all_axis": [255, 255, 255, 255], - "viewport_background": [245, 245, 245, 255], - "volume_outline": [12, 169, 227, 255], - "buildplate": [244, 244, 244, 255], + "viewport_background": [241, 242, 242, 255], + "volume_outline": [1, 168, 230, 255], + "buildplate": [252, 252, 252, 255], "buildplate_alt": [204, 204, 204, 255], "convex_hull": [35, 35, 35, 127], - "disallowed_area": [0, 0, 0, 40], + "disallowed_area": [0, 0, 0, 52], "error_area": [255, 0, 0, 127], "model_default": [255, 201, 36, 255], @@ -315,7 +307,6 @@ "layerview_row_spacing": [0.0, 0.5], "checkbox": [2.0, 2.0], - "mode_switch": [2.0, 1.0], "tooltip": [20.0, 10.0], "tooltip_margins": [1.0, 1.0], From 054df31ee792231913012cbba8d7d8e707898eb3 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 22 Aug 2017 17:00:27 +0200 Subject: [PATCH 15/74] New icons These are the raw icons as I got them from the UX designers. Contributes to issue CURA-4148. --- .../themes/cura/icons/drop_down_button.svg | 14 +++++++++++++ .../cura/icons/material_compatibility.svg | 12 +++++++++++ resources/themes/cura/icons/notice.svg | 21 ++++++++++++++++--- resources/themes/cura/icons/tab_monitor.svg | 18 +++++++++++++--- resources/themes/cura/icons/viewmode.svg | 19 ++++++++++++++--- 5 files changed, 75 insertions(+), 9 deletions(-) create mode 100644 resources/themes/cura/icons/drop_down_button.svg create mode 100644 resources/themes/cura/icons/material_compatibility.svg diff --git a/resources/themes/cura/icons/drop_down_button.svg b/resources/themes/cura/icons/drop_down_button.svg new file mode 100644 index 0000000000..3f4a76c611 --- /dev/null +++ b/resources/themes/cura/icons/drop_down_button.svg @@ -0,0 +1,14 @@ + + + + Drop down button + Created with Sketch. + + + + + + + + + \ No newline at end of file diff --git a/resources/themes/cura/icons/material_compatibility.svg b/resources/themes/cura/icons/material_compatibility.svg new file mode 100644 index 0000000000..016c1afd68 --- /dev/null +++ b/resources/themes/cura/icons/material_compatibility.svg @@ -0,0 +1,12 @@ + + + + Shape + Created with Sketch. + + + + + + + \ No newline at end of file diff --git a/resources/themes/cura/icons/notice.svg b/resources/themes/cura/icons/notice.svg index 263f7bacf1..57809ea5cd 100644 --- a/resources/themes/cura/icons/notice.svg +++ b/resources/themes/cura/icons/notice.svg @@ -1,3 +1,18 @@ - - - + + + + Shape Copy 3 + Created with Sketch. + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/themes/cura/icons/tab_monitor.svg b/resources/themes/cura/icons/tab_monitor.svg index 2677cec6e2..0817923f32 100644 --- a/resources/themes/cura/icons/tab_monitor.svg +++ b/resources/themes/cura/icons/tab_monitor.svg @@ -1,3 +1,15 @@ - - - + + + + Group 2 + Created with Sketch. + + + + + + + + + + \ No newline at end of file diff --git a/resources/themes/cura/icons/viewmode.svg b/resources/themes/cura/icons/viewmode.svg index b270bf0e81..c031f10f0a 100644 --- a/resources/themes/cura/icons/viewmode.svg +++ b/resources/themes/cura/icons/viewmode.svg @@ -1,3 +1,16 @@ - - - + + + + Path + Created with Sketch. + + + + + + + + + + + \ No newline at end of file From 07562e17455e863e261b9516344ce66c3877e1e6 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 22 Aug 2017 17:36:21 +0200 Subject: [PATCH 16/74] Optimise new icons Removed unnecessary groups. Removed unused IDs. Applied some transformations, including loads of transformations that did absolutely nothing. Truncated to 3 decimals. Removed unused imports. Removed empty defs. Removed generator markers. Contributes to issue CURA-4148. --- .../themes/cura/icons/drop_down_button.svg | 16 +++------------- .../cura/icons/material_compatibility.svg | 14 +++----------- resources/themes/cura/icons/notice.svg | 18 ++---------------- resources/themes/cura/icons/tab_monitor.svg | 16 ++++------------ resources/themes/cura/icons/viewmode.svg | 16 ++-------------- 5 files changed, 14 insertions(+), 66 deletions(-) diff --git a/resources/themes/cura/icons/drop_down_button.svg b/resources/themes/cura/icons/drop_down_button.svg index 3f4a76c611..57124329a6 100644 --- a/resources/themes/cura/icons/drop_down_button.svg +++ b/resources/themes/cura/icons/drop_down_button.svg @@ -1,14 +1,4 @@ - - - - Drop down button - Created with Sketch. - - - - - - - - + + + \ No newline at end of file diff --git a/resources/themes/cura/icons/material_compatibility.svg b/resources/themes/cura/icons/material_compatibility.svg index 016c1afd68..df4fa586df 100644 --- a/resources/themes/cura/icons/material_compatibility.svg +++ b/resources/themes/cura/icons/material_compatibility.svg @@ -1,12 +1,4 @@ - - - - Shape - Created with Sketch. - - - - - - + + + \ No newline at end of file diff --git a/resources/themes/cura/icons/notice.svg b/resources/themes/cura/icons/notice.svg index 57809ea5cd..9283161ffd 100644 --- a/resources/themes/cura/icons/notice.svg +++ b/resources/themes/cura/icons/notice.svg @@ -1,18 +1,4 @@ - - - Shape Copy 3 - Created with Sketch. - - - - - - - - - - - - + + \ No newline at end of file diff --git a/resources/themes/cura/icons/tab_monitor.svg b/resources/themes/cura/icons/tab_monitor.svg index 0817923f32..108c251eb4 100644 --- a/resources/themes/cura/icons/tab_monitor.svg +++ b/resources/themes/cura/icons/tab_monitor.svg @@ -1,15 +1,7 @@ - - - Group 2 - Created with Sketch. - - - - - - - - + + + + \ No newline at end of file diff --git a/resources/themes/cura/icons/viewmode.svg b/resources/themes/cura/icons/viewmode.svg index c031f10f0a..50612f49b2 100644 --- a/resources/themes/cura/icons/viewmode.svg +++ b/resources/themes/cura/icons/viewmode.svg @@ -1,16 +1,4 @@ - - - Path - Created with Sketch. - - - - - - - - - - + + \ No newline at end of file From 2a1a41662ab92e5fd30a08595c354bd7f584fb3f Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 23 Aug 2017 12:53:07 +0200 Subject: [PATCH 17/74] Remove tab_monitor_with_status icon It must always be the same as tab_monitor, but we'll just draw an additional icon on top of it. Contributes to issue CURA-4148. --- resources/qml/Topbar.qml | 2 +- resources/themes/cura/icons/tab_monitor_with_status.svg | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) delete mode 100644 resources/themes/cura/icons/tab_monitor_with_status.svg diff --git a/resources/qml/Topbar.qml b/resources/qml/Topbar.qml index cae7fec108..68a6543fd2 100644 --- a/resources/qml/Topbar.qml +++ b/resources/qml/Topbar.qml @@ -58,7 +58,7 @@ Rectangle height: UM.Theme.getSize("sidebar_header").height onClicked: base.startMonitoringPrint() text: catalog.i18nc("@title:tab", "Print") - iconSource: printerConnected ? UM.Theme.getIcon("tab_monitor_with_status") : UM.Theme.getIcon("tab_monitor") + iconSource: UM.Theme.getIcon("tab_monitor") property color overlayColor: { if(!printerAcceptsCommands) diff --git a/resources/themes/cura/icons/tab_monitor_with_status.svg b/resources/themes/cura/icons/tab_monitor_with_status.svg deleted file mode 100644 index dc3b373313..0000000000 --- a/resources/themes/cura/icons/tab_monitor_with_status.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - From 876c6aeced86c3539abca59772e55c3cb6f37ed6 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 23 Aug 2017 13:14:21 +0200 Subject: [PATCH 18/74] Replace warning.svg with material_compatibility.svg The warning icon is only used for the material compatibility warning, so it should just have been mixed. Contributes to issue CURA-4148. --- resources/themes/cura/icons/material_compatibility.svg | 4 ---- resources/themes/cura/icons/warning.svg | 7 ++++--- 2 files changed, 4 insertions(+), 7 deletions(-) delete mode 100644 resources/themes/cura/icons/material_compatibility.svg diff --git a/resources/themes/cura/icons/material_compatibility.svg b/resources/themes/cura/icons/material_compatibility.svg deleted file mode 100644 index df4fa586df..0000000000 --- a/resources/themes/cura/icons/material_compatibility.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/resources/themes/cura/icons/warning.svg b/resources/themes/cura/icons/warning.svg index 9269ce20ca..ae8a7a6430 100644 --- a/resources/themes/cura/icons/warning.svg +++ b/resources/themes/cura/icons/warning.svg @@ -1,3 +1,4 @@ - - - + + + + \ No newline at end of file From ab444943cba64ff6e370a12e4266baa91b1fd739 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 23 Aug 2017 13:30:25 +0200 Subject: [PATCH 19/74] Rename setting_validation_error/warning and border In some places we want to use the bright error or warning colours to display that something is going on. In those places we'd like to refer to the colour setting_validation_error rather than setting_validation_error_border or something, so I'm renaming these four theme items. Contributes to issue CURA-4148. --- resources/qml/PrintMonitor.qml | 2 +- resources/qml/Settings/SettingTextField.qml | 8 ++++---- resources/qml/SidebarHeader.qml | 2 +- resources/themes/cura/theme.json | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/resources/qml/PrintMonitor.qml b/resources/qml/PrintMonitor.qml index 41e8794014..dc2467174f 100644 --- a/resources/qml/PrintMonitor.qml +++ b/resources/qml/PrintMonitor.qml @@ -320,7 +320,7 @@ Column Rectangle //Input field for pre-heat temperature. { id: preheatTemperatureControl - color: !enabled ? UM.Theme.getColor("setting_control_disabled") : showError ? UM.Theme.getColor("setting_validation_error") : UM.Theme.getColor("setting_validation_ok") + color: !enabled ? UM.Theme.getColor("setting_control_disabled") : showError ? UM.Theme.getColor("setting_validation_error_background") : UM.Theme.getColor("setting_validation_ok") property var showError: { if(bedTemperature.properties.maximum_value != "None" && bedTemperature.properties.maximum_value < parseInt(preheatTemperatureInput.text)) diff --git a/resources/qml/Settings/SettingTextField.qml b/resources/qml/Settings/SettingTextField.qml index d80daf23b0..752e846f1a 100644 --- a/resources/qml/Settings/SettingTextField.qml +++ b/resources/qml/Settings/SettingTextField.qml @@ -29,10 +29,10 @@ SettingItem case "ValidatorState.Exception": case "ValidatorState.MinimumError": case "ValidatorState.MaximumError": - return UM.Theme.getColor("setting_validation_error_border"); + return UM.Theme.getColor("setting_validation_error"); case "ValidatorState.MinimumWarning": case "ValidatorState.MaximumWarning": - return UM.Theme.getColor("setting_validation_warning_border"); + return UM.Theme.getColor("setting_validation_warning"); } //Validation is OK. if(hovered || input.activeFocus) @@ -52,10 +52,10 @@ SettingItem case "ValidatorState.Exception": case "ValidatorState.MinimumError": case "ValidatorState.MaximumError": - return UM.Theme.getColor("setting_validation_error") + return UM.Theme.getColor("setting_validation_error_background") case "ValidatorState.MinimumWarning": case "ValidatorState.MaximumWarning": - return UM.Theme.getColor("setting_validation_warning") + return UM.Theme.getColor("setting_validation_warning_background") case "ValidatorState.Valid": return UM.Theme.getColor("setting_validation_ok") diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 6f0ae9e196..2762543d18 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -336,7 +336,7 @@ Column //sourceSize.width: width + 5 //sourceSize.height: width + 5 - color: UM.Theme.getColor("setting_control_text") + color: UM.Theme.getColor("setting_validation_warning") visible: !Cura.MachineManager.isActiveQualitySupported } } diff --git a/resources/themes/cura/theme.json b/resources/themes/cura/theme.json index eb34b75298..08b29086fd 100644 --- a/resources/themes/cura/theme.json +++ b/resources/themes/cura/theme.json @@ -154,10 +154,10 @@ "setting_control_disabled_text": [255, 255, 255, 101], "setting_control_disabled_border": [255, 255, 255, 101], "setting_unit": [255, 255, 255, 127], - "setting_validation_error": [59, 31, 53, 255], - "setting_validation_error_border": [212, 31, 53, 255], - "setting_validation_warning": [62, 54, 46, 255], - "setting_validation_warning_border": [245, 166, 35, 255], + "setting_validation_error_background": [59, 31, 53, 255], + "setting_validation_error": [212, 31, 53, 255], + "setting_validation_warning_background": [62, 54, 46, 255], + "setting_validation_warning": [245, 166, 35, 255], "setting_validation_ok": [43, 48, 52, 255], "progressbar_background": [255, 255, 255, 48], From c6d1ff0823e7efd443f5a696b4f9cf7807a2d78d Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 23 Aug 2017 13:33:04 +0200 Subject: [PATCH 20/74] Don't colour Check Material Compatibility text red upon incompatibility I would've liked it when it became yellow instead, but just keeping it white and displaying the warning icon is sufficient I suppose. Contributes to issue CURA-4148. --- resources/qml/SidebarHeader.qml | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 2762543d18..419cb5f2dd 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -281,22 +281,12 @@ Column { id: materialInfoLabel wrapMode: Text.WordWrap - text: catalog.i18nc("@label","Check material compability"); + text: catalog.i18nc("@label", "Check material compability"); font: UM.Theme.getFont("default"); verticalAlignment: Text.AlignVCenter anchors.top: parent.top anchors.bottom: parent.bottom - color: - { - if (!Cura.MachineManager.isActiveQualitySupported) - { - UM.Theme.getColor("setting_validation_error"); - } - else - { - UM.Theme.getColor("text"); - } - } + color: UM.Theme.getColor("text") MouseArea { From adb2fa739b425304c18748659f816358b8a01cbe Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 23 Aug 2017 13:33:49 +0200 Subject: [PATCH 21/74] Correct setting_validation_error/warning and background/border I modified these but forgot to commit them. Contributes to issue CURA-4148. --- resources/themes/cura/styles.qml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index b5c4682e63..2bc94fe77c 100755 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -17,11 +17,11 @@ QtObject { { if(control.valueError) { - return Theme.getColor("setting_validation_error"); + return Theme.getColor("setting_validation_error_background"); } else if(control.valueWarning) { - return Theme.getColor("setting_validation_warning"); + return Theme.getColor("setting_validation_warning_background"); } else { @@ -41,11 +41,11 @@ QtObject { { if (control.valueError) { - return Theme.getColor("setting_validation_error_border"); + return Theme.getColor("setting_validation_error"); } else if (control.valueWarning) { - return Theme.getColor("setting_validation_warning_border"); + return Theme.getColor("setting_validation_warning"); } else if (control.hovered) { From 17e62ea6c1183595345c5a0cbb13d94affc4efa9 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 23 Aug 2017 13:35:47 +0200 Subject: [PATCH 22/74] Let theme decide upon coloured icons We shouldn't colour the icons themselves, but rather let UM.RecolourImage choose the colours for just the outlines of the icons. Contributes to issue CURA-4148. --- resources/themes/cura/icons/drop_down_button.svg | 2 +- resources/themes/cura/icons/notice.svg | 2 +- resources/themes/cura/icons/tab_monitor.svg | 6 ++---- resources/themes/cura/icons/viewmode.svg | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/resources/themes/cura/icons/drop_down_button.svg b/resources/themes/cura/icons/drop_down_button.svg index 57124329a6..18748e6d70 100644 --- a/resources/themes/cura/icons/drop_down_button.svg +++ b/resources/themes/cura/icons/drop_down_button.svg @@ -1,4 +1,4 @@ - + \ No newline at end of file diff --git a/resources/themes/cura/icons/notice.svg b/resources/themes/cura/icons/notice.svg index 9283161ffd..36154d6729 100644 --- a/resources/themes/cura/icons/notice.svg +++ b/resources/themes/cura/icons/notice.svg @@ -1,4 +1,4 @@ - + \ No newline at end of file diff --git a/resources/themes/cura/icons/tab_monitor.svg b/resources/themes/cura/icons/tab_monitor.svg index 108c251eb4..b01f41897d 100644 --- a/resources/themes/cura/icons/tab_monitor.svg +++ b/resources/themes/cura/icons/tab_monitor.svg @@ -1,7 +1,5 @@ - - - - + + \ No newline at end of file diff --git a/resources/themes/cura/icons/viewmode.svg b/resources/themes/cura/icons/viewmode.svg index 50612f49b2..4ecd5661c6 100644 --- a/resources/themes/cura/icons/viewmode.svg +++ b/resources/themes/cura/icons/viewmode.svg @@ -1,4 +1,4 @@ - + \ No newline at end of file From 85a1526912d730ac750d348b07bf18d1d98a4c60 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 23 Aug 2017 13:59:32 +0200 Subject: [PATCH 23/74] Fix scaling of view mode button Changed the size to 24x24 and moved the path 5 units down. Contributes to issue CURA-4148. --- resources/themes/cura/icons/viewmode.svg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/themes/cura/icons/viewmode.svg b/resources/themes/cura/icons/viewmode.svg index 4ecd5661c6..a21df01f37 100644 --- a/resources/themes/cura/icons/viewmode.svg +++ b/resources/themes/cura/icons/viewmode.svg @@ -1,4 +1,4 @@ - - + + \ No newline at end of file From d55b8b295735a30b842a9c2b9586ed6153e01dc1 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 23 Aug 2017 14:38:35 +0200 Subject: [PATCH 24/74] Add icon after Troubleshooting Guide text Sadly the colour of this icon is hard-coded into the image... I didn't find any other solution to append an inline image after a multi-line text. Contributes to issue CURA-4148. --- resources/qml/SidebarSimple.qml | 2 +- resources/themes/cura/icons/play.svg | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 resources/themes/cura/icons/play.svg diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index f988ae0e8b..f6c2542458 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -513,7 +513,7 @@ Item anchors.rightMargin: UM.Theme.getSize("default_margin").width wrapMode: Text.WordWrap //: Tips label - text: catalog.i18nc("@label", "Need help improving your prints?
Read the Ultimaker Troubleshooting Guides").arg("https://ultimaker.com/en/troubleshooting"); + text: catalog.i18nc("@label", "Need help improving your prints?
Read the Ultimaker Troubleshooting Guides").arg("https://ultimaker.com/en/troubleshooting") + "".arg(UM.Theme.getIcon("play")) font: UM.Theme.getFont("default"); color: UM.Theme.getColor("text"); linkColor: UM.Theme.getColor("text_link") diff --git a/resources/themes/cura/icons/play.svg b/resources/themes/cura/icons/play.svg new file mode 100644 index 0000000000..04aea11a9b --- /dev/null +++ b/resources/themes/cura/icons/play.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file From f5169f53f36649a1645c455c47f3c347e96c2f7a Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 23 Aug 2017 14:44:14 +0200 Subject: [PATCH 25/74] Remove text_reversed This theme item is broken by nature since the theme itself allows you to change the colours such that these text elements don't get inversed colours at all. Instead I'm going to use text_emphasis for these which is currently the same. If ever they need to get different colours for these items than the normal colour, the theme item will have to be split up. Contributes to issue CURA-4148. --- resources/qml/SidebarSimple.qml | 2 +- resources/qml/Topbar.qml | 4 ++-- resources/themes/cura/styles.qml | 2 +- resources/themes/cura/theme.json | 1 - 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index f6c2542458..7fb44e9a7c 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -133,7 +133,7 @@ Item color: { if(infillListView.activeIndex == index) { - return UM.Theme.getColor("text_reversed") + return UM.Theme.getColor("text_emphasis") } if(!base.settingsEnabled) { diff --git a/resources/qml/Topbar.qml b/resources/qml/Topbar.qml index 68a6543fd2..a6da453997 100644 --- a/resources/qml/Topbar.qml +++ b/resources/qml/Topbar.qml @@ -88,7 +88,7 @@ Rectangle case "offline": return UM.Theme.getColor("status_offline"); default: - return UM.Theme.getColor("text_reversed"); + return UM.Theme.getColor("text_emphasis"); } } property string overlayIconSource: @@ -191,7 +191,7 @@ Rectangle height: UM.Theme.getSize("standard_arrow").height sourceSize.width: width sourceSize.height: width - color: UM.Theme.getColor("text_reversed") + color: UM.Theme.getColor("text_emphasis") source: UM.Theme.getIcon("arrow_bottom") } Label diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index 2bc94fe77c..86e844f18f 100755 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -140,7 +140,7 @@ QtObject { UM.RecolorImage { id: icon - color: UM.Theme.getColor("text_reversed") + color: UM.Theme.getColor("text_emphasis") opacity: !control.enabled ? 0.2 : 1.0 source: control.iconSource width: Theme.getSize("button_icon").width diff --git a/resources/themes/cura/theme.json b/resources/themes/cura/theme.json index 08b29086fd..4dd37e0126 100644 --- a/resources/themes/cura/theme.json +++ b/resources/themes/cura/theme.json @@ -64,7 +64,6 @@ "text_inactive": [255, 255, 255, 88], "text_hover": [255, 255, 255, 204], "text_pressed": [255, 255, 255, 204], - "text_reversed": [255, 255, 255, 255], "text_subtext": [255, 255, 255, 172], "text_emphasis": [255, 255, 255, 255], From b52446ed99c3961a78d77a4f53f9fbcfa75be8df Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 23 Aug 2017 14:58:43 +0200 Subject: [PATCH 26/74] Use text colour specific to text in scene for job specs Because the scene may have a different background colour than the rest, we need to be able to have inverted colours for that part. Contributes to issue CURA-4148. --- resources/qml/JobSpecs.qml | 6 +++--- resources/themes/cura/theme.json | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/resources/qml/JobSpecs.qml b/resources/qml/JobSpecs.qml index 99bbdc73e6..b2f63dc708 100644 --- a/resources/qml/JobSpecs.qml +++ b/resources/qml/JobSpecs.qml @@ -86,7 +86,7 @@ Item { height: UM.Theme.getSize("save_button_specs_icons").height; sourceSize.width: width; sourceSize.height: width; - color: control.hovered ? UM.Theme.getColor("setting_control_button_hover") : UM.Theme.getColor("text"); + color: control.hovered ? UM.Theme.getColor("text_scene_hover") : UM.Theme.getColor("text_scene"); source: UM.Theme.getIcon("pencil"); } } @@ -116,7 +116,7 @@ Item { regExp: /^[^\\ \/ \*\?\|\[\]]*$/ } style: TextFieldStyle{ - textColor: UM.Theme.getColor("setting_control_text"); + textColor: UM.Theme.getColor("text_scene"); font: UM.Theme.getFont("default_bold"); background: Rectangle { opacity: 0 @@ -135,7 +135,7 @@ Item { height: UM.Theme.getSize("jobspecs_line").height verticalAlignment: Text.AlignVCenter font: UM.Theme.getFont("small") - color: UM.Theme.getColor("text_subtext") + color: UM.Theme.getColor("text_scene") text: CuraApplication.getSceneBoundingBoxString } } diff --git a/resources/themes/cura/theme.json b/resources/themes/cura/theme.json index 4dd37e0126..363f3f0c0c 100644 --- a/resources/themes/cura/theme.json +++ b/resources/themes/cura/theme.json @@ -66,6 +66,8 @@ "text_pressed": [255, 255, 255, 204], "text_subtext": [255, 255, 255, 172], "text_emphasis": [255, 255, 255, 255], + "text_scene": [39, 44, 48, 255], + "text_scene_hover": [43, 48, 52, 255], "error": [212, 31, 53, 255], "sidebar_header_bar": [39, 44, 48, 255], From 078b9e8b663718bcdbb12673760d1c18e2783fee Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 23 Aug 2017 15:32:42 +0200 Subject: [PATCH 27/74] Fix placeholder text colour It should use the same colour as the normal text, for now. Contributes to issue CURA-4148. --- resources/qml/Settings/SettingView.qml | 1 + resources/themes/cura/styles.qml | 1 + 2 files changed, 2 insertions(+) diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index 485d364b2d..e16c8ef019 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -62,6 +62,7 @@ Item style: TextFieldStyle { textColor: UM.Theme.getColor("setting_control_text"); + placeholderTextColor: UM.Theme.getColor("setting_control_text") font: UM.Theme.getFont("default"); background: Item {} } diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index 86e844f18f..e9e3f8ce75 100755 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -736,6 +736,7 @@ QtObject { property Component text_field: Component { TextFieldStyle { textColor: Theme.getColor("setting_control_text"); + placeholderTextColor: Theme.getColor("setting_control_text") font: Theme.getFont("default"); background: Rectangle From 11f820464446088c16076c81bed6b4076241c60f Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 23 Aug 2017 16:28:28 +0200 Subject: [PATCH 28/74] Change margins in the side bar These are more or less all margins in the side bar. Contributes to issue CURA-4148. --- resources/qml/Settings/SettingItem.qml | 6 ++-- resources/qml/Settings/SettingView.qml | 12 +++---- resources/qml/Sidebar.qml | 38 ++++++++++----------- resources/qml/SidebarHeader.qml | 32 +++++++++--------- resources/qml/SidebarSimple.qml | 46 +++++++++++++------------- resources/themes/cura/styles.qml | 10 +++--- resources/themes/cura/theme.json | 1 + 7 files changed, 73 insertions(+), 72 deletions(-) diff --git a/resources/qml/Settings/SettingItem.qml b/resources/qml/Settings/SettingItem.qml index 112edb5049..ac36320276 100644 --- a/resources/qml/Settings/SettingItem.qml +++ b/resources/qml/Settings/SettingItem.qml @@ -130,11 +130,11 @@ Item { id: settingControls height: parent.height / 2 - spacing: UM.Theme.getSize("default_margin").width / 2 + spacing: UM.Theme.getSize("sidebar_margin").width / 2 anchors { right: controlContainer.left - rightMargin: UM.Theme.getSize("default_margin").width / 2 + rightMargin: UM.Theme.getSize("sidebar_margin").width / 2 verticalCenter: parent.verticalCenter } @@ -293,7 +293,7 @@ Item { enabled: propertyProvider.isValueUsed anchors.right: parent.right; - anchors.rightMargin: UM.Theme.getSize("default_margin").width + anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width anchors.verticalCenter: parent.verticalCenter; width: UM.Theme.getSize("setting_control").width; height: UM.Theme.getSize("setting_control").height diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index e16c8ef019..183ea5e7c3 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -1,4 +1,4 @@ -// Copyright (c) 2015 Ultimaker B.V. +// Copyright (c) 2017 Ultimaker B.V. // Uranium is released under the terms of the AGPLv3 or higher. import QtQuick 2.2 @@ -42,9 +42,9 @@ Item { top: parent.top left: parent.left - leftMargin: UM.Theme.getSize("default_margin").width + leftMargin: UM.Theme.getSize("sidebar_margin").width right: parent.right - rightMargin: UM.Theme.getSize("default_margin").width + rightMargin: UM.Theme.getSize("sidebar_margin").width } height: visible ? UM.Theme.getSize("setting_control").height : 0 Behavior on height { NumberAnimation { duration: 100 } } @@ -55,7 +55,7 @@ Item anchors.left: parent.left anchors.right: clearFilterButton.left - anchors.rightMargin: UM.Theme.getSize("default_margin").width + anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width placeholderText: catalog.i18nc("@label:textbox", "Search...") @@ -119,7 +119,7 @@ Item anchors.verticalCenter: parent.verticalCenter anchors.right: parent.right - anchors.rightMargin: UM.Theme.getSize("default_margin").width + anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width color: UM.Theme.getColor("setting_control_button") hoverColor: UM.Theme.getColor("setting_control_button_hover") @@ -138,7 +138,7 @@ Item anchors.bottom: parent.bottom; anchors.right: parent.right; anchors.left: parent.left; - anchors.topMargin: filterContainer.visible ? UM.Theme.getSize("default_margin").width : 0 + anchors.topMargin: filterContainer.visible ? UM.Theme.getSize("sidebar_margin").height : 0 Behavior on anchors.topMargin { NumberAnimation { duration: 100 } } style: UM.Theme.styles.scrollview; diff --git a/resources/qml/Sidebar.qml b/resources/qml/Sidebar.qml index c527e961df..d1917f23ce 100755 --- a/resources/qml/Sidebar.qml +++ b/resources/qml/Sidebar.qml @@ -101,7 +101,7 @@ Rectangle height: visible ? UM.Theme.getSize("sidebar_lining").height : 0 color: UM.Theme.getColor("sidebar_lining") anchors.top: header.bottom - anchors.topMargin: visible ? UM.Theme.getSize("default_margin").height : 0 + anchors.topMargin: visible ? UM.Theme.getSize("sidebar_margin").height : 0 } onCurrentModeIndexChanged: @@ -117,10 +117,10 @@ Rectangle id: settingsModeLabel text: !hideSettings ? catalog.i18nc("@label:listbox", "Print Setup") : catalog.i18nc("@label:listbox","Print Setup disabled\nG-code files cannot be modified"); anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("default_margin").width; + anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width anchors.top: headerSeparator.bottom - anchors.topMargin: UM.Theme.getSize("default_margin").height - width: parent.width * 0.45 - 2 * UM.Theme.getSize("default_margin").width + anchors.topMargin: UM.Theme.getSize("sidebar_margin").height + width: parent.width * 0.45 - 2 * UM.Theme.getSize("sidebar_margin").width font: UM.Theme.getFont("large") color: UM.Theme.getColor("text") visible: !monitoringPrint @@ -133,9 +133,9 @@ Rectangle width: parent.width * 0.55 height: UM.Theme.getSize("sidebar_header_mode_toggle").height anchors.right: parent.right - anchors.rightMargin: UM.Theme.getSize("default_margin").width + anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width anchors.top: headerSeparator.bottom - anchors.topMargin: UM.Theme.getSize("default_margin").height + anchors.topMargin: UM.Theme.getSize("sidebar_margin").height visible: !monitoringPrint && !hideSettings Component{ id: wizardDelegate @@ -211,18 +211,18 @@ Rectangle anchors { top: settingsModeSelection.bottom - topMargin: UM.Theme.getSize("default_margin").width + topMargin: UM.Theme.getSize("sidebar_margin").height left: parent.left - leftMargin: UM.Theme.getSize("default_margin").width + leftMargin: UM.Theme.getSize("sidebar_margin").width right: parent.right - rightMargin: UM.Theme.getSize("default_margin").width + rightMargin: UM.Theme.getSize("sidebar_margin").width } Text { id: globalProfileLabel text: catalog.i18nc("@label","Profile:"); - width: parent.width * 0.45 - UM.Theme.getSize("default_margin").width + width: parent.width * 0.45 - UM.Theme.getSize("sidebar_margin").width font: UM.Theme.getFont("default"); color: UM.Theme.getColor("text"); verticalAlignment: Text.AlignVCenter @@ -246,7 +246,7 @@ Rectangle } enabled: !header.currentExtruderVisible || header.currentExtruderIndex > -1 - width: parent.width * 0.7 + UM.Theme.getSize("default_margin").width + width: parent.width * 0.7 + UM.Theme.getSize("sidebar_margin").width height: UM.Theme.getSize("setting_control").height anchors.right: parent.right tooltip: Cura.MachineManager.activeQualityName @@ -265,7 +265,7 @@ Rectangle anchors.verticalCenter: parent.verticalCenter anchors.right: parent.right - anchors.rightMargin: UM.Theme.getSize("setting_preferences_button_margin").width - UM.Theme.getSize("default_margin").width + anchors.rightMargin: UM.Theme.getSize("setting_preferences_button_margin").width - UM.Theme.getSize("sidebar_margin").width color: hovered ? UM.Theme.getColor("setting_control_button_hover") : UM.Theme.getColor("setting_control_button"); iconSource: UM.Theme.getIcon("star"); @@ -278,7 +278,7 @@ Rectangle onEntered: { var content = catalog.i18nc("@tooltip","Some setting/override values are different from the values stored in the profile.\n\nClick to open the profile manager.") - base.showTooltip(globalProfileRow, Qt.point(-UM.Theme.getSize("default_margin").width, 0), content) + base.showTooltip(globalProfileRow, Qt.point(-UM.Theme.getSize("sidebar_margin").width, 0), content) } onExited: base.hideTooltip() } @@ -291,7 +291,7 @@ Rectangle anchors.bottom: footerSeparator.top anchors.top: globalProfileRow.bottom - anchors.topMargin: UM.Theme.getSize("default_margin").height + anchors.topMargin: UM.Theme.getSize("sidebar_margin").height anchors.left: base.left anchors.right: base.right visible: !monitoringPrint && !hideSettings @@ -377,7 +377,7 @@ Rectangle height: UM.Theme.getSize("sidebar_lining").height color: UM.Theme.getColor("sidebar_lining") anchors.bottom: printSpecs.top - anchors.bottomMargin: UM.Theme.getSize("default_margin").height * 2 + UM.Theme.getSize("progressbar").height + UM.Theme.getFont("default_bold").pixelSize + anchors.bottomMargin: UM.Theme.getSize("sidebar_margin").height * 2 + UM.Theme.getSize("progressbar").height + UM.Theme.getFont("default_bold").pixelSize } Rectangle @@ -385,8 +385,8 @@ Rectangle id: printSpecs anchors.left: parent.left anchors.bottom: parent.bottom - anchors.leftMargin: UM.Theme.getSize("default_margin").width - anchors.bottomMargin: UM.Theme.getSize("default_margin").height + anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width + anchors.bottomMargin: UM.Theme.getSize("sidebar_margin").height height: childrenRect.height UM.TooltipArea @@ -498,7 +498,7 @@ Rectangle id: saveButton implicitWidth: base.width anchors.top: footerSeparator.bottom - anchors.topMargin: UM.Theme.getSize("default_margin").height + anchors.topMargin: UM.Theme.getSize("sidebar_margin").height anchors.bottom: parent.bottom visible: !monitoringPrint } @@ -508,7 +508,7 @@ Rectangle id: monitorButton implicitWidth: base.width anchors.top: footerSeparator.bottom - anchors.topMargin: UM.Theme.getSize("default_margin").height + anchors.topMargin: UM.Theme.getSize("sidebar_margin").height anchors.bottom: parent.bottom visible: monitoringPrint } diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 419cb5f2dd..85d350d435 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -17,7 +17,7 @@ Column property int currentExtruderIndex: ExtruderManager.activeExtruderIndex; property bool currentExtruderVisible: extrudersList.visible; - spacing: UM.Theme.getSize("default_margin").height + spacing: UM.Theme.getSize("sidebar_margin").height signal showTooltip(Item item, point location, string text) signal hideTooltip() @@ -133,9 +133,9 @@ Column { anchors.verticalCenter: parent.verticalCenter anchors.left: swatch.visible ? swatch.right : parent.left - anchors.leftMargin: swatch.visible ? UM.Theme.getSize("default_margin").width / 2 : UM.Theme.getSize("default_margin").width + anchors.leftMargin: swatch.visible ? UM.Theme.getSize("sidebar_margin").width / 2 : UM.Theme.getSize("sidebar_margin").width anchors.right: parent.right - anchors.rightMargin: UM.Theme.getSize("default_margin").width / 2 + anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width / 2 color: control.checked ? UM.Theme.getColor("tab_checked_text") : control.pressed ? UM.Theme.getColor("tab_active_text") : @@ -155,7 +155,7 @@ Column Item { id: variantRowSpacer - height: UM.Theme.getSize("default_margin").height / 4 + height: UM.Theme.getSize("sidebar_margin").height / 4 width: height visible: !extruderSelectionRow.visible } @@ -170,16 +170,16 @@ Column anchors { left: parent.left - leftMargin: UM.Theme.getSize("default_margin").width + leftMargin: UM.Theme.getSize("sidebar_margin").width right: parent.right - rightMargin: UM.Theme.getSize("default_margin").width + rightMargin: UM.Theme.getSize("sidebar_margin").width } Text { id: printCoreLabel text: Cura.MachineManager.activeDefinitionVariantsName; - width: parent.width * 0.45 - UM.Theme.getSize("default_margin").width + width: parent.width * 0.45 - UM.Theme.getSize("sidebar_margin").width font: UM.Theme.getFont("default"); color: UM.Theme.getColor("text"); } @@ -191,7 +191,7 @@ Column visible: Cura.MachineManager.hasVariants height: UM.Theme.getSize("setting_control").height - width: parent.width * 0.7 + UM.Theme.getSize("default_margin").width + width: parent.width * 0.7 + UM.Theme.getSize("sidebar_margin").width anchors.right: parent.right style: UM.Theme.styles.sidebar_header_button activeFocusOnPress: true; @@ -210,16 +210,16 @@ Column anchors { left: parent.left - leftMargin: UM.Theme.getSize("default_margin").width + leftMargin: UM.Theme.getSize("sidebar_margin").width right: parent.right - rightMargin: UM.Theme.getSize("default_margin").width + rightMargin: UM.Theme.getSize("sidebar_margin").width } Text { id: materialLabel text: catalog.i18nc("@label","Material"); - width: parent.width * 0.45 - UM.Theme.getSize("default_margin").width + width: parent.width * 0.45 - UM.Theme.getSize("sidebar_margin").width font: UM.Theme.getFont("default"); color: UM.Theme.getColor("text"); } @@ -247,7 +247,7 @@ Column enabled: !extrudersList.visible || base.currentExtruderIndex > -1 height: UM.Theme.getSize("setting_control").height - width: parent.width * 0.7 + UM.Theme.getSize("default_margin").width + width: parent.width * 0.7 + UM.Theme.getSize("sidebar_margin").width anchors.right: parent.right style: UM.Theme.styles.sidebar_header_button activeFocusOnPress: true; @@ -266,16 +266,16 @@ Column anchors { left: parent.left - leftMargin: UM.Theme.getSize("default_margin").width + leftMargin: UM.Theme.getSize("sidebar_margin").width right: parent.right - rightMargin: UM.Theme.getSize("default_margin").width + rightMargin: UM.Theme.getSize("sidebar_margin").width } Item { height: UM.Theme.getSize("sidebar_setup").height anchors.right: parent.right - width: parent.width * 0.7 + UM.Theme.getSize("default_margin").width + width: parent.width * 0.7 + UM.Theme.getSize("sidebar_margin").width Text { @@ -307,7 +307,7 @@ Column var content = catalog.i18nc("@tooltip", "Click to check the material compatibility on Ultimaker.com."); base.showTooltip( materialInfoRow, - Qt.point(-UM.Theme.getSize("default_margin").width, 0), + Qt.point(-UM.Theme.getSize("sidebar_margin").width, 0), catalog.i18nc("@tooltip", content) ); } diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index 7fb44e9a7c..2f9adfc510 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Ultimaker B.V. +// Copyright (c) 2017 Ultimaker B.V. // Cura is released under the terms of the AGPLv3 or higher. import QtQuick 2.2 @@ -30,8 +30,8 @@ Item id: infillCellLeft anchors.top: parent.top anchors.left: parent.left - anchors.topMargin: UM.Theme.getSize("default_margin").height - width: base.width * .45 - UM.Theme.getSize("default_margin").width + anchors.topMargin: UM.Theme.getSize("sidebar_margin").height + width: base.width * .45 - UM.Theme.getSize("sidebar_margin").width height: childrenRect.height Text @@ -42,9 +42,9 @@ Item font: UM.Theme.getFont("default"); color: UM.Theme.getColor("text"); anchors.top: parent.top - anchors.topMargin: UM.Theme.getSize("default_margin").height + anchors.topMargin: UM.Theme.getSize("sidebar_margin").height anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("default_margin").width + anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width } } @@ -55,7 +55,7 @@ Item height: childrenRect.height; width: base.width * .55 - spacing: UM.Theme.getSize("default_margin").width + spacing: UM.Theme.getSize("sidebar_margin").width anchors.left: infillCellLeft.right anchors.top: infillCellLeft.top @@ -88,7 +88,7 @@ Item { id: infillIconLining - width: (infillCellRight.width - ((infillModel.count - 1) * UM.Theme.getSize("default_margin").width)) / (infillModel.count); + width: (infillCellRight.width - ((infillModel.count - 1) * UM.Theme.getSize("sidebar_margin").width)) / (infillModel.count); height: width border.color: @@ -169,7 +169,7 @@ Item Text { id: infillLabel - width: (infillCellRight.width - ((infillModel.count - 1) * UM.Theme.getSize("default_margin").width)) / (infillModel.count); + width: (infillCellRight.width - ((infillModel.count - 1) * UM.Theme.getSize("sidebar_margin").width)) / (infillModel.count); horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter wrapMode: Text.WordWrap @@ -252,7 +252,7 @@ Item { id: helpersCell anchors.top: infillCellRight.bottom - anchors.topMargin: UM.Theme.getSize("default_margin").height * 2 + anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 2 anchors.left: parent.left anchors.right: parent.right height: childrenRect.height @@ -261,9 +261,9 @@ Item { id: enableSupportLabel anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("default_margin").width + anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width anchors.verticalCenter: enableSupportCheckBox.verticalCenter - width: parent.width * .45 - 3 * UM.Theme.getSize("default_margin").width + width: parent.width * .45 - 3 * UM.Theme.getSize("sidebar_margin").width text: catalog.i18nc("@label", "Generate Support"); font: UM.Theme.getFont("default"); color: UM.Theme.getColor("text"); @@ -276,7 +276,7 @@ Item anchors.top: parent.top anchors.left: enableSupportLabel.right - anchors.leftMargin: UM.Theme.getSize("default_margin").width + anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width style: UM.Theme.styles.checkbox; enabled: base.settingsEnabled @@ -311,9 +311,9 @@ Item id: supportExtruderLabel visible: (supportEnabled.properties.value == "True") && (machineExtruderCount.properties.value > 1) anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("default_margin").width + anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width anchors.verticalCenter: supportExtruderCombobox.verticalCenter - width: parent.width * .45 - 3 * UM.Theme.getSize("default_margin").width + width: parent.width * .45 - 3 * UM.Theme.getSize("sidebar_margin").width text: catalog.i18nc("@label", "Support Extruder"); font: UM.Theme.getFont("default"); color: UM.Theme.getColor("text"); @@ -344,7 +344,7 @@ Item { if ((supportEnabled.properties.value == "True") && (machineExtruderCount.properties.value > 1)) { - return UM.Theme.getSize("default_margin").height; + return UM.Theme.getSize("sidebar_margin").height; } else { @@ -352,7 +352,7 @@ Item } } anchors.left: supportExtruderLabel.right - anchors.leftMargin: UM.Theme.getSize("default_margin").width + anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width width: parent.width * .55 height: { @@ -410,9 +410,9 @@ Item { id: adhesionHelperLabel anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("default_margin").width + anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width anchors.verticalCenter: adhesionCheckBox.verticalCenter - width: parent.width * .45 - 3 * UM.Theme.getSize("default_margin").width + width: parent.width * .45 - 3 * UM.Theme.getSize("sidebar_margin").width text: catalog.i18nc("@label", "Build Plate Adhesion"); font: UM.Theme.getFont("default"); color: UM.Theme.getColor("text"); @@ -425,9 +425,9 @@ Item property alias _hovered: adhesionMouseArea.containsMouse anchors.top: supportExtruderCombobox.bottom - anchors.topMargin: UM.Theme.getSize("default_margin").height * 2 + anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 2 anchors.left: adhesionHelperLabel.right - anchors.leftMargin: UM.Theme.getSize("default_margin").width + anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width //: Setting enable printing build-plate adhesion helper checkbox style: UM.Theme.styles.checkbox; @@ -500,7 +500,7 @@ Item { id: tipsCell anchors.top: helpersCell.bottom - anchors.topMargin: UM.Theme.getSize("default_margin").height * 2 + anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 2 anchors.left: parent.left width: parent.width height: childrenRect.height @@ -508,9 +508,9 @@ Item Text { anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("default_margin").width + anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width anchors.right: parent.right - anchors.rightMargin: UM.Theme.getSize("default_margin").width + anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width wrapMode: Text.WordWrap //: Tips label text: catalog.i18nc("@label", "Need help improving your prints?
Read the Ultimaker Troubleshooting Guides").arg("https://ultimaker.com/en/troubleshooting") + "".arg(UM.Theme.getIcon("play")) diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index e9e3f8ce75..b98a90a136 100755 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -363,9 +363,9 @@ QtObject { background: Rectangle { anchors.fill: parent; anchors.left: parent.left - anchors.leftMargin: Theme.getSize("default_margin").width + anchors.leftMargin: Theme.getSize("sidebar_margin").width anchors.right: parent.right - anchors.rightMargin: Theme.getSize("default_margin").width + anchors.rightMargin: Theme.getSize("sidebar_margin").width implicitHeight: Theme.getSize("section").height; color: { if(control.color) { @@ -413,7 +413,7 @@ QtObject { UM.RecolorImage { anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left - anchors.leftMargin: Theme.getSize("default_margin").width + anchors.leftMargin: Theme.getSize("sidebar_margin").width color: { if(!control.enabled) @@ -448,7 +448,7 @@ QtObject { Label { anchors { left: icon.right; - leftMargin: Theme.getSize("default_lining").width; + leftMargin: Theme.getSize("default_margin").width; right: parent.right; verticalCenter: parent.verticalCenter; } @@ -792,7 +792,7 @@ QtObject { } Behavior on color { ColorAnimation { duration: 50; } } - implicitWidth: actualLabel.contentWidth + (UM.Theme.getSize("default_margin").width * 2) + implicitWidth: actualLabel.contentWidth + (UM.Theme.getSize("sidebar_margin").width * 2) Label { diff --git a/resources/themes/cura/theme.json b/resources/themes/cura/theme.json index 363f3f0c0c..2682d5adf2 100644 --- a/resources/themes/cura/theme.json +++ b/resources/themes/cura/theme.json @@ -251,6 +251,7 @@ "logo": [9.5, 2.0], "sidebar": [35.0, 10.0], + "sidebar_margin": [1.71, 1.43], "sidebar_header": [0.0, 4.0], "sidebar_header_highlight": [0.25, 0.25], "sidebar_header_mode_toggle": [0.0, 2.0], From c2e4c14e5992efb2160eba29a2faeac93c8d0919 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 23 Aug 2017 17:02:07 +0200 Subject: [PATCH 29/74] Adjust vertical margins in sidebar The section size adjusts the size of a setting item, and the actual control is centred within that space so in effect it controls the margins above and below each setting control. Contributes to issue CURA-4148. --- resources/themes/cura/theme.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/themes/cura/theme.json b/resources/themes/cura/theme.json index 2682d5adf2..54ef0a8788 100644 --- a/resources/themes/cura/theme.json +++ b/resources/themes/cura/theme.json @@ -252,6 +252,7 @@ "sidebar": [35.0, 10.0], "sidebar_margin": [1.71, 1.43], + "sidebar_margin_thin": [0.71, 0.71], "sidebar_header": [0.0, 4.0], "sidebar_header_highlight": [0.25, 0.25], "sidebar_header_mode_toggle": [0.0, 2.0], @@ -265,7 +266,7 @@ "simple_mode_infill_caption": [0.0, 5.0], "simple_mode_infill_height": [0.0, 8.0], - "section": [0.0, 2.0], + "section": [0.0, 2.86], "section_icon": [1.6, 1.6], "section_icon_column": [2.8, 0.0], From fde4f44a1e37290c8b9b93c60a4248fd14efc154 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 23 Aug 2017 17:10:54 +0200 Subject: [PATCH 30/74] New dark theme Also from the UX designers: A new dark theme that is exactly the same as the default theme except the background of the scene. Contributes to issue CURA-4148. --- resources/themes/cura-dark/theme.json | 181 +------------------------- 1 file changed, 3 insertions(+), 178 deletions(-) diff --git a/resources/themes/cura-dark/theme.json b/resources/themes/cura-dark/theme.json index 4129eebe27..45b8fd8675 100644 --- a/resources/themes/cura-dark/theme.json +++ b/resources/themes/cura-dark/theme.json @@ -4,183 +4,8 @@ "inherits": "cura" }, "colors": { - "sidebar": [83, 83, 83, 255], - "lining": [127, 127, 127, 255], - "viewport_overlay": [66, 66, 66, 255], - - "primary": [12, 169, 227, 255], - "primary_hover": [48, 182, 231, 255], - "primary_text": [83, 83, 83, 255], - "border": [127, 127, 127, 255], - "secondary": [66, 66, 66, 255], - - "text": [255, 255, 255, 255], - "text_detail": [174, 174, 174, 128], - "text_link": [12, 169, 227, 255], - "text_inactive": [174, 174, 174, 255], - "text_hover": [70, 84, 113, 255], - "text_pressed": [12, 169, 227, 255], - "text_reversed": [255, 255, 255, 255], - "text_subtext": [255, 255, 255, 255], - - "error": [255, 140, 0, 255], - - "sidebar_header_bar": [66, 66, 66, 255], - "sidebar_header_active": [83, 83, 83, 255], - "sidebar_header_hover": [83, 83, 83, 255], - "sidebar_header_highlight": [83, 83, 83, 255], - "sidebar_header_highlight_hover": [66, 66, 66, 255], - "sidebar_lining": [66, 66, 66, 255], - - "button": [83, 83, 83, 255], - "button_hover": [83, 83, 83, 255], - "button_active": [32, 166, 219, 255], - "button_active_hover": [12, 169, 227, 255], - "button_text": [255, 255, 255, 255], - "button_disabled": [255, 255, 255, 255], - "button_disabled_text": [70, 84, 113, 255], - - "button_tooltip": [83, 83, 83, 255], - "button_tooltip_border": [255, 255, 255, 255], - "button_tooltip_text": [255, 255, 255, 255], - - "toggle_checked": [255, 255, 255, 255], - "toggle_checked_border": [255, 255, 255, 255], - "toggle_checked_text": [83, 83, 83, 255], - "toggle_unchecked": [83, 83, 83, 255], - "toggle_unchecked_border": [127, 127, 127, 255], - "toggle_unchecked_text": [255, 255, 255, 255], - "toggle_hovered": [83, 83, 83, 255], - "toggle_hovered_border": [32, 166, 219, 255], - "toggle_hovered_text": [255, 255, 255, 255], - "toggle_active": [32, 166, 219, 255], - "toggle_active_border": [32, 166, 219, 255], - "toggle_active_text": [255, 255, 255, 255], - - "tab_checked": [83, 83, 83, 255], - "tab_checked_border": [83, 83, 83, 255], - "tab_checked_text": [255, 255, 255, 255], - "tab_unchecked": [66, 66, 66, 255], - "tab_unchecked_border": [66, 66, 66, 255], - "tab_unchecked_text": [127, 127, 127, 255], - "tab_hovered": [66, 66, 66, 255], - "tab_hovered_border": [66, 66, 66, 255], - "tab_hovered_text": [32, 166, 219, 255], - "tab_active": [83, 83, 83, 255], - "tab_active_border": [83, 83, 83, 255], - "tab_active_text": [255, 255, 255, 255], - "tab_background": [66, 66, 66, 255], - - "action_button": [83, 83, 83, 255], - "action_button_text": [255, 255, 255, 255], - "action_button_border": [127, 127, 127, 255], - "action_button_hovered": [83, 83, 83, 255], - "action_button_hovered_text": [255, 255, 255, 255], - "action_button_hovered_border": [12, 169, 227, 255], - "action_button_active": [12, 169, 227, 255], - "action_button_active_text": [83, 83, 83, 255], - "action_button_active_border": [12, 169, 227, 255], - "action_button_disabled": [66, 66, 66, 255], - "action_button_disabled_text": [127, 127, 127, 255], - "action_button_disabled_border": [66, 66, 66, 255], - - "scrollbar_background": [83, 83, 83, 255], - "scrollbar_handle": [255, 255, 255, 255], - "scrollbar_handle_hover": [12, 159, 227, 255], - "scrollbar_handle_down": [12, 159, 227, 255], - - "setting_category": [66, 66, 66, 255], - "setting_category_disabled": [83, 83, 83, 255], - "setting_category_hover": [66, 66, 66, 255], - "setting_category_active": [66, 66, 66, 255], - "setting_category_active_hover": [66, 66, 66, 255], - "setting_category_text": [255, 255, 255, 255], - "setting_category_border": [66, 66, 66, 255], - "setting_category_disabled_border": [66, 66, 66, 255], - "setting_category_hover_border": [12, 159, 227, 255], - "setting_category_active_border": [66, 66, 66, 255], - "setting_category_active_hover_border": [12, 159, 227, 255], - - "setting_control": [83, 83, 83, 255], - "setting_control_selected": [12, 159, 227, 255], - "setting_control_highlight": [83, 83, 83, 0], - "setting_control_border": [127, 127, 127, 255], - "setting_control_border_highlight": [12, 169, 227, 255], - "setting_control_text": [255, 255, 255, 255], - "setting_control_depth_line": [127, 127, 127, 255], - "setting_control_button": [127, 127, 127, 255], - "setting_control_button_hover": [70, 84, 113, 255], - "setting_control_disabled": [66, 66, 66, 255], - "setting_control_disabled_text": [127, 127, 127, 255], - "setting_control_disabled_border": [127, 127, 127, 255], - "setting_unit": [127, 127, 127, 255], - "setting_validation_error": [204, 37, 0, 255], - "setting_validation_warning": [204, 146, 0, 255], - "setting_validation_ok": [83, 83, 83, 255], - - "progressbar_background": [66, 66, 66, 255], - "progressbar_control": [255, 255, 255, 255], - - "slider_groove": [66, 66, 66, 255], - "slider_groove_border": [127, 127, 127, 255], - "slider_groove_fill": [127, 127, 127, 255], - "slider_handle": [32, 166, 219, 255], - "slider_handle_hover": [77, 182, 226, 255], - "slider_text_background": [83, 83, 83, 255], - - "checkbox": [83, 83, 83, 255], - "checkbox_hover": [83, 83, 83, 255], - "checkbox_border": [127, 127, 127, 255], - "checkbox_border_hover": [12, 169, 227, 255], - "checkbox_mark": [255, 255, 255, 255], - "checkbox_text": [255, 255, 255, 255], - - "mode_switch": [83, 83, 83, 255], - "mode_switch_hover": [83, 83, 83, 255], - "mode_switch_border": [127, 127, 127, 255], - "mode_switch_border_hover": [12, 169, 227, 255], - "mode_switch_handle": [255, 255, 255, 255], - "mode_switch_text": [255, 255, 255, 255], - "mode_switch_text_hover": [255, 255, 255, 255], - "mode_switch_text_checked": [12, 169, 227, 255], - - "tooltip": [40, 40, 40, 255], - "tooltip_text": [255, 255, 255, 255], - - "message_background": [255, 255, 255, 255], - "message_text": [83, 83, 83, 255], - "message_border": [255, 255, 255, 255], - "message_button": [83, 83, 83, 255], - "message_button_hover": [12, 169, 227, 255], - "message_button_active": [32, 166, 219, 255], - "message_button_text": [255, 255, 255, 255], - "message_button_text_hover": [83, 83, 83, 255], - "message_button_text_active": [83, 83, 83, 255], - "message_progressbar_background": [83, 83, 83, 255], - "message_progressbar_control": [12, 169, 227, 255], - - "tool_panel_background": [83, 83, 83, 255], - - "status_offline": [0, 0, 0, 255], - "status_ready": [0, 205, 0, 255], - "status_busy": [12, 169, 227, 255], - "status_paused": [255, 140, 0, 255], - "status_stopped": [236, 82, 80, 255], - "status_unknown": [127, 127, 127, 255], - - "disabled_axis": [127, 127, 127, 255], - "x_axis": [255, 0, 0, 255], - "y_axis": [0, 0, 255, 255], - "z_axis": [0, 255, 0, 255], - "all_axis": [83, 83, 83, 255], - - "viewport_background": [66, 66, 66, 255], - "volume_outline": [12, 169, 227, 255], - "buildplate": [169, 169, 169, 255], - "buildplate_alt": [204, 204, 204, 255], - - "convex_hull": [35, 35, 35, 127], - "disallowed_area": [0, 0, 0, 40], - "error_area": [255, 0, 0, 127] + "viewport_background": [31, 36, 39, 255], + "text_scene": [255, 255, 255, 162], + "text_scene_hover": [255, 255, 255, 204] } } From 09a5cf1de2cca9d004dd09b8b79e5972ee5f26f6 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 23 Aug 2017 17:53:00 +0200 Subject: [PATCH 31/74] Shift sidebar tooltips with the arrow outside of sidebar Because now the arrow has the same colour as the sidebar so you won't see it otherwise. Contributes to issue CURA-4148. --- resources/qml/Settings/SettingView.qml | 2 +- resources/qml/Sidebar.qml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index 183ea5e7c3..b6b79ed3d4 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -297,7 +297,7 @@ Item contextMenu.provider = provider contextMenu.popup(); } - onShowTooltip: base.showTooltip(delegate, { x: 0, y: delegate.height / 2 }, text) + onShowTooltip: base.showTooltip(delegate, { x: -UM.Theme.getSize("default_arrow").width, y: delegate.height / 2 }, text) onHideTooltip: base.hideTooltip() onShowAllHiddenInheritedSettings: { diff --git a/resources/qml/Sidebar.qml b/resources/qml/Sidebar.qml index d1917f23ce..3d2b7e39dc 100755 --- a/resources/qml/Sidebar.qml +++ b/resources/qml/Sidebar.qml @@ -43,14 +43,14 @@ Rectangle onTriggered: { - base.showTooltip(base, {x:1, y:item.y}, text); + base.showTooltip(base, {x: 0, y: item.y}, text); } } function showTooltip(item, position, text) { tooltip.text = text; - position = item.mapToItem(base, position.x, position.y); + position = item.mapToItem(base, position.x - UM.Theme.getSize("default_arrow").width, position.y); tooltip.show(position); } From cdf43ea6a4c68149bdfc4794929a10b05544f7b6 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 23 Aug 2017 17:58:05 +0200 Subject: [PATCH 32/74] Forgotten sidebar margins The buttons need the sidebar margins too. Contributes to issue CURA-4148. --- resources/qml/MonitorButton.qml | 16 ++++++++-------- resources/qml/SaveButton.qml | 24 ++++++++++++------------ 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/resources/qml/MonitorButton.qml b/resources/qml/MonitorButton.qml index cfb09d9c9f..5741749d4e 100644 --- a/resources/qml/MonitorButton.qml +++ b/resources/qml/MonitorButton.qml @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Ultimaker B.V. +// Copyright (c) 2017 Ultimaker B.V. // Cura is released under the terms of the AGPLv3 or higher. import QtQuick 2.2 @@ -119,10 +119,10 @@ Item Label { id: statusLabel - width: parent.width - 2 * UM.Theme.getSize("default_margin").width + width: parent.width - 2 * UM.Theme.getSize("sidebar_margin").width anchors.top: parent.top anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("default_margin").width + anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width color: base.statusColor font: UM.Theme.getFont("large") @@ -177,21 +177,21 @@ Item property string backgroundColor: UM.Theme.getColor("progressbar_background"); property string controlColor: base.statusColor; - width: parent.width - 2 * UM.Theme.getSize("default_margin").width; + width: parent.width - 2 * UM.Theme.getSize("sidebar_margin").width; height: UM.Theme.getSize("progressbar").height; anchors.top: statusLabel.bottom; - anchors.topMargin: UM.Theme.getSize("default_margin").height / 4; + anchors.topMargin: UM.Theme.getSize("sidebar_margin").height / 4; anchors.left: parent.left; - anchors.leftMargin: UM.Theme.getSize("default_margin").width; + anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width; } Row { id: buttonsRow height: abortButton.height anchors.top: progressBar.bottom - anchors.topMargin: UM.Theme.getSize("default_margin").height + anchors.topMargin: UM.Theme.getSize("sidebar_margin").height anchors.right: parent.right - anchors.rightMargin: UM.Theme.getSize("default_margin").width + anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width spacing: UM.Theme.getSize("default_margin").width Row { diff --git a/resources/qml/SaveButton.qml b/resources/qml/SaveButton.qml index 3f25283596..616017ebf6 100644 --- a/resources/qml/SaveButton.qml +++ b/resources/qml/SaveButton.qml @@ -45,10 +45,10 @@ Item { Text { id: statusLabel - width: parent.width - 2 * UM.Theme.getSize("default_margin").width + width: parent.width - 2 * UM.Theme.getSize("sidebar_margin").width anchors.top: parent.top anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("default_margin").width + anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width color: UM.Theme.getColor("text") font: UM.Theme.getFont("default_bold") @@ -57,12 +57,12 @@ Item { Rectangle { id: progressBar - width: parent.width - 2 * UM.Theme.getSize("default_margin").width + width: parent.width - 2 * UM.Theme.getSize("sidebar_margin").width height: UM.Theme.getSize("progressbar").height anchors.top: statusLabel.bottom - anchors.topMargin: UM.Theme.getSize("default_margin").height/4 + anchors.topMargin: UM.Theme.getSize("sidebar_margin").height/4 anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("default_margin").width + anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width radius: UM.Theme.getSize("progressbar_radius").width color: UM.Theme.getColor("progressbar_background") @@ -92,14 +92,14 @@ Item { width: base.width height: saveToButton.height anchors.top: progressBar.bottom - anchors.topMargin: UM.Theme.getSize("default_margin").height + anchors.topMargin: UM.Theme.getSize("sidebar_margin").height anchors.left: parent.left Row { id: additionalComponentsRow anchors.top: parent.top anchors.right: saveToButton.visible ? saveToButton.left : parent.right - anchors.rightMargin: UM.Theme.getSize("default_margin").width + anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width spacing: UM.Theme.getSize("default_margin").width } @@ -141,7 +141,7 @@ Item { anchors.top: parent.top anchors.right: parent.right - anchors.rightMargin: UM.Theme.getSize("default_margin").width + anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width // 1 = not started, 5 = disabled text: [1, 5].indexOf(UM.Backend.state) != -1 ? catalog.i18nc("@label:Printjob", "Prepare") : catalog.i18nc("@label:Printjob", "Cancel") @@ -183,7 +183,7 @@ Item { Behavior on color { ColorAnimation { duration: 50; } } - implicitWidth: actualLabel.contentWidth + (UM.Theme.getSize("default_margin").width * 2) + implicitWidth: actualLabel.contentWidth + (UM.Theme.getSize("sidebar_margin").width * 2) Label { id: actualLabel @@ -221,7 +221,7 @@ Item { anchors.top: parent.top anchors.right: deviceSelectionMenu.visible ? deviceSelectionMenu.left : parent.right - anchors.rightMargin: deviceSelectionMenu.visible ? -3 * UM.Theme.getSize("default_lining").width : UM.Theme.getSize("default_margin").width + anchors.rightMargin: deviceSelectionMenu.visible ? -3 * UM.Theme.getSize("default_lining").width : UM.Theme.getSize("sidebar_margin").width text: UM.OutputDeviceManager.activeDeviceShortDescription onClicked: @@ -258,7 +258,7 @@ Item { Behavior on color { ColorAnimation { duration: 50; } } - implicitWidth: actualLabel.contentWidth + (UM.Theme.getSize("default_margin").width * 2) + implicitWidth: actualLabel.contentWidth + (UM.Theme.getSize("sidebar_margin").width * 2) Label { id: actualLabel @@ -288,7 +288,7 @@ Item { anchors.top: parent.top anchors.right: parent.right - anchors.rightMargin: UM.Theme.getSize("default_margin").width + anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width width: UM.Theme.getSize("save_button_save_to_button").height height: UM.Theme.getSize("save_button_save_to_button").height // 3 = Done, 5 = Disabled From 36f9ca0efbe9f6431e3976b528ab8d740d5196bc Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 24 Aug 2017 16:10:18 +0200 Subject: [PATCH 33/74] New Cura logo image This one has white letters but should otherwise be more or less the same. Contributes to issue CURA-4148. --- resources/themes/cura/images/logo.svg | 103 +++++--------------------- 1 file changed, 20 insertions(+), 83 deletions(-) diff --git a/resources/themes/cura/images/logo.svg b/resources/themes/cura/images/logo.svg index ad76518991..921d322e64 100644 --- a/resources/themes/cura/images/logo.svg +++ b/resources/themes/cura/images/logo.svg @@ -1,83 +1,20 @@ - - - -image/svg+xml \ No newline at end of file + + + + Group 4 + Created with Sketch. + + + + + + + + + + + + + + + \ No newline at end of file From b7261306ecc58e88745e7a7810fef4659e545244 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 24 Aug 2017 16:12:25 +0200 Subject: [PATCH 34/74] Remove useless transformations They ended up in the same place as the original glyph... Contributes to issue CURA-4148. --- resources/themes/cura/images/logo.svg | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/resources/themes/cura/images/logo.svg b/resources/themes/cura/images/logo.svg index 921d322e64..48453cc927 100644 --- a/resources/themes/cura/images/logo.svg +++ b/resources/themes/cura/images/logo.svg @@ -1,20 +1,8 @@ - - Group 4 - Created with Sketch. - - - - - - - - - - - - - - + + + + + \ No newline at end of file From 1f29501836b66e4548a12a0d04c476a8e7c04da7 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 24 Aug 2017 16:15:19 +0200 Subject: [PATCH 35/74] Remove more useless code These are all unused. Contributes to issue CURA-4148. --- resources/themes/cura/images/logo.svg | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/themes/cura/images/logo.svg b/resources/themes/cura/images/logo.svg index 48453cc927..545b42d193 100644 --- a/resources/themes/cura/images/logo.svg +++ b/resources/themes/cura/images/logo.svg @@ -1,8 +1,8 @@ - - - - - - + + + + + + \ No newline at end of file From 974bf9de4d2a0f1ff0c4eeab8a658d4e24f2baa2 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 24 Aug 2017 16:29:11 +0200 Subject: [PATCH 36/74] New printer status icons These are the new icons from the UX guys for the printer status. Contributes to issue CURA-4148. --- .../themes/cura/icons/tab_status_busy.svg | 26 +++++- .../cura/icons/tab_status_connected.svg | 25 +++++- .../themes/cura/icons/tab_status_paused.svg | 22 ++++- .../themes/cura/icons/tab_status_stopped.svg | 82 +++++++------------ .../themes/cura/icons/tab_status_unknown.svg | 27 +++++- 5 files changed, 115 insertions(+), 67 deletions(-) diff --git a/resources/themes/cura/icons/tab_status_busy.svg b/resources/themes/cura/icons/tab_status_busy.svg index cb72fdd623..928273aec0 100644 --- a/resources/themes/cura/icons/tab_status_busy.svg +++ b/resources/themes/cura/icons/tab_status_busy.svg @@ -1,4 +1,22 @@ - - - + + + + busy - printing + Created with Sketch. + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/themes/cura/icons/tab_status_connected.svg b/resources/themes/cura/icons/tab_status_connected.svg index 16ec7d7523..d474681733 100644 --- a/resources/themes/cura/icons/tab_status_connected.svg +++ b/resources/themes/cura/icons/tab_status_connected.svg @@ -1,4 +1,21 @@ - - - + + + + ready-connected + Created with Sketch. + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/themes/cura/icons/tab_status_paused.svg b/resources/themes/cura/icons/tab_status_paused.svg index feffb7894c..49c1a266da 100644 --- a/resources/themes/cura/icons/tab_status_paused.svg +++ b/resources/themes/cura/icons/tab_status_paused.svg @@ -1,4 +1,18 @@ - - - + + + + paused - maintenance + Created with Sketch. + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/themes/cura/icons/tab_status_stopped.svg b/resources/themes/cura/icons/tab_status_stopped.svg index 86386d3a6b..b04640fd96 100644 --- a/resources/themes/cura/icons/tab_status_stopped.svg +++ b/resources/themes/cura/icons/tab_status_stopped.svg @@ -1,51 +1,31 @@ - - - - - - image/svg+xml - - - - - - - - + + + + stopped aborted + Created with Sketch. + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/themes/cura/icons/tab_status_unknown.svg b/resources/themes/cura/icons/tab_status_unknown.svg index 1033b39a4c..48be732b19 100644 --- a/resources/themes/cura/icons/tab_status_unknown.svg +++ b/resources/themes/cura/icons/tab_status_unknown.svg @@ -1,4 +1,23 @@ - - - + + + + unknown + Created with Sketch. + + + + + + + + + + + + + + + + + + \ No newline at end of file From f0c446cb2861ae6cdf5d2fae414e3af4995be7a1 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 24 Aug 2017 17:10:20 +0200 Subject: [PATCH 37/74] Optimise status icons Removed unnecessary transforms. Changed square rects which had their corner radius set to half their width into actual circles. Merged some glyphs that were a stroke and a background into one glyph with an actual stroke and background. Applied necessary transforms to actual coordinates. Dereferenced xlink symbols that were used only once. Contributes to issue CURA-4148. --- .../themes/cura/icons/tab_status_busy.svg | 25 +++----------- .../themes/cura/icons/tab_status_paused.svg | 20 +++-------- .../themes/cura/icons/tab_status_stopped.svg | 33 +++---------------- .../themes/cura/icons/tab_status_unknown.svg | 25 +++----------- 4 files changed, 17 insertions(+), 86 deletions(-) diff --git a/resources/themes/cura/icons/tab_status_busy.svg b/resources/themes/cura/icons/tab_status_busy.svg index 928273aec0..7f702132b5 100644 --- a/resources/themes/cura/icons/tab_status_busy.svg +++ b/resources/themes/cura/icons/tab_status_busy.svg @@ -1,22 +1,7 @@ - - - busy - printing - Created with Sketch. - - - - - - - - - - - - - - - - + + + + + \ No newline at end of file diff --git a/resources/themes/cura/icons/tab_status_paused.svg b/resources/themes/cura/icons/tab_status_paused.svg index 49c1a266da..72f24753b5 100644 --- a/resources/themes/cura/icons/tab_status_paused.svg +++ b/resources/themes/cura/icons/tab_status_paused.svg @@ -1,18 +1,6 @@ - - - paused - maintenance - Created with Sketch. - - - - - - - - - - - - + + + + \ No newline at end of file diff --git a/resources/themes/cura/icons/tab_status_stopped.svg b/resources/themes/cura/icons/tab_status_stopped.svg index b04640fd96..99dfe0b8d1 100644 --- a/resources/themes/cura/icons/tab_status_stopped.svg +++ b/resources/themes/cura/icons/tab_status_stopped.svg @@ -1,31 +1,6 @@ - - - stopped aborted - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - + + + + \ No newline at end of file diff --git a/resources/themes/cura/icons/tab_status_unknown.svg b/resources/themes/cura/icons/tab_status_unknown.svg index 48be732b19..ec776a2778 100644 --- a/resources/themes/cura/icons/tab_status_unknown.svg +++ b/resources/themes/cura/icons/tab_status_unknown.svg @@ -1,23 +1,6 @@ - - - unknown - Created with Sketch. - - - - - - - - - - - - - - - - - + + + + \ No newline at end of file From 457472ee61268069bc759a2ac25e177a3742a5bd Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 24 Aug 2017 17:11:59 +0200 Subject: [PATCH 38/74] Fix connected icon It was rendered wrong by the export of Sketch. Contributes to issue CURA-4148. --- resources/themes/cura/icons/tab_status_connected.svg | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/resources/themes/cura/icons/tab_status_connected.svg b/resources/themes/cura/icons/tab_status_connected.svg index d474681733..59e868bd97 100644 --- a/resources/themes/cura/icons/tab_status_connected.svg +++ b/resources/themes/cura/icons/tab_status_connected.svg @@ -12,10 +12,7 @@ - - - - + \ No newline at end of file From 26033e345468bc2b2ce11c2afe5ded88ae369a2a Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 24 Aug 2017 17:22:34 +0200 Subject: [PATCH 39/74] Optimised connected icon Changed rects with rounded corners into circles. Merged two circles that depicted a circle-with-outline into one circle with an outline. Changed the outline path to a polyline with a stroke. Contributes to issue CURA-4148. --- .../cura/icons/tab_status_connected.svg | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/resources/themes/cura/icons/tab_status_connected.svg b/resources/themes/cura/icons/tab_status_connected.svg index 59e868bd97..4f50430b2a 100644 --- a/resources/themes/cura/icons/tab_status_connected.svg +++ b/resources/themes/cura/icons/tab_status_connected.svg @@ -1,18 +1,5 @@ - - - ready-connected - Created with Sketch. - - - - - - - - - - - - + + + \ No newline at end of file From 4835ffa4033934a5a808ebff371b01c8451939fd Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 24 Aug 2017 21:22:13 +0200 Subject: [PATCH 40/74] Don't recolor printer status buttons Just leave it to the actual icons to provide colour. It may be a bit harder to modify the colours in a different theme then, but now we can have multi-colour icons (as per the new theme requires). Contributes to issue CURA-4148. --- resources/qml/Topbar.qml | 32 -------------------------------- resources/themes/cura/styles.qml | 3 +-- 2 files changed, 1 insertion(+), 34 deletions(-) diff --git a/resources/qml/Topbar.qml b/resources/qml/Topbar.qml index a6da453997..974e7af24b 100644 --- a/resources/qml/Topbar.qml +++ b/resources/qml/Topbar.qml @@ -59,38 +59,6 @@ Rectangle onClicked: base.startMonitoringPrint() text: catalog.i18nc("@title:tab", "Print") iconSource: UM.Theme.getIcon("tab_monitor") - property color overlayColor: - { - if(!printerAcceptsCommands) - { - return UM.Theme.getColor("status_unknown"); - } - - if(Cura.MachineManager.printerOutputDevices[0].printerState == "maintenance") - { - return UM.Theme.getColor("status_busy"); - } - switch(Cura.MachineManager.printerOutputDevices[0].jobState) - { - case "printing": - case "pre_print": - case "wait_cleanup": - case "pausing": - case "resuming": - return UM.Theme.getColor("status_busy"); - case "ready": - case "": - return UM.Theme.getColor("status_ready"); - case "paused": - return UM.Theme.getColor("status_paused"); - case "error": - return UM.Theme.getColor("status_stopped"); - case "offline": - return UM.Theme.getColor("status_offline"); - default: - return UM.Theme.getColor("text_emphasis"); - } - } property string overlayIconSource: { if(!printerConnected) diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index b98a90a136..57837e185b 100755 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -148,10 +148,9 @@ QtObject { sourceSize: Theme.getSize("button_icon") } - UM.RecolorImage + Image { visible: control.overlayIconSource != "" - color: control.overlayColor opacity: !control.enabled ? 0.2 : 1.0 source: control.overlayIconSource width: Theme.getSize("button_icon").width From c25b94ce3174256f377e0e657d99ff288a27a6a6 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 25 Aug 2017 13:02:51 +0200 Subject: [PATCH 41/74] Move status icons to the middle-right side of monitor icon They are actually moved inside the image, rather than in code. This way the theme can still adjust the icon. Contributes to issue CURA-4148. --- resources/themes/cura/icons/tab_monitor.svg | 2 +- resources/themes/cura/icons/tab_status_busy.svg | 12 +++++++----- resources/themes/cura/icons/tab_status_connected.svg | 8 +++++--- resources/themes/cura/icons/tab_status_paused.svg | 10 ++++++---- resources/themes/cura/icons/tab_status_stopped.svg | 10 ++++++---- resources/themes/cura/icons/tab_status_unknown.svg | 10 ++++++---- 6 files changed, 31 insertions(+), 21 deletions(-) diff --git a/resources/themes/cura/icons/tab_monitor.svg b/resources/themes/cura/icons/tab_monitor.svg index b01f41897d..99c1a508b9 100644 --- a/resources/themes/cura/icons/tab_monitor.svg +++ b/resources/themes/cura/icons/tab_monitor.svg @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/resources/themes/cura/icons/tab_status_busy.svg b/resources/themes/cura/icons/tab_status_busy.svg index 7f702132b5..7b5774e71b 100644 --- a/resources/themes/cura/icons/tab_status_busy.svg +++ b/resources/themes/cura/icons/tab_status_busy.svg @@ -1,7 +1,9 @@ - - - - - + + + + + + + \ No newline at end of file diff --git a/resources/themes/cura/icons/tab_status_connected.svg b/resources/themes/cura/icons/tab_status_connected.svg index 4f50430b2a..7997ffbee6 100644 --- a/resources/themes/cura/icons/tab_status_connected.svg +++ b/resources/themes/cura/icons/tab_status_connected.svg @@ -1,5 +1,7 @@ - - - + + + + + \ No newline at end of file diff --git a/resources/themes/cura/icons/tab_status_paused.svg b/resources/themes/cura/icons/tab_status_paused.svg index 72f24753b5..606d4cb96c 100644 --- a/resources/themes/cura/icons/tab_status_paused.svg +++ b/resources/themes/cura/icons/tab_status_paused.svg @@ -1,6 +1,8 @@ - - - - + + + + + + \ No newline at end of file diff --git a/resources/themes/cura/icons/tab_status_stopped.svg b/resources/themes/cura/icons/tab_status_stopped.svg index 99dfe0b8d1..6cd0f18b17 100644 --- a/resources/themes/cura/icons/tab_status_stopped.svg +++ b/resources/themes/cura/icons/tab_status_stopped.svg @@ -1,6 +1,8 @@ - - - - + + + + + + \ No newline at end of file diff --git a/resources/themes/cura/icons/tab_status_unknown.svg b/resources/themes/cura/icons/tab_status_unknown.svg index ec776a2778..5e46eec55b 100644 --- a/resources/themes/cura/icons/tab_status_unknown.svg +++ b/resources/themes/cura/icons/tab_status_unknown.svg @@ -1,6 +1,8 @@ - - - - + + + + + + \ No newline at end of file From 78dbe8c56a4648b3c9ce9d461f208a57c9477620 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 25 Aug 2017 13:03:50 +0200 Subject: [PATCH 42/74] Remove offline icon We don't show an icon in that case any more. Contributes to issue CURA-4148. --- resources/qml/Topbar.qml | 2 -- resources/themes/cura/icons/tab_status_offline.svg | 4 ---- 2 files changed, 6 deletions(-) delete mode 100644 resources/themes/cura/icons/tab_status_offline.svg diff --git a/resources/qml/Topbar.qml b/resources/qml/Topbar.qml index 974e7af24b..83b9145345 100644 --- a/resources/qml/Topbar.qml +++ b/resources/qml/Topbar.qml @@ -90,8 +90,6 @@ Rectangle return UM.Theme.getIcon("tab_status_paused") case "error": return UM.Theme.getIcon("tab_status_stopped") - case "offline": - return UM.Theme.getIcon("tab_status_offline") default: return "" } diff --git a/resources/themes/cura/icons/tab_status_offline.svg b/resources/themes/cura/icons/tab_status_offline.svg deleted file mode 100644 index 850ca1bc03..0000000000 --- a/resources/themes/cura/icons/tab_status_offline.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - From 5be0d664f469c7e2baff5d3165af58d98f6afbeb Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 25 Aug 2017 13:51:40 +0200 Subject: [PATCH 43/74] Remove unused colour from tab_settings icon This icon is recoloured so the colour doesn't matter. When there is no colour, the icon preview shows up better in my browser and my file explorer... Contributes to issue CURA-4148. --- resources/themes/cura/icons/tab_settings.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/themes/cura/icons/tab_settings.svg b/resources/themes/cura/icons/tab_settings.svg index 0d90db81ef..4cd6bd7bec 100644 --- a/resources/themes/cura/icons/tab_settings.svg +++ b/resources/themes/cura/icons/tab_settings.svg @@ -1,3 +1,3 @@ - + From 0c7fd82e2276972d541f6529c49a59f22ee52968 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 25 Aug 2017 13:56:36 +0200 Subject: [PATCH 44/74] Give icons in the top bar a different size Because one of the icons now needs to be rectangular. All icons in there have the same style so they all have to be resized. Contributes to issue CURA-4148. --- resources/themes/cura/icons/tab_settings.svg | 2 +- resources/themes/cura/styles.qml | 19 +++++++++---------- resources/themes/cura/theme.json | 1 + 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/resources/themes/cura/icons/tab_settings.svg b/resources/themes/cura/icons/tab_settings.svg index 4cd6bd7bec..e2a4860647 100644 --- a/resources/themes/cura/icons/tab_settings.svg +++ b/resources/themes/cura/icons/tab_settings.svg @@ -1,3 +1,3 @@ - + diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index 57837e185b..9b28af0dfb 100755 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -1,4 +1,4 @@ -// Copyright (c) 2015 Ultimaker B.V. +// Copyright (c) 2017 Ultimaker B.V. // Cura is released under the terms of the AGPLv3 or higher. import QtQuick 2.1 @@ -128,35 +128,34 @@ QtObject { label: Item { - - implicitHeight: Theme.getSize("button_icon").height + implicitHeight: Theme.getSize("topbar_button_icon").height implicitWidth: Theme.getSize("topbar_button").width; Item { anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter; width: childrenRect.width - height: Theme.getSize("button_icon").height + height: Theme.getSize("topbar_button_icon").height UM.RecolorImage { id: icon color: UM.Theme.getColor("text_emphasis") opacity: !control.enabled ? 0.2 : 1.0 source: control.iconSource - width: Theme.getSize("button_icon").width - height: Theme.getSize("button_icon").height + width: Theme.getSize("topbar_button_icon").width + height: Theme.getSize("topbar_button_icon").height - sourceSize: Theme.getSize("button_icon") + sourceSize: Theme.getSize("topbar_button_icon") } Image { visible: control.overlayIconSource != "" opacity: !control.enabled ? 0.2 : 1.0 source: control.overlayIconSource - width: Theme.getSize("button_icon").width - height: Theme.getSize("button_icon").height + width: Theme.getSize("topbar_button_icon").width + height: Theme.getSize("topbar_button_icon").height - sourceSize: Theme.getSize("button_icon") + sourceSize: Theme.getSize("topbar_button_icon") } Label { diff --git a/resources/themes/cura/theme.json b/resources/themes/cura/theme.json index 54ef0a8788..f1436a8466 100644 --- a/resources/themes/cura/theme.json +++ b/resources/themes/cura/theme.json @@ -287,6 +287,7 @@ "button_lining": [0, 0], "topbar_button": [17, 4], + "topbar_button_icon": [3.125, 2.5], "button_tooltip": [1.0, 1.3], "button_tooltip_arrow": [0.25, 0.25], From 165665247f7fe24f0aac87bef7ce1667aaa8fe96 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 25 Aug 2017 14:03:54 +0200 Subject: [PATCH 45/74] Remove unused property valueWarning It is unused here. There is such a property being used by the profile selection drop-down but that one uses the valueWarning property in SidebarHeader.qml which is exactly the same. Contributes to issue CURA-4148. --- resources/qml/Sidebar.qml | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/qml/Sidebar.qml b/resources/qml/Sidebar.qml index 3d2b7e39dc..54c6d55049 100755 --- a/resources/qml/Sidebar.qml +++ b/resources/qml/Sidebar.qml @@ -252,7 +252,6 @@ Rectangle tooltip: Cura.MachineManager.activeQualityName style: UM.Theme.styles.sidebar_header_button activeFocusOnPress: true; - property var valueWarning: !Cura.MachineManager.isActiveQualitySupported menu: ProfileMenu { } UM.SimpleButton From 585c04dfaa05bf609db81d3d32a15c7dc0195009 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 25 Aug 2017 14:27:45 +0200 Subject: [PATCH 46/74] Also show warning icon when the set-up on other extruders is unsupported So I added a function that checks the support on all extruders and the global stack. Contributes to issue CURA-4148. --- cura/Settings/MachineManager.py | 17 +++++++++++++++++ resources/qml/SidebarHeader.qml | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index e946c18790..5c07c83ece 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -659,6 +659,23 @@ class MachineManager(QObject): return Util.parseBool(quality.getMetaDataEntry("supported", True)) return False + ## Returns whether there is anything unsupported in the current set-up. + # + # The current set-up signifies the global stack and all extruder stacks, + # so this indicates whether there is any container in any of the container + # stacks that is not marked as supported. + @pyqtProperty(bool, notify = activeQualityChanged) + def isCurrentSetupSupported(self) -> bool: + if not self._global_container_stack: + return False + for stack in [self._global_container_stack] + list(self._global_container_stack.extruders.values()): + for container in stack.getContainers(): + if not container: + return False + if not Util.parseBool(container.getMetaDataEntry("supported", True)): + return False + return True + ## Get the Quality ID associated with the currently active extruder # Note that this only returns the "quality", not the "quality_changes" # \returns QualityID (string) if found, empty string otherwise diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 85d350d435..1aefc58a38 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -327,7 +327,7 @@ Column //sourceSize.height: width + 5 color: UM.Theme.getColor("setting_validation_warning") - visible: !Cura.MachineManager.isActiveQualitySupported + visible: !Cura.MachineManager.isCurrentSetupSupported } } } From aa9347d7bec885f16c28c4df25716410248eedae Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 25 Aug 2017 14:53:07 +0200 Subject: [PATCH 47/74] New icon for monitor tab Fresh from the press. Contributes to issue CURA-4148. --- resources/themes/cura/icons/tab_monitor.svg | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/resources/themes/cura/icons/tab_monitor.svg b/resources/themes/cura/icons/tab_monitor.svg index 99c1a508b9..7ac8c67a2f 100644 --- a/resources/themes/cura/icons/tab_monitor.svg +++ b/resources/themes/cura/icons/tab_monitor.svg @@ -1,5 +1,12 @@ - - - + + + Artboard + Created with Sketch. + + + + + + \ No newline at end of file From 3db799c661e4252509483a01c7fe5a21ce216108 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 25 Aug 2017 14:55:13 +0200 Subject: [PATCH 48/74] Remove unnecessary crap from monitor icon All the metadata and empty tags and no-op groups and such. Contributes to issue CURA-4148. --- resources/themes/cura/icons/tab_monitor.svg | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/resources/themes/cura/icons/tab_monitor.svg b/resources/themes/cura/icons/tab_monitor.svg index 7ac8c67a2f..cdd08d612d 100644 --- a/resources/themes/cura/icons/tab_monitor.svg +++ b/resources/themes/cura/icons/tab_monitor.svg @@ -1,12 +1,4 @@ - - - Artboard - Created with Sketch. - - - - - - + + \ No newline at end of file From 0aa1f04b1d9d0093bf8134a26768737bb1d99228 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 25 Aug 2017 14:56:39 +0200 Subject: [PATCH 49/74] Correct width of monitor icon Because the overlay is wider this one needs to be just as wide. Contributes to issue CURA-4148. --- resources/themes/cura/icons/tab_monitor.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/themes/cura/icons/tab_monitor.svg b/resources/themes/cura/icons/tab_monitor.svg index cdd08d612d..afc661a22d 100644 --- a/resources/themes/cura/icons/tab_monitor.svg +++ b/resources/themes/cura/icons/tab_monitor.svg @@ -1,4 +1,4 @@ - + \ No newline at end of file From 68a89db8635d22c97f0f6cce5c3768bf71bb5567 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 28 Aug 2017 11:18:24 +0200 Subject: [PATCH 50/74] Move star icon in profile dropdown a little to the left CURA-4148 The star icon in the profile dropdown box is too much to the right, which overlaps a little with the dropdown arrow button. --- resources/themes/cura/theme.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/themes/cura/theme.json b/resources/themes/cura/theme.json index 63265cb21e..0dfea5a8a1 100644 --- a/resources/themes/cura/theme.json +++ b/resources/themes/cura/theme.json @@ -275,7 +275,7 @@ "setting": [25.0, 1.8], "setting_control": [10.0, 2.0], "setting_control_depth_margin": [1.4, 0.0], - "setting_preferences_button_margin": [3.3, 0.0], + "setting_preferences_button_margin": [4, 0.0], "setting_control_margin": [0.0, 0.0], "setting_unit_margin": [0.5, 0.5], "setting_text_maxwidth": [40.0, 0.0], From 0781848af58fb489579fa34666f6898561eab0af Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 28 Aug 2017 17:34:58 +0200 Subject: [PATCH 51/74] Reduce margin size for settings in recommended and custom mode CURA-4148 --- resources/qml/Settings/SettingItem.qml | 2 +- resources/themes/cura/theme.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/qml/Settings/SettingItem.qml b/resources/qml/Settings/SettingItem.qml index d1452d81a6..e520e69040 100644 --- a/resources/qml/Settings/SettingItem.qml +++ b/resources/qml/Settings/SettingItem.qml @@ -130,7 +130,7 @@ Item { id: settingControls height: parent.height / 2 - spacing: UM.Theme.getSize("sidebar_margin").width / 2 + spacing: UM.Theme.getSize("sidebar_margin").height / 2 anchors { right: controlContainer.left diff --git a/resources/themes/cura/theme.json b/resources/themes/cura/theme.json index 0dfea5a8a1..09acd7d7bd 100644 --- a/resources/themes/cura/theme.json +++ b/resources/themes/cura/theme.json @@ -253,7 +253,7 @@ "logo": [9.5, 2.0], "sidebar": [35.0, 10.0], - "sidebar_margin": [1.71, 1.43], + "sidebar_margin": [1.71, 0.71], "sidebar_margin_thin": [0.71, 0.71], "sidebar_header": [0.0, 4.0], "sidebar_header_highlight": [0.25, 0.25], @@ -268,7 +268,7 @@ "simple_mode_infill_caption": [0.0, 5.0], "simple_mode_infill_height": [0.0, 8.0], - "section": [0.0, 2.86], + "section": [0.0, 2.00], "section_icon": [1.6, 1.6], "section_icon_column": [2.8, 0.0], From 6f77cfc7634c504ea1f7c2ec78ab68d7c8fc3c6b Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 30 Aug 2017 15:02:43 +0200 Subject: [PATCH 52/74] Always show plain monitor icon, never with_status The status icons are just overlaid on top of the monitor icon. No need for any specialised icon with a background or anything. Contributes to issue CURA-4148. --- resources/qml/Topbar.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Topbar.qml b/resources/qml/Topbar.qml index a9b17dcf4b..3e612b1478 100644 --- a/resources/qml/Topbar.qml +++ b/resources/qml/Topbar.qml @@ -58,7 +58,7 @@ Rectangle height: UM.Theme.getSize("sidebar_header").height onClicked: base.startMonitoringPrint() text: catalog.i18nc("@title:tab", "Monitor") - iconSource: printerConnected ? UM.Theme.getIcon("tab_monitor_with_status") : UM.Theme.getIcon("tab_monitor") + iconSource: UM.Theme.getIcon("tab_monitor") property color overlayColor: { if(!printerAcceptsCommands) From e619c11e01ef3e1d845a44a9f9738573d5cbb8cd Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 29 Aug 2017 14:16:01 +0200 Subject: [PATCH 53/74] New base theme: Cura-light There is a new theme now, Cura Light, based on the original colours of Cura 15.6 through 2.7. It is now also the base of the themes. It will soon be made the temporary default until the UX team can come up with something better for the dark theme. Contributes to issue CURA-4148. --- .../{cura => cura-light}/fonts/LICENSE.txt | 404 +++++++++--------- .../fonts/OpenSans-Bold.ttf | Bin .../fonts/OpenSans-BoldItalic.ttf | Bin .../fonts/OpenSans-Italic.ttf | Bin .../fonts/OpenSans-Light.ttf | Bin .../fonts/OpenSans-LightItalic.ttf | Bin .../fonts/OpenSans-Regular.ttf | Bin .../fonts/OpenSans-Semibold.ttf | Bin .../fonts/OpenSans-SemiboldItalic.ttf | Bin .../icons/application.svg | 0 .../icons/arrow_bottom.svg | 0 .../{cura => cura-light}/icons/arrow_left.svg | 0 .../icons/arrow_right.svg | 0 .../{cura => cura-light}/icons/arrow_top.svg | 0 .../{cura => cura-light}/icons/basic.svg | 0 .../icons/category_adhesion.svg | 0 .../icons/category_blackmagic.svg | 0 .../icons/category_cool.svg | 0 .../icons/category_dual.svg | 0 .../icons/category_experimental.svg | 0 .../icons/category_fixes.svg | 0 .../icons/category_infill.svg | 0 .../icons/category_layer_height.svg | 0 .../icons/category_machine.svg | 0 .../icons/category_material.svg | 0 .../icons/category_shell.svg | 0 .../icons/category_shield.svg | 0 .../icons/category_speed.svg | 0 .../icons/category_support.svg | 0 .../icons/category_travel.svg | 0 .../icons/category_unknown.svg | 0 .../{cura => cura-light}/icons/check.svg | 0 .../{cura => cura-light}/icons/cross1.svg | 0 .../{cura => cura-light}/icons/cross2.svg | 0 .../{cura => cura-light}/icons/dense.svg | 0 .../themes/{cura => cura-light}/icons/dot.svg | 0 .../icons/drop_down_button.svg | 0 .../{cura => cura-light}/icons/gradual.svg | 0 .../{cura => cura-light}/icons/hollow.svg | 0 .../{cura => cura-light}/icons/link.svg | 0 .../{cura => cura-light}/icons/load.svg | 0 .../icons/material_not_selected.svg | 0 .../icons/material_selected.svg | 0 .../{cura => cura-light}/icons/minus.svg | 0 .../{cura => cura-light}/icons/mirror.svg | 0 .../{cura => cura-light}/icons/notice.svg | 0 .../{cura => cura-light}/icons/pencil.svg | 0 .../{cura => cura-light}/icons/play.svg | 0 .../{cura => cura-light}/icons/plugin.svg | 0 .../{cura => cura-light}/icons/plus.svg | 0 .../{cura => cura-light}/icons/print_time.svg | 0 .../{cura => cura-light}/icons/printsetup.svg | 0 .../{cura => cura-light}/icons/quick.svg | 0 .../{cura => cura-light}/icons/reset.svg | 0 .../{cura => cura-light}/icons/rotate.svg | 0 .../icons/rotate_layflat.svg | 0 .../icons/rotate_reset.svg | 0 .../{cura => cura-light}/icons/scale.svg | 0 .../{cura => cura-light}/icons/scale_max.svg | 0 .../icons/scale_reset.svg | 0 .../{cura => cura-light}/icons/search.svg | 0 .../icons/setting_per_object.svg | 0 .../{cura => cura-light}/icons/settings.svg | 0 .../{cura => cura-light}/icons/solid.svg | 0 .../{cura => cura-light}/icons/sparse.svg | 0 .../{cura => cura-light}/icons/star.svg | 0 .../icons/tab_monitor.svg | 0 .../icons/tab_settings.svg | 0 .../icons/tab_status_busy.svg | 0 .../icons/tab_status_connected.svg | 0 .../icons/tab_status_paused.svg | 0 .../icons/tab_status_stopped.svg | 0 .../icons/tab_status_unknown.svg | 0 .../{cura => cura-light}/icons/translate.svg | 0 .../{cura => cura-light}/icons/ulti.svg | 0 .../{cura => cura-light}/icons/view_layer.svg | 0 .../icons/view_normal.svg | 0 .../{cura => cura-light}/icons/view_xray.svg | 0 .../{cura => cura-light}/icons/viewmode.svg | 0 .../{cura => cura-light}/icons/warning.svg | 0 .../{cura => cura-light}/images/logo.svg | 0 .../themes/{cura => cura-light}/styles.qml | 0 resources/themes/cura-light/theme.json | 344 +++++++++++++++ resources/themes/cura/theme.json | 137 +----- 84 files changed, 548 insertions(+), 337 deletions(-) rename resources/themes/{cura => cura-light}/fonts/LICENSE.txt (98%) rename resources/themes/{cura => cura-light}/fonts/OpenSans-Bold.ttf (100%) rename resources/themes/{cura => cura-light}/fonts/OpenSans-BoldItalic.ttf (100%) rename resources/themes/{cura => cura-light}/fonts/OpenSans-Italic.ttf (100%) rename resources/themes/{cura => cura-light}/fonts/OpenSans-Light.ttf (100%) rename resources/themes/{cura => cura-light}/fonts/OpenSans-LightItalic.ttf (100%) rename resources/themes/{cura => cura-light}/fonts/OpenSans-Regular.ttf (100%) rename resources/themes/{cura => cura-light}/fonts/OpenSans-Semibold.ttf (100%) rename resources/themes/{cura => cura-light}/fonts/OpenSans-SemiboldItalic.ttf (100%) rename resources/themes/{cura => cura-light}/icons/application.svg (100%) rename resources/themes/{cura => cura-light}/icons/arrow_bottom.svg (100%) rename resources/themes/{cura => cura-light}/icons/arrow_left.svg (100%) rename resources/themes/{cura => cura-light}/icons/arrow_right.svg (100%) rename resources/themes/{cura => cura-light}/icons/arrow_top.svg (100%) rename resources/themes/{cura => cura-light}/icons/basic.svg (100%) rename resources/themes/{cura => cura-light}/icons/category_adhesion.svg (100%) rename resources/themes/{cura => cura-light}/icons/category_blackmagic.svg (100%) rename resources/themes/{cura => cura-light}/icons/category_cool.svg (100%) rename resources/themes/{cura => cura-light}/icons/category_dual.svg (100%) rename resources/themes/{cura => cura-light}/icons/category_experimental.svg (100%) rename resources/themes/{cura => cura-light}/icons/category_fixes.svg (100%) rename resources/themes/{cura => cura-light}/icons/category_infill.svg (100%) rename resources/themes/{cura => cura-light}/icons/category_layer_height.svg (100%) rename resources/themes/{cura => cura-light}/icons/category_machine.svg (100%) rename resources/themes/{cura => cura-light}/icons/category_material.svg (100%) rename resources/themes/{cura => cura-light}/icons/category_shell.svg (100%) rename resources/themes/{cura => cura-light}/icons/category_shield.svg (100%) rename resources/themes/{cura => cura-light}/icons/category_speed.svg (100%) rename resources/themes/{cura => cura-light}/icons/category_support.svg (100%) rename resources/themes/{cura => cura-light}/icons/category_travel.svg (100%) rename resources/themes/{cura => cura-light}/icons/category_unknown.svg (100%) rename resources/themes/{cura => cura-light}/icons/check.svg (100%) rename resources/themes/{cura => cura-light}/icons/cross1.svg (100%) rename resources/themes/{cura => cura-light}/icons/cross2.svg (100%) rename resources/themes/{cura => cura-light}/icons/dense.svg (100%) rename resources/themes/{cura => cura-light}/icons/dot.svg (100%) rename resources/themes/{cura => cura-light}/icons/drop_down_button.svg (100%) rename resources/themes/{cura => cura-light}/icons/gradual.svg (100%) rename resources/themes/{cura => cura-light}/icons/hollow.svg (100%) rename resources/themes/{cura => cura-light}/icons/link.svg (100%) rename resources/themes/{cura => cura-light}/icons/load.svg (100%) rename resources/themes/{cura => cura-light}/icons/material_not_selected.svg (100%) rename resources/themes/{cura => cura-light}/icons/material_selected.svg (100%) rename resources/themes/{cura => cura-light}/icons/minus.svg (100%) rename resources/themes/{cura => cura-light}/icons/mirror.svg (100%) rename resources/themes/{cura => cura-light}/icons/notice.svg (100%) rename resources/themes/{cura => cura-light}/icons/pencil.svg (100%) rename resources/themes/{cura => cura-light}/icons/play.svg (100%) rename resources/themes/{cura => cura-light}/icons/plugin.svg (100%) rename resources/themes/{cura => cura-light}/icons/plus.svg (100%) rename resources/themes/{cura => cura-light}/icons/print_time.svg (100%) rename resources/themes/{cura => cura-light}/icons/printsetup.svg (100%) rename resources/themes/{cura => cura-light}/icons/quick.svg (100%) rename resources/themes/{cura => cura-light}/icons/reset.svg (100%) rename resources/themes/{cura => cura-light}/icons/rotate.svg (100%) rename resources/themes/{cura => cura-light}/icons/rotate_layflat.svg (100%) rename resources/themes/{cura => cura-light}/icons/rotate_reset.svg (100%) rename resources/themes/{cura => cura-light}/icons/scale.svg (100%) rename resources/themes/{cura => cura-light}/icons/scale_max.svg (100%) rename resources/themes/{cura => cura-light}/icons/scale_reset.svg (100%) rename resources/themes/{cura => cura-light}/icons/search.svg (100%) rename resources/themes/{cura => cura-light}/icons/setting_per_object.svg (100%) rename resources/themes/{cura => cura-light}/icons/settings.svg (100%) rename resources/themes/{cura => cura-light}/icons/solid.svg (100%) rename resources/themes/{cura => cura-light}/icons/sparse.svg (100%) rename resources/themes/{cura => cura-light}/icons/star.svg (100%) rename resources/themes/{cura => cura-light}/icons/tab_monitor.svg (100%) rename resources/themes/{cura => cura-light}/icons/tab_settings.svg (100%) rename resources/themes/{cura => cura-light}/icons/tab_status_busy.svg (100%) rename resources/themes/{cura => cura-light}/icons/tab_status_connected.svg (100%) rename resources/themes/{cura => cura-light}/icons/tab_status_paused.svg (100%) rename resources/themes/{cura => cura-light}/icons/tab_status_stopped.svg (100%) rename resources/themes/{cura => cura-light}/icons/tab_status_unknown.svg (100%) rename resources/themes/{cura => cura-light}/icons/translate.svg (100%) rename resources/themes/{cura => cura-light}/icons/ulti.svg (100%) rename resources/themes/{cura => cura-light}/icons/view_layer.svg (100%) rename resources/themes/{cura => cura-light}/icons/view_normal.svg (100%) rename resources/themes/{cura => cura-light}/icons/view_xray.svg (100%) rename resources/themes/{cura => cura-light}/icons/viewmode.svg (100%) rename resources/themes/{cura => cura-light}/icons/warning.svg (100%) rename resources/themes/{cura => cura-light}/images/logo.svg (100%) rename resources/themes/{cura => cura-light}/styles.qml (100%) create mode 100644 resources/themes/cura-light/theme.json diff --git a/resources/themes/cura/fonts/LICENSE.txt b/resources/themes/cura-light/fonts/LICENSE.txt similarity index 98% rename from resources/themes/cura/fonts/LICENSE.txt rename to resources/themes/cura-light/fonts/LICENSE.txt index 75b52484ea..d645695673 100644 --- a/resources/themes/cura/fonts/LICENSE.txt +++ b/resources/themes/cura-light/fonts/LICENSE.txt @@ -1,202 +1,202 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/resources/themes/cura/fonts/OpenSans-Bold.ttf b/resources/themes/cura-light/fonts/OpenSans-Bold.ttf similarity index 100% rename from resources/themes/cura/fonts/OpenSans-Bold.ttf rename to resources/themes/cura-light/fonts/OpenSans-Bold.ttf diff --git a/resources/themes/cura/fonts/OpenSans-BoldItalic.ttf b/resources/themes/cura-light/fonts/OpenSans-BoldItalic.ttf similarity index 100% rename from resources/themes/cura/fonts/OpenSans-BoldItalic.ttf rename to resources/themes/cura-light/fonts/OpenSans-BoldItalic.ttf diff --git a/resources/themes/cura/fonts/OpenSans-Italic.ttf b/resources/themes/cura-light/fonts/OpenSans-Italic.ttf similarity index 100% rename from resources/themes/cura/fonts/OpenSans-Italic.ttf rename to resources/themes/cura-light/fonts/OpenSans-Italic.ttf diff --git a/resources/themes/cura/fonts/OpenSans-Light.ttf b/resources/themes/cura-light/fonts/OpenSans-Light.ttf similarity index 100% rename from resources/themes/cura/fonts/OpenSans-Light.ttf rename to resources/themes/cura-light/fonts/OpenSans-Light.ttf diff --git a/resources/themes/cura/fonts/OpenSans-LightItalic.ttf b/resources/themes/cura-light/fonts/OpenSans-LightItalic.ttf similarity index 100% rename from resources/themes/cura/fonts/OpenSans-LightItalic.ttf rename to resources/themes/cura-light/fonts/OpenSans-LightItalic.ttf diff --git a/resources/themes/cura/fonts/OpenSans-Regular.ttf b/resources/themes/cura-light/fonts/OpenSans-Regular.ttf similarity index 100% rename from resources/themes/cura/fonts/OpenSans-Regular.ttf rename to resources/themes/cura-light/fonts/OpenSans-Regular.ttf diff --git a/resources/themes/cura/fonts/OpenSans-Semibold.ttf b/resources/themes/cura-light/fonts/OpenSans-Semibold.ttf similarity index 100% rename from resources/themes/cura/fonts/OpenSans-Semibold.ttf rename to resources/themes/cura-light/fonts/OpenSans-Semibold.ttf diff --git a/resources/themes/cura/fonts/OpenSans-SemiboldItalic.ttf b/resources/themes/cura-light/fonts/OpenSans-SemiboldItalic.ttf similarity index 100% rename from resources/themes/cura/fonts/OpenSans-SemiboldItalic.ttf rename to resources/themes/cura-light/fonts/OpenSans-SemiboldItalic.ttf diff --git a/resources/themes/cura/icons/application.svg b/resources/themes/cura-light/icons/application.svg similarity index 100% rename from resources/themes/cura/icons/application.svg rename to resources/themes/cura-light/icons/application.svg diff --git a/resources/themes/cura/icons/arrow_bottom.svg b/resources/themes/cura-light/icons/arrow_bottom.svg similarity index 100% rename from resources/themes/cura/icons/arrow_bottom.svg rename to resources/themes/cura-light/icons/arrow_bottom.svg diff --git a/resources/themes/cura/icons/arrow_left.svg b/resources/themes/cura-light/icons/arrow_left.svg similarity index 100% rename from resources/themes/cura/icons/arrow_left.svg rename to resources/themes/cura-light/icons/arrow_left.svg diff --git a/resources/themes/cura/icons/arrow_right.svg b/resources/themes/cura-light/icons/arrow_right.svg similarity index 100% rename from resources/themes/cura/icons/arrow_right.svg rename to resources/themes/cura-light/icons/arrow_right.svg diff --git a/resources/themes/cura/icons/arrow_top.svg b/resources/themes/cura-light/icons/arrow_top.svg similarity index 100% rename from resources/themes/cura/icons/arrow_top.svg rename to resources/themes/cura-light/icons/arrow_top.svg diff --git a/resources/themes/cura/icons/basic.svg b/resources/themes/cura-light/icons/basic.svg similarity index 100% rename from resources/themes/cura/icons/basic.svg rename to resources/themes/cura-light/icons/basic.svg diff --git a/resources/themes/cura/icons/category_adhesion.svg b/resources/themes/cura-light/icons/category_adhesion.svg similarity index 100% rename from resources/themes/cura/icons/category_adhesion.svg rename to resources/themes/cura-light/icons/category_adhesion.svg diff --git a/resources/themes/cura/icons/category_blackmagic.svg b/resources/themes/cura-light/icons/category_blackmagic.svg similarity index 100% rename from resources/themes/cura/icons/category_blackmagic.svg rename to resources/themes/cura-light/icons/category_blackmagic.svg diff --git a/resources/themes/cura/icons/category_cool.svg b/resources/themes/cura-light/icons/category_cool.svg similarity index 100% rename from resources/themes/cura/icons/category_cool.svg rename to resources/themes/cura-light/icons/category_cool.svg diff --git a/resources/themes/cura/icons/category_dual.svg b/resources/themes/cura-light/icons/category_dual.svg similarity index 100% rename from resources/themes/cura/icons/category_dual.svg rename to resources/themes/cura-light/icons/category_dual.svg diff --git a/resources/themes/cura/icons/category_experimental.svg b/resources/themes/cura-light/icons/category_experimental.svg similarity index 100% rename from resources/themes/cura/icons/category_experimental.svg rename to resources/themes/cura-light/icons/category_experimental.svg diff --git a/resources/themes/cura/icons/category_fixes.svg b/resources/themes/cura-light/icons/category_fixes.svg similarity index 100% rename from resources/themes/cura/icons/category_fixes.svg rename to resources/themes/cura-light/icons/category_fixes.svg diff --git a/resources/themes/cura/icons/category_infill.svg b/resources/themes/cura-light/icons/category_infill.svg similarity index 100% rename from resources/themes/cura/icons/category_infill.svg rename to resources/themes/cura-light/icons/category_infill.svg diff --git a/resources/themes/cura/icons/category_layer_height.svg b/resources/themes/cura-light/icons/category_layer_height.svg similarity index 100% rename from resources/themes/cura/icons/category_layer_height.svg rename to resources/themes/cura-light/icons/category_layer_height.svg diff --git a/resources/themes/cura/icons/category_machine.svg b/resources/themes/cura-light/icons/category_machine.svg similarity index 100% rename from resources/themes/cura/icons/category_machine.svg rename to resources/themes/cura-light/icons/category_machine.svg diff --git a/resources/themes/cura/icons/category_material.svg b/resources/themes/cura-light/icons/category_material.svg similarity index 100% rename from resources/themes/cura/icons/category_material.svg rename to resources/themes/cura-light/icons/category_material.svg diff --git a/resources/themes/cura/icons/category_shell.svg b/resources/themes/cura-light/icons/category_shell.svg similarity index 100% rename from resources/themes/cura/icons/category_shell.svg rename to resources/themes/cura-light/icons/category_shell.svg diff --git a/resources/themes/cura/icons/category_shield.svg b/resources/themes/cura-light/icons/category_shield.svg similarity index 100% rename from resources/themes/cura/icons/category_shield.svg rename to resources/themes/cura-light/icons/category_shield.svg diff --git a/resources/themes/cura/icons/category_speed.svg b/resources/themes/cura-light/icons/category_speed.svg similarity index 100% rename from resources/themes/cura/icons/category_speed.svg rename to resources/themes/cura-light/icons/category_speed.svg diff --git a/resources/themes/cura/icons/category_support.svg b/resources/themes/cura-light/icons/category_support.svg similarity index 100% rename from resources/themes/cura/icons/category_support.svg rename to resources/themes/cura-light/icons/category_support.svg diff --git a/resources/themes/cura/icons/category_travel.svg b/resources/themes/cura-light/icons/category_travel.svg similarity index 100% rename from resources/themes/cura/icons/category_travel.svg rename to resources/themes/cura-light/icons/category_travel.svg diff --git a/resources/themes/cura/icons/category_unknown.svg b/resources/themes/cura-light/icons/category_unknown.svg similarity index 100% rename from resources/themes/cura/icons/category_unknown.svg rename to resources/themes/cura-light/icons/category_unknown.svg diff --git a/resources/themes/cura/icons/check.svg b/resources/themes/cura-light/icons/check.svg similarity index 100% rename from resources/themes/cura/icons/check.svg rename to resources/themes/cura-light/icons/check.svg diff --git a/resources/themes/cura/icons/cross1.svg b/resources/themes/cura-light/icons/cross1.svg similarity index 100% rename from resources/themes/cura/icons/cross1.svg rename to resources/themes/cura-light/icons/cross1.svg diff --git a/resources/themes/cura/icons/cross2.svg b/resources/themes/cura-light/icons/cross2.svg similarity index 100% rename from resources/themes/cura/icons/cross2.svg rename to resources/themes/cura-light/icons/cross2.svg diff --git a/resources/themes/cura/icons/dense.svg b/resources/themes/cura-light/icons/dense.svg similarity index 100% rename from resources/themes/cura/icons/dense.svg rename to resources/themes/cura-light/icons/dense.svg diff --git a/resources/themes/cura/icons/dot.svg b/resources/themes/cura-light/icons/dot.svg similarity index 100% rename from resources/themes/cura/icons/dot.svg rename to resources/themes/cura-light/icons/dot.svg diff --git a/resources/themes/cura/icons/drop_down_button.svg b/resources/themes/cura-light/icons/drop_down_button.svg similarity index 100% rename from resources/themes/cura/icons/drop_down_button.svg rename to resources/themes/cura-light/icons/drop_down_button.svg diff --git a/resources/themes/cura/icons/gradual.svg b/resources/themes/cura-light/icons/gradual.svg similarity index 100% rename from resources/themes/cura/icons/gradual.svg rename to resources/themes/cura-light/icons/gradual.svg diff --git a/resources/themes/cura/icons/hollow.svg b/resources/themes/cura-light/icons/hollow.svg similarity index 100% rename from resources/themes/cura/icons/hollow.svg rename to resources/themes/cura-light/icons/hollow.svg diff --git a/resources/themes/cura/icons/link.svg b/resources/themes/cura-light/icons/link.svg similarity index 100% rename from resources/themes/cura/icons/link.svg rename to resources/themes/cura-light/icons/link.svg diff --git a/resources/themes/cura/icons/load.svg b/resources/themes/cura-light/icons/load.svg similarity index 100% rename from resources/themes/cura/icons/load.svg rename to resources/themes/cura-light/icons/load.svg diff --git a/resources/themes/cura/icons/material_not_selected.svg b/resources/themes/cura-light/icons/material_not_selected.svg similarity index 100% rename from resources/themes/cura/icons/material_not_selected.svg rename to resources/themes/cura-light/icons/material_not_selected.svg diff --git a/resources/themes/cura/icons/material_selected.svg b/resources/themes/cura-light/icons/material_selected.svg similarity index 100% rename from resources/themes/cura/icons/material_selected.svg rename to resources/themes/cura-light/icons/material_selected.svg diff --git a/resources/themes/cura/icons/minus.svg b/resources/themes/cura-light/icons/minus.svg similarity index 100% rename from resources/themes/cura/icons/minus.svg rename to resources/themes/cura-light/icons/minus.svg diff --git a/resources/themes/cura/icons/mirror.svg b/resources/themes/cura-light/icons/mirror.svg similarity index 100% rename from resources/themes/cura/icons/mirror.svg rename to resources/themes/cura-light/icons/mirror.svg diff --git a/resources/themes/cura/icons/notice.svg b/resources/themes/cura-light/icons/notice.svg similarity index 100% rename from resources/themes/cura/icons/notice.svg rename to resources/themes/cura-light/icons/notice.svg diff --git a/resources/themes/cura/icons/pencil.svg b/resources/themes/cura-light/icons/pencil.svg similarity index 100% rename from resources/themes/cura/icons/pencil.svg rename to resources/themes/cura-light/icons/pencil.svg diff --git a/resources/themes/cura/icons/play.svg b/resources/themes/cura-light/icons/play.svg similarity index 100% rename from resources/themes/cura/icons/play.svg rename to resources/themes/cura-light/icons/play.svg diff --git a/resources/themes/cura/icons/plugin.svg b/resources/themes/cura-light/icons/plugin.svg similarity index 100% rename from resources/themes/cura/icons/plugin.svg rename to resources/themes/cura-light/icons/plugin.svg diff --git a/resources/themes/cura/icons/plus.svg b/resources/themes/cura-light/icons/plus.svg similarity index 100% rename from resources/themes/cura/icons/plus.svg rename to resources/themes/cura-light/icons/plus.svg diff --git a/resources/themes/cura/icons/print_time.svg b/resources/themes/cura-light/icons/print_time.svg similarity index 100% rename from resources/themes/cura/icons/print_time.svg rename to resources/themes/cura-light/icons/print_time.svg diff --git a/resources/themes/cura/icons/printsetup.svg b/resources/themes/cura-light/icons/printsetup.svg similarity index 100% rename from resources/themes/cura/icons/printsetup.svg rename to resources/themes/cura-light/icons/printsetup.svg diff --git a/resources/themes/cura/icons/quick.svg b/resources/themes/cura-light/icons/quick.svg similarity index 100% rename from resources/themes/cura/icons/quick.svg rename to resources/themes/cura-light/icons/quick.svg diff --git a/resources/themes/cura/icons/reset.svg b/resources/themes/cura-light/icons/reset.svg similarity index 100% rename from resources/themes/cura/icons/reset.svg rename to resources/themes/cura-light/icons/reset.svg diff --git a/resources/themes/cura/icons/rotate.svg b/resources/themes/cura-light/icons/rotate.svg similarity index 100% rename from resources/themes/cura/icons/rotate.svg rename to resources/themes/cura-light/icons/rotate.svg diff --git a/resources/themes/cura/icons/rotate_layflat.svg b/resources/themes/cura-light/icons/rotate_layflat.svg similarity index 100% rename from resources/themes/cura/icons/rotate_layflat.svg rename to resources/themes/cura-light/icons/rotate_layflat.svg diff --git a/resources/themes/cura/icons/rotate_reset.svg b/resources/themes/cura-light/icons/rotate_reset.svg similarity index 100% rename from resources/themes/cura/icons/rotate_reset.svg rename to resources/themes/cura-light/icons/rotate_reset.svg diff --git a/resources/themes/cura/icons/scale.svg b/resources/themes/cura-light/icons/scale.svg similarity index 100% rename from resources/themes/cura/icons/scale.svg rename to resources/themes/cura-light/icons/scale.svg diff --git a/resources/themes/cura/icons/scale_max.svg b/resources/themes/cura-light/icons/scale_max.svg similarity index 100% rename from resources/themes/cura/icons/scale_max.svg rename to resources/themes/cura-light/icons/scale_max.svg diff --git a/resources/themes/cura/icons/scale_reset.svg b/resources/themes/cura-light/icons/scale_reset.svg similarity index 100% rename from resources/themes/cura/icons/scale_reset.svg rename to resources/themes/cura-light/icons/scale_reset.svg diff --git a/resources/themes/cura/icons/search.svg b/resources/themes/cura-light/icons/search.svg similarity index 100% rename from resources/themes/cura/icons/search.svg rename to resources/themes/cura-light/icons/search.svg diff --git a/resources/themes/cura/icons/setting_per_object.svg b/resources/themes/cura-light/icons/setting_per_object.svg similarity index 100% rename from resources/themes/cura/icons/setting_per_object.svg rename to resources/themes/cura-light/icons/setting_per_object.svg diff --git a/resources/themes/cura/icons/settings.svg b/resources/themes/cura-light/icons/settings.svg similarity index 100% rename from resources/themes/cura/icons/settings.svg rename to resources/themes/cura-light/icons/settings.svg diff --git a/resources/themes/cura/icons/solid.svg b/resources/themes/cura-light/icons/solid.svg similarity index 100% rename from resources/themes/cura/icons/solid.svg rename to resources/themes/cura-light/icons/solid.svg diff --git a/resources/themes/cura/icons/sparse.svg b/resources/themes/cura-light/icons/sparse.svg similarity index 100% rename from resources/themes/cura/icons/sparse.svg rename to resources/themes/cura-light/icons/sparse.svg diff --git a/resources/themes/cura/icons/star.svg b/resources/themes/cura-light/icons/star.svg similarity index 100% rename from resources/themes/cura/icons/star.svg rename to resources/themes/cura-light/icons/star.svg diff --git a/resources/themes/cura/icons/tab_monitor.svg b/resources/themes/cura-light/icons/tab_monitor.svg similarity index 100% rename from resources/themes/cura/icons/tab_monitor.svg rename to resources/themes/cura-light/icons/tab_monitor.svg diff --git a/resources/themes/cura/icons/tab_settings.svg b/resources/themes/cura-light/icons/tab_settings.svg similarity index 100% rename from resources/themes/cura/icons/tab_settings.svg rename to resources/themes/cura-light/icons/tab_settings.svg diff --git a/resources/themes/cura/icons/tab_status_busy.svg b/resources/themes/cura-light/icons/tab_status_busy.svg similarity index 100% rename from resources/themes/cura/icons/tab_status_busy.svg rename to resources/themes/cura-light/icons/tab_status_busy.svg diff --git a/resources/themes/cura/icons/tab_status_connected.svg b/resources/themes/cura-light/icons/tab_status_connected.svg similarity index 100% rename from resources/themes/cura/icons/tab_status_connected.svg rename to resources/themes/cura-light/icons/tab_status_connected.svg diff --git a/resources/themes/cura/icons/tab_status_paused.svg b/resources/themes/cura-light/icons/tab_status_paused.svg similarity index 100% rename from resources/themes/cura/icons/tab_status_paused.svg rename to resources/themes/cura-light/icons/tab_status_paused.svg diff --git a/resources/themes/cura/icons/tab_status_stopped.svg b/resources/themes/cura-light/icons/tab_status_stopped.svg similarity index 100% rename from resources/themes/cura/icons/tab_status_stopped.svg rename to resources/themes/cura-light/icons/tab_status_stopped.svg diff --git a/resources/themes/cura/icons/tab_status_unknown.svg b/resources/themes/cura-light/icons/tab_status_unknown.svg similarity index 100% rename from resources/themes/cura/icons/tab_status_unknown.svg rename to resources/themes/cura-light/icons/tab_status_unknown.svg diff --git a/resources/themes/cura/icons/translate.svg b/resources/themes/cura-light/icons/translate.svg similarity index 100% rename from resources/themes/cura/icons/translate.svg rename to resources/themes/cura-light/icons/translate.svg diff --git a/resources/themes/cura/icons/ulti.svg b/resources/themes/cura-light/icons/ulti.svg similarity index 100% rename from resources/themes/cura/icons/ulti.svg rename to resources/themes/cura-light/icons/ulti.svg diff --git a/resources/themes/cura/icons/view_layer.svg b/resources/themes/cura-light/icons/view_layer.svg similarity index 100% rename from resources/themes/cura/icons/view_layer.svg rename to resources/themes/cura-light/icons/view_layer.svg diff --git a/resources/themes/cura/icons/view_normal.svg b/resources/themes/cura-light/icons/view_normal.svg similarity index 100% rename from resources/themes/cura/icons/view_normal.svg rename to resources/themes/cura-light/icons/view_normal.svg diff --git a/resources/themes/cura/icons/view_xray.svg b/resources/themes/cura-light/icons/view_xray.svg similarity index 100% rename from resources/themes/cura/icons/view_xray.svg rename to resources/themes/cura-light/icons/view_xray.svg diff --git a/resources/themes/cura/icons/viewmode.svg b/resources/themes/cura-light/icons/viewmode.svg similarity index 100% rename from resources/themes/cura/icons/viewmode.svg rename to resources/themes/cura-light/icons/viewmode.svg diff --git a/resources/themes/cura/icons/warning.svg b/resources/themes/cura-light/icons/warning.svg similarity index 100% rename from resources/themes/cura/icons/warning.svg rename to resources/themes/cura-light/icons/warning.svg diff --git a/resources/themes/cura/images/logo.svg b/resources/themes/cura-light/images/logo.svg similarity index 100% rename from resources/themes/cura/images/logo.svg rename to resources/themes/cura-light/images/logo.svg diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura-light/styles.qml similarity index 100% rename from resources/themes/cura/styles.qml rename to resources/themes/cura-light/styles.qml diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json new file mode 100644 index 0000000000..c72eeb95d0 --- /dev/null +++ b/resources/themes/cura-light/theme.json @@ -0,0 +1,344 @@ +{ + "metadata": { + "name": "Light" + }, + + "fonts": { + "large": { + "size": 1.25, + "bold": true, + "family": "Open Sans" + }, + "default": { + "size": 1.15, + "family": "Open Sans" + }, + "default_bold": { + "size": 1.15, + "bold": true, + "family": "Open Sans" + }, + "default_italic": { + "size": 1.15, + "italic": true, + "family": "Open Sans" + }, + "small": { + "size": 1.0, + "bold": true, + "family": "Open Sans" + }, + "very_small": { + "size": 1.0, + "family": "Open Sans" + }, + "button_tooltip": { + "size": 1.0, + "family": "Open Sans" + }, + "setting_category": { + "size": 1.15, + "bold": true, + "family": "Open Sans" + }, + "action_button": { + "size": 1.15, + "bold": true, + "family": "Open Sans" + } + }, + + "colors": { + "sidebar": [255, 255, 255, 255], + "lining": [127, 127, 127, 255], + "viewport_overlay": [24, 41, 77, 255], + + "primary": [12, 169, 227, 255], + "primary_hover": [48, 182, 231, 255], + "primary_text": [255, 255, 255, 255], + "border": [127, 127, 127, 255], + "secondary": [245, 245, 245, 255], + + "text": [24, 41, 77, 255], + "text_detail": [174, 174, 174, 128], + "text_link": [12, 169, 227, 255], + "text_inactive": [174, 174, 174, 255], + "text_hover": [70, 84, 113, 255], + "text_pressed": [12, 169, 227, 255], + "text_reversed": [255, 255, 255, 255], + "text_subtext": [70, 84, 113, 255], + + "error": [255, 140, 0, 255], + "sidebar_header_bar": [24, 41, 77, 255], + "sidebar_header_active": [70, 84, 113, 255], + "sidebar_header_hover": [24, 41, 77, 255], + "sidebar_header_highlight": [12, 169, 227, 255], + "sidebar_header_highlight_hover": [255, 255, 255, 255], + "sidebar_lining": [245, 245, 245, 255], + + "button": [24, 41, 77, 255], + "button_hover": [70, 84, 113, 255], + "button_active": [32, 166, 219, 255], + "button_active_hover": [12, 169, 227, 255], + "button_text": [255, 255, 255, 255], + "button_disabled": [24, 41, 77, 255], + "button_disabled_text": [70, 84, 113, 255], + + "button_tooltip": [255, 255, 255, 255], + "button_tooltip_border": [24, 41, 77, 255], + "button_tooltip_text": [24, 41, 77, 255], + + "toggle_checked": [24, 41, 77, 255], + "toggle_checked_border": [24, 41, 77, 255], + "toggle_checked_text": [255, 255, 255, 255], + "toggle_unchecked": [255, 255, 255, 255], + "toggle_unchecked_border": [127, 127, 127, 255], + "toggle_unchecked_text": [24, 41, 77, 255], + "toggle_hovered": [255, 255, 255, 255], + "toggle_hovered_border": [32, 166, 219, 255], + "toggle_hovered_text": [24, 41, 77, 255], + "toggle_active": [32, 166, 219, 255], + "toggle_active_border": [32, 166, 219, 255], + "toggle_active_text": [24, 41, 77, 255], + + "tab_checked": [255, 255, 255, 255], + "tab_checked_border": [255, 255, 255, 255], + "tab_checked_text": [24, 41, 77, 255], + "tab_unchecked": [245, 245, 245, 255], + "tab_unchecked_border": [245, 245, 245, 255], + "tab_unchecked_text": [127, 127, 127, 255], + "tab_hovered": [245, 245, 245, 255], + "tab_hovered_border": [245, 245, 245, 255], + "tab_hovered_text": [32, 166, 219, 255], + "tab_active": [255, 255, 255, 255], + "tab_active_border": [255, 255, 255, 255], + "tab_active_text": [24, 41, 77, 255], + "tab_background": [245, 245, 245, 255], + + "action_button": [255, 255, 255, 255], + "action_button_text": [24, 41, 77, 255], + "action_button_border": [127, 127, 127, 255], + "action_button_hovered": [255, 255, 255, 255], + "action_button_hovered_text": [24, 41, 77, 255], + "action_button_hovered_border": [12, 169, 227, 255], + "action_button_active": [12, 169, 227, 255], + "action_button_active_text": [255, 255, 255, 255], + "action_button_active_border": [12, 169, 227, 255], + "action_button_disabled": [245, 245, 245, 255], + "action_button_disabled_text": [127, 127, 127, 255], + "action_button_disabled_border": [245, 245, 245, 255], + + "scrollbar_background": [255, 255, 255, 255], + "scrollbar_handle": [24, 41, 77, 255], + "scrollbar_handle_hover": [12, 159, 227, 255], + "scrollbar_handle_down": [12, 159, 227, 255], + + "setting_category": [245, 245, 245, 255], + "setting_category_disabled": [255, 255, 255, 255], + "setting_category_hover": [245, 245, 245, 255], + "setting_category_active": [245, 245, 245, 255], + "setting_category_active_hover": [245, 245, 245, 255], + "setting_category_text": [24, 41, 77, 255], + "setting_category_border": [245, 245, 245, 255], + "setting_category_disabled_border": [245, 245, 245, 255], + "setting_category_hover_border": [12, 159, 227, 255], + "setting_category_active_border": [245, 245, 245, 255], + "setting_category_active_hover_border": [12, 159, 227, 255], + + "setting_control": [255, 255, 255, 255], + "setting_control_selected": [24, 41, 77, 255], + "setting_control_highlight": [255, 255, 255, 0], + "setting_control_border": [127, 127, 127, 255], + "setting_control_border_highlight": [12, 169, 227, 255], + "setting_control_text": [24, 41, 77, 255], + "setting_control_depth_line": [127, 127, 127, 255], + "setting_control_button": [127, 127, 127, 255], + "setting_control_button_hover": [70, 84, 113, 255], + "setting_control_disabled": [245, 245, 245, 255], + "setting_control_disabled_text": [127, 127, 127, 255], + "setting_control_disabled_border": [127, 127, 127, 255], + "setting_unit": [127, 127, 127, 255], + "setting_validation_error": [255, 57, 14, 255], + "setting_validation_warning": [255, 186, 15, 255], + "setting_validation_ok": [255, 255, 255, 255], + + "progressbar_background": [245, 245, 245, 255], + "progressbar_control": [24, 41, 77, 255], + + "slider_groove": [245, 245, 245, 255], + "slider_groove_border": [127, 127, 127, 255], + "slider_groove_fill": [127, 127, 127, 255], + "slider_handle": [32, 166, 219, 255], + "slider_handle_hover": [77, 182, 226, 255], + "slider_text_background": [255, 255, 255, 255], + + "checkbox": [255, 255, 255, 255], + "checkbox_hover": [255, 255, 255, 255], + "checkbox_border": [127, 127, 127, 255], + "checkbox_border_hover": [12, 169, 227, 255], + "checkbox_mark": [24, 41, 77, 255], + "checkbox_text": [24, 41, 77, 255], + + "mode_switch": [255, 255, 255, 255], + "mode_switch_hover": [255, 255, 255, 255], + "mode_switch_border": [127, 127, 127, 255], + "mode_switch_border_hover": [12, 169, 227, 255], + "mode_switch_handle": [24, 41, 77, 255], + "mode_switch_text": [24, 41, 77, 255], + "mode_switch_text_hover": [24, 41, 77, 255], + "mode_switch_text_checked": [12, 169, 227, 255], + + "tooltip": [12, 169, 227, 255], + "tooltip_text": [255, 255, 255, 255], + + "message_background": [24, 41, 77, 255], + "message_text": [255, 255, 255, 255], + "message_border": [24, 41, 77, 255], + "message_button": [255, 255, 255, 255], + "message_button_hover": [12, 169, 227, 255], + "message_button_active": [32, 166, 219, 255], + "message_button_text": [24, 41, 77, 255], + "message_button_text_hover": [255, 255, 255, 255], + "message_button_text_active": [255, 255, 255, 255], + "message_progressbar_background": [255, 255, 255, 255], + "message_progressbar_control": [12, 169, 227, 255], + + "tool_panel_background": [255, 255, 255, 255], + + "status_offline": [0, 0, 0, 255], + "status_ready": [0, 205, 0, 255], + "status_busy": [12, 169, 227, 255], + "status_paused": [255, 140, 0, 255], + "status_stopped": [236, 82, 80, 255], + "status_unknown": [127, 127, 127, 255], + + "disabled_axis": [127, 127, 127, 255], + "x_axis": [255, 0, 0, 255], + "y_axis": [0, 0, 255, 255], + "z_axis": [0, 255, 0, 255], + "all_axis": [255, 255, 255, 255], + + "viewport_background": [245, 245, 245, 255], + "volume_outline": [12, 169, 227, 255], + "buildplate": [244, 244, 244, 255], + "buildplate_alt": [204, 204, 204, 255], + "buildplate_grid": [129, 131, 134, 255], + "buildplate_grid_minor": [129, 131, 134, 31], + + "convex_hull": [35, 35, 35, 127], + "disallowed_area": [0, 0, 0, 40], + "error_area": [255, 0, 0, 127], + + "model_default": [255, 201, 36, 255], + "model_overhang": [255, 0, 0, 255], + "model_unslicable": [122, 122, 122, 255], + "model_unslicable_alt": [172, 172, 127, 255], + "model_selection_outline": [12, 169, 227, 255], + + "xray": [26, 26, 62, 255], + "xray_error": [255, 0, 0, 255], + + "layerview_ghost": [32, 32, 32, 96], + "layerview_none": [255, 255, 255, 255], + "layerview_inset_0": [255, 0, 0, 255], + "layerview_inset_x": [0, 255, 0, 255], + "layerview_skin": [255, 255, 0, 255], + "layerview_support": [0, 255, 255, 255], + "layerview_skirt": [0, 255, 255, 255], + "layerview_infill": [255, 192, 0, 255], + "layerview_support_infill": [0, 255, 255, 255], + "layerview_move_combing": [0, 0, 255, 255], + "layerview_move_retraction": [128, 128, 255, 255], + "layerview_support_interface": [64, 192, 255, 255] + }, + + "sizes": { + "window_minimum_size": [70, 50], + "window_margin": [1.0, 1.0], + "default_margin": [1.0, 1.0], + "default_lining": [0.08, 0.08], + "default_arrow": [0.8, 0.8], + "logo": [9.5, 2.0], + + "sidebar": [35.0, 10.0], + "sidebar_margin": [1.71, 0.71], + "sidebar_margin_thin": [0.71, 0.71], + "sidebar_header": [0.0, 4.0], + "sidebar_header_highlight": [0.25, 0.25], + "sidebar_header_mode_toggle": [0.0, 2.0], + "sidebar_header_mode_tabs": [0.0, 3.0], + "sidebar_lining": [0.5, 0.5], + "sidebar_lining_thin": [0.2, 0.2], + "sidebar_setup": [0.0, 2.0], + "sidebar_tabs": [0.0, 3.5], + "sidebar_inputfields": [0.0, 2.0], + "sidebar_extruder_box": [0.0, 6.0], + "simple_mode_infill_caption": [0.0, 5.0], + "simple_mode_infill_height": [0.0, 8.0], + + "section": [0.0, 2.00], + "section_icon": [1.6, 1.6], + "section_icon_column": [2.8, 0.0], + + "setting": [25.0, 1.8], + "setting_control": [10.0, 2.0], + "setting_control_depth_margin": [1.4, 0.0], + "setting_preferences_button_margin": [4, 0.0], + "setting_control_margin": [0.0, 0.0], + "setting_unit_margin": [0.5, 0.5], + "setting_text_maxwidth": [40.0, 0.0], + + "standard_list_lineheight": [1.5, 1.5], + "standard_list_input": [20.0, 25.0], + "standard_arrow": [0.8, 0.8], + + "button": [4, 4], + "button_icon": [2.5, 2.5], + "button_lining": [0, 0], + + "topbar_button": [17, 4], + "topbar_button_icon": [3.125, 2.5], + + "button_tooltip": [1.0, 1.3], + "button_tooltip_arrow": [0.25, 0.25], + + "progressbar": [26.0, 0.8], + "progressbar_radius": [0.4, 0.4], + "progressbar_control": [8.0, 0.8], + + "scrollbar": [0.75, 0.5], + + "slider_groove": [0.5, 0.5], + "slider_handle": [1.5, 1.5], + "slider_layerview_size": [1.0, 22.0], + "slider_layerview_background": [4.0, 0.0], + "slider_layerview_margin": [1.0, 1.0], + + "layerview_menu_size": [16.5, 21.0], + "layerview_menu_size_compatibility": [22, 23.0], + "layerview_legend_size": [1.0, 1.0], + "layerview_row": [11.0, 1.5], + "layerview_row_spacing": [0.0, 0.5], + + "checkbox": [2.0, 2.0], + + "tooltip": [20.0, 10.0], + "tooltip_margins": [1.0, 1.0], + "tooltip_arrow_margins": [2.0, 2.0], + + "save_button_text_margin": [0.3, 0.6], + "save_button_save_to_button": [0.3, 2.7], + "save_button_specs_icons": [1.4, 1.4], + + "modal_window_minimum": [60.0, 45], + "wizard_progress": [10.0, 0.0], + + "message": [30.0, 5.0], + "message_close": [1.25, 1.25], + "message_button": [6.0, 1.8], + + "infill_button_margin": [0.5, 0.5], + + "jobspecs_line": [2.0, 2.0] + } +} diff --git a/resources/themes/cura/theme.json b/resources/themes/cura/theme.json index 09acd7d7bd..1a8711e3ae 100644 --- a/resources/themes/cura/theme.json +++ b/resources/themes/cura/theme.json @@ -1,50 +1,7 @@ { "metadata": { - "name": "Ultimaker" - }, - "fonts": { - "large": { - "size": 1.25, - "bold": true, - "family": "Open Sans" - }, - "default": { - "size": 1.15, - "family": "Open Sans" - }, - "default_bold": { - "size": 1.15, - "bold": true, - "family": "Open Sans" - }, - "default_italic": { - "size": 1.15, - "italic": true, - "family": "Open Sans" - }, - "small": { - "size": 1.0, - "bold": true, - "family": "Open Sans" - }, - "very_small": { - "size": 1.0, - "family": "Open Sans" - }, - "button_tooltip": { - "size": 1.0, - "family": "Open Sans" - }, - "setting_category": { - "size": 1.15, - "bold": true, - "family": "Open Sans" - }, - "action_button": { - "size": 1.15, - "bold": true, - "family": "Open Sans" - } + "name": "Ultimaker", + "inherits": "cura-light" }, "colors": { @@ -242,95 +199,5 @@ "layerview_move_combing": [0, 0, 255, 255], "layerview_move_retraction": [128, 128, 255, 255], "layerview_support_interface": [64, 192, 255, 255] - }, - - "sizes": { - "window_minimum_size": [70, 50], - "window_margin": [1.0, 1.0], - "default_margin": [1.0, 1.0], - "default_lining": [0.08, 0.08], - "default_arrow": [0.8, 0.8], - "logo": [9.5, 2.0], - - "sidebar": [35.0, 10.0], - "sidebar_margin": [1.71, 0.71], - "sidebar_margin_thin": [0.71, 0.71], - "sidebar_header": [0.0, 4.0], - "sidebar_header_highlight": [0.25, 0.25], - "sidebar_header_mode_toggle": [0.0, 2.0], - "sidebar_header_mode_tabs": [0.0, 3.0], - "sidebar_lining": [0.5, 0.5], - "sidebar_lining_thin": [0.2, 0.2], - "sidebar_setup": [0.0, 2.0], - "sidebar_tabs": [0.0, 3.5], - "sidebar_inputfields": [0.0, 2.0], - "sidebar_extruder_box": [0.0, 6.0], - "simple_mode_infill_caption": [0.0, 5.0], - "simple_mode_infill_height": [0.0, 8.0], - - "section": [0.0, 2.00], - "section_icon": [1.6, 1.6], - "section_icon_column": [2.8, 0.0], - - "setting": [25.0, 1.8], - "setting_control": [10.0, 2.0], - "setting_control_depth_margin": [1.4, 0.0], - "setting_preferences_button_margin": [4, 0.0], - "setting_control_margin": [0.0, 0.0], - "setting_unit_margin": [0.5, 0.5], - "setting_text_maxwidth": [40.0, 0.0], - - "standard_list_lineheight": [1.5, 1.5], - "standard_list_input": [20.0, 25.0], - "standard_arrow": [0.8, 0.8], - - "button": [4, 4], - "button_icon": [2.5, 2.5], - "button_lining": [0, 0], - - "topbar_button": [17, 4], - "topbar_button_icon": [3.125, 2.5], - - "button_tooltip": [1.0, 1.3], - "button_tooltip_arrow": [0.25, 0.25], - - "progressbar": [26.0, 0.8], - "progressbar_radius": [0.4, 0.4], - "progressbar_control": [8.0, 0.8], - - "scrollbar": [0.75, 0.5], - - "slider_groove": [0.5, 0.5], - "slider_handle": [1.5, 1.5], - "slider_layerview_size": [1.0, 22.0], - "slider_layerview_background": [4.0, 0.0], - "slider_layerview_margin": [1.0, 1.0], - - "layerview_menu_size": [16.5, 21.0], - "layerview_menu_size_compatibility": [22, 23.0], - "layerview_legend_size": [1.0, 1.0], - "layerview_row": [11.0, 1.5], - "layerview_row_spacing": [0.0, 0.5], - - "checkbox": [2.0, 2.0], - - "tooltip": [20.0, 10.0], - "tooltip_margins": [1.0, 1.0], - "tooltip_arrow_margins": [2.0, 2.0], - - "save_button_text_margin": [0.3, 0.6], - "save_button_save_to_button": [0.3, 2.7], - "save_button_specs_icons": [1.4, 1.4], - - "modal_window_minimum": [60.0, 45], - "wizard_progress": [10.0, 0.0], - - "message": [30.0, 5.0], - "message_close": [1.25, 1.25], - "message_button": [6.0, 1.8], - - "infill_button_margin": [0.5, 0.5], - - "jobspecs_line": [2.0, 2.0] } } From f30146498748c72177a29058d783a77a25fbbd44 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 29 Aug 2017 15:02:27 +0200 Subject: [PATCH 54/74] Update missing colours And colours that have to change because the behaviour was changed (such as opacities now being themeable. Contributes to issue CURA-4148. --- resources/themes/cura-light/theme.json | 39 +++++++++++++------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index c72eeb95d0..bf48e256e2 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -51,7 +51,7 @@ "colors": { "sidebar": [255, 255, 255, 255], "lining": [127, 127, 127, 255], - "viewport_overlay": [24, 41, 77, 255], + "viewport_overlay": [24, 41, 77, 192], "primary": [12, 169, 227, 255], "primary_hover": [48, 182, 231, 255], @@ -65,8 +65,10 @@ "text_inactive": [174, 174, 174, 255], "text_hover": [70, 84, 113, 255], "text_pressed": [12, 169, 227, 255], - "text_reversed": [255, 255, 255, 255], "text_subtext": [70, 84, 113, 255], + "text_emphasis": [255, 255, 255, 255], + "text_scene": [24, 41, 77, 255], + "text_scene_hover": [70, 84, 113, 255], "error": [255, 140, 0, 255], "sidebar_header_bar": [24, 41, 77, 255], @@ -74,6 +76,9 @@ "sidebar_header_hover": [24, 41, 77, 255], "sidebar_header_highlight": [12, 169, 227, 255], "sidebar_header_highlight_hover": [255, 255, 255, 255], + "sidebar_header_text_inactive": [255, 255, 255, 255], + "sidebar_header_text_active": [255, 255, 255, 255], + "sidebar_header_text_hover": [255, 255, 255, 255], "sidebar_lining": [245, 245, 245, 255], "button": [24, 41, 77, 255], @@ -81,26 +86,16 @@ "button_active": [32, 166, 219, 255], "button_active_hover": [12, 169, 227, 255], "button_text": [255, 255, 255, 255], + "button_text_hover": [255, 255, 255, 255], + "button_text_active": [255, 255, 255, 255], + "button_text_active_hover": [255, 255, 255, 255], "button_disabled": [24, 41, 77, 255], - "button_disabled_text": [70, 84, 113, 255], + "button_disabled_text": [70, 84, 113, 51], - "button_tooltip": [255, 255, 255, 255], + "button_tooltip": [12, 169, 227, 255], "button_tooltip_border": [24, 41, 77, 255], "button_tooltip_text": [24, 41, 77, 255], - "toggle_checked": [24, 41, 77, 255], - "toggle_checked_border": [24, 41, 77, 255], - "toggle_checked_text": [255, 255, 255, 255], - "toggle_unchecked": [255, 255, 255, 255], - "toggle_unchecked_border": [127, 127, 127, 255], - "toggle_unchecked_text": [24, 41, 77, 255], - "toggle_hovered": [255, 255, 255, 255], - "toggle_hovered_border": [32, 166, 219, 255], - "toggle_hovered_text": [24, 41, 77, 255], - "toggle_active": [32, 166, 219, 255], - "toggle_active_border": [32, 166, 219, 255], - "toggle_active_text": [24, 41, 77, 255], - "tab_checked": [255, 255, 255, 255], "tab_checked_border": [255, 255, 255, 255], "tab_checked_text": [24, 41, 77, 255], @@ -139,6 +134,10 @@ "setting_category_active": [245, 245, 245, 255], "setting_category_active_hover": [245, 245, 245, 255], "setting_category_text": [24, 41, 77, 255], + "setting_category_disabled_text": [24, 41, 77, 101], + "setting_category_hover_text": [24, 41, 77, 255], + "setting_category_active_text": [24, 41, 77, 255], + "setting_category_active_hover_text": [24, 41, 77, 255], "setting_category_border": [245, 245, 245, 255], "setting_category_disabled_border": [245, 245, 245, 255], "setting_category_hover_border": [12, 159, 227, 255], @@ -158,8 +157,10 @@ "setting_control_disabled_text": [127, 127, 127, 255], "setting_control_disabled_border": [127, 127, 127, 255], "setting_unit": [127, 127, 127, 255], - "setting_validation_error": [255, 57, 14, 255], - "setting_validation_warning": [255, 186, 15, 255], + "setting_validation_error_background": [255, 57, 14, 255], + "setting_validation_error": [127, 127, 127, 255], + "setting_validation_warning_background": [255, 186, 15, 255], + "setting_validation_warning": [127, 127, 127, 255], "setting_validation_ok": [255, 255, 255, 255], "progressbar_background": [245, 245, 245, 255], From d4e5e10825f054ab7c193bc0556cb878a64ae1d4 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 29 Aug 2017 15:13:08 +0200 Subject: [PATCH 55/74] Restore vertical margins We weren't allowed to change that yet. Contributes to issue CURA-4148. --- resources/themes/cura-light/theme.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index bf48e256e2..9263b8a495 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -262,7 +262,7 @@ "logo": [9.5, 2.0], "sidebar": [35.0, 10.0], - "sidebar_margin": [1.71, 0.71], + "sidebar_margin": [1.71, 1.43], "sidebar_margin_thin": [0.71, 0.71], "sidebar_header": [0.0, 4.0], "sidebar_header_highlight": [0.25, 0.25], @@ -277,7 +277,7 @@ "simple_mode_infill_caption": [0.0, 5.0], "simple_mode_infill_height": [0.0, 8.0], - "section": [0.0, 2.00], + "section": [0.0, 2.86], "section_icon": [1.6, 1.6], "section_icon_column": [2.8, 0.0], From b677a81d9bf5e46383b5a569c0d459b068de1136 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 29 Aug 2017 15:55:07 +0200 Subject: [PATCH 56/74] Change default theme This new field is now read by Uranium that indicates the default theme to load first before there are any changed preferences. Contributes to issue CURA-4148. --- cura/CuraApplication.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 3c1497f214..1b7dafd53d 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -205,6 +205,8 @@ class CuraApplication(QtApplication): super().__init__(name = "cura", version = CuraVersion, buildtype = CuraBuildType, tray_icon_name = "cura-icon-32.png") + self.default_theme = "cura-light" + self.setWindowIcon(QIcon(Resources.getPath(Resources.Images, "cura-icon.png"))) self.setRequiredPlugins([ From c0f7d6aa190465c9e19c410d2923bae78d0d024b Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 29 Aug 2017 16:15:32 +0200 Subject: [PATCH 57/74] Copy Cura logo from Light theme We're going to keep this dark theme with the white Cura logo but modify the Light themed one to have a black logo. Contributes to issue CURA-4148. --- resources/themes/cura/images/logo.svg | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 resources/themes/cura/images/logo.svg diff --git a/resources/themes/cura/images/logo.svg b/resources/themes/cura/images/logo.svg new file mode 100644 index 0000000000..545b42d193 --- /dev/null +++ b/resources/themes/cura/images/logo.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file From a60cf07844b77b6d1d9d33f84705e7f167292381 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 29 Aug 2017 16:16:24 +0200 Subject: [PATCH 58/74] Use black logo for light theme It's black on white instead of white on black. Contributes to issue CURA-4148. --- resources/themes/cura-light/images/logo.svg | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/themes/cura-light/images/logo.svg b/resources/themes/cura-light/images/logo.svg index 545b42d193..9a3dbdd6bd 100644 --- a/resources/themes/cura-light/images/logo.svg +++ b/resources/themes/cura-light/images/logo.svg @@ -1,8 +1,8 @@ - - - - + + + + \ No newline at end of file From 99cae1469eb4eae2ef3df960ea2d6d74c201e2dc Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 29 Aug 2017 17:16:02 +0200 Subject: [PATCH 59/74] Copy status icons to dark theme We want the dark theme to use these icons, but we want to update these icons for the light theme so I'm back-upping the icons for the dark theme. Contributes to issue CURA-4148. --- resources/themes/cura/icons/tab_status_busy.svg | 9 +++++++++ resources/themes/cura/icons/tab_status_connected.svg | 7 +++++++ resources/themes/cura/icons/tab_status_paused.svg | 8 ++++++++ resources/themes/cura/icons/tab_status_stopped.svg | 8 ++++++++ resources/themes/cura/icons/tab_status_unknown.svg | 8 ++++++++ 5 files changed, 40 insertions(+) create mode 100644 resources/themes/cura/icons/tab_status_busy.svg create mode 100644 resources/themes/cura/icons/tab_status_connected.svg create mode 100644 resources/themes/cura/icons/tab_status_paused.svg create mode 100644 resources/themes/cura/icons/tab_status_stopped.svg create mode 100644 resources/themes/cura/icons/tab_status_unknown.svg diff --git a/resources/themes/cura/icons/tab_status_busy.svg b/resources/themes/cura/icons/tab_status_busy.svg new file mode 100644 index 0000000000..7b5774e71b --- /dev/null +++ b/resources/themes/cura/icons/tab_status_busy.svg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/resources/themes/cura/icons/tab_status_connected.svg b/resources/themes/cura/icons/tab_status_connected.svg new file mode 100644 index 0000000000..7997ffbee6 --- /dev/null +++ b/resources/themes/cura/icons/tab_status_connected.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/resources/themes/cura/icons/tab_status_paused.svg b/resources/themes/cura/icons/tab_status_paused.svg new file mode 100644 index 0000000000..606d4cb96c --- /dev/null +++ b/resources/themes/cura/icons/tab_status_paused.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/resources/themes/cura/icons/tab_status_stopped.svg b/resources/themes/cura/icons/tab_status_stopped.svg new file mode 100644 index 0000000000..6cd0f18b17 --- /dev/null +++ b/resources/themes/cura/icons/tab_status_stopped.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/resources/themes/cura/icons/tab_status_unknown.svg b/resources/themes/cura/icons/tab_status_unknown.svg new file mode 100644 index 0000000000..5e46eec55b --- /dev/null +++ b/resources/themes/cura/icons/tab_status_unknown.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file From 5b36869b32277fa0ee95256cd0b2a77af1c6299c Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 29 Aug 2017 17:22:40 +0200 Subject: [PATCH 60/74] Update background colour of status icons This outline needs to be the same colour as the background of the top bar. Contributes to issue CURA-4148. --- resources/themes/cura-light/icons/tab_status_busy.svg | 2 +- resources/themes/cura-light/icons/tab_status_connected.svg | 2 +- resources/themes/cura-light/icons/tab_status_paused.svg | 2 +- resources/themes/cura-light/icons/tab_status_stopped.svg | 2 +- resources/themes/cura-light/icons/tab_status_unknown.svg | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/themes/cura-light/icons/tab_status_busy.svg b/resources/themes/cura-light/icons/tab_status_busy.svg index 7b5774e71b..cf8e384d88 100644 --- a/resources/themes/cura-light/icons/tab_status_busy.svg +++ b/resources/themes/cura-light/icons/tab_status_busy.svg @@ -1,7 +1,7 @@ - + diff --git a/resources/themes/cura-light/icons/tab_status_connected.svg b/resources/themes/cura-light/icons/tab_status_connected.svg index 7997ffbee6..56aecdf0a7 100644 --- a/resources/themes/cura-light/icons/tab_status_connected.svg +++ b/resources/themes/cura-light/icons/tab_status_connected.svg @@ -1,7 +1,7 @@ - + \ No newline at end of file diff --git a/resources/themes/cura-light/icons/tab_status_paused.svg b/resources/themes/cura-light/icons/tab_status_paused.svg index 606d4cb96c..0ec744ad86 100644 --- a/resources/themes/cura-light/icons/tab_status_paused.svg +++ b/resources/themes/cura-light/icons/tab_status_paused.svg @@ -1,7 +1,7 @@ - + diff --git a/resources/themes/cura-light/icons/tab_status_stopped.svg b/resources/themes/cura-light/icons/tab_status_stopped.svg index 6cd0f18b17..ec1afaec81 100644 --- a/resources/themes/cura-light/icons/tab_status_stopped.svg +++ b/resources/themes/cura-light/icons/tab_status_stopped.svg @@ -1,7 +1,7 @@ - + diff --git a/resources/themes/cura-light/icons/tab_status_unknown.svg b/resources/themes/cura-light/icons/tab_status_unknown.svg index 5e46eec55b..382a2b2d8b 100644 --- a/resources/themes/cura-light/icons/tab_status_unknown.svg +++ b/resources/themes/cura-light/icons/tab_status_unknown.svg @@ -1,7 +1,7 @@ - + From d929359d77df186f49e94ee6094101ead6848cd7 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 30 Aug 2017 13:49:27 +0200 Subject: [PATCH 61/74] Implement version upgrade 2.7 to 3.0 The theme 'cura' was renamed to 'cura-light', so that needs to be updated in the user's preferences. Contributes to issue CURA-4148. --- .../VersionUpgrade27to30.py | 56 +++++++++++++++++++ .../VersionUpgrade27to30/__init__.py | 23 ++++++++ .../VersionUpgrade27to30/plugin.json | 8 +++ 3 files changed, 87 insertions(+) create mode 100644 plugins/VersionUpgrade/VersionUpgrade27to30/VersionUpgrade27to30.py create mode 100644 plugins/VersionUpgrade/VersionUpgrade27to30/__init__.py create mode 100644 plugins/VersionUpgrade/VersionUpgrade27to30/plugin.json diff --git a/plugins/VersionUpgrade/VersionUpgrade27to30/VersionUpgrade27to30.py b/plugins/VersionUpgrade/VersionUpgrade27to30/VersionUpgrade27to30.py new file mode 100644 index 0000000000..a6e541be6d --- /dev/null +++ b/plugins/VersionUpgrade/VersionUpgrade27to30/VersionUpgrade27to30.py @@ -0,0 +1,56 @@ +# Copyright (c) 2017 Ultimaker B.V. +# Cura is released under the terms of the AGPLv3 or higher. + +import configparser #To parse preference files. +import io #To serialise the preference files afterwards. + +from UM.VersionUpgrade import VersionUpgrade #We're inheriting from this. + +_renamed_themes = { + "cura": "cura-light" +} + +class VersionUpgrade27to30(VersionUpgrade): + ## Gets the version number from a CFG file in Uranium's 2.7 format. + # + # Since the format may change, this is implemented for the 2.7 format only + # and needs to be included in the version upgrade system rather than + # globally in Uranium. + # + # \param serialised The serialised form of a CFG file. + # \return The version number stored in the CFG file. + # \raises ValueError The format of the version number in the file is + # incorrect. + # \raises KeyError The format of the file is incorrect. + def getCfgVersion(self, serialised): + parser = configparser.ConfigParser(interpolation = None) + parser.read_string(serialised) + format_version = int(parser.get("general", "version")) #Explicitly give an exception when this fails. That means that the file format is not recognised. + setting_version = int(parser.get("metadata", "setting_version", fallback = 0)) + return format_version * 1000000 + setting_version + + ## Upgrades a preferences file from version 2.7 to 3.0. + # + # \param serialised The serialised form of a preferences file. + # \param filename The name of the file to upgrade. + def upgradePreferences(self, serialised, filename): + parser = configparser.ConfigParser(interpolation=None) + parser.read_string(serialised) + + # Update version numbers + if "general" not in parser: + parser["general"] = {} + parser["general"]["version"] = "5" + if "metadata" not in parser: + parser["metadata"] = {} + parser["metadata"]["setting_version"] = "2" + + #Renamed themes. + if "theme" in parser["general"]: + if parser["general"]["theme"] in _renamed_themes: + parser["general"]["theme"] = _renamed_themes[parser["general"]["theme"]] + + # Re-serialise the file. + output = io.StringIO() + parser.write(output) + return [filename], [output.getvalue()] \ No newline at end of file diff --git a/plugins/VersionUpgrade/VersionUpgrade27to30/__init__.py b/plugins/VersionUpgrade/VersionUpgrade27to30/__init__.py new file mode 100644 index 0000000000..73e1246360 --- /dev/null +++ b/plugins/VersionUpgrade/VersionUpgrade27to30/__init__.py @@ -0,0 +1,23 @@ +# Copyright (c) 2017 Ultimaker B.V. +# Cura is released under the terms of the AGPLv3 or higher. + +from . import VersionUpgrade27to30 + +upgrade = VersionUpgrade27to30.VersionUpgrade27to30() + +def getMetaData(): + return { + "version_upgrade": { + # From To Upgrade function + ("preferences", 4000002): ("preferences", 5000002, upgrade.upgradePreferences), + }, + "sources": { + "preferences": { + "get_version": upgrade.getCfgVersion, + "location": {"."} + }, + } + } + +def register(app): + return { "version_upgrade": upgrade } diff --git a/plugins/VersionUpgrade/VersionUpgrade27to30/plugin.json b/plugins/VersionUpgrade/VersionUpgrade27to30/plugin.json new file mode 100644 index 0000000000..3df84ff7e6 --- /dev/null +++ b/plugins/VersionUpgrade/VersionUpgrade27to30/plugin.json @@ -0,0 +1,8 @@ + { + "name": "Version Upgrade 2.7 to 3.0", + "author": "Ultimaker B.V.", + "version": "1.0.0", + "description": "Upgrades configurations from Cura 2.7 to Cura 3.0.", + "api": 4, + "i18n-catalog": "cura" +} From 831a91afff1de8c16156b44ce469cbee8366b398 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 30 Aug 2017 14:11:43 +0200 Subject: [PATCH 62/74] Add test for upgrading preference file Contributes to issue CURA-4148. --- .../tests/TestVersionUpgrade27to30.py | 171 ++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 plugins/VersionUpgrade/VersionUpgrade27to30/tests/TestVersionUpgrade27to30.py diff --git a/plugins/VersionUpgrade/VersionUpgrade27to30/tests/TestVersionUpgrade27to30.py b/plugins/VersionUpgrade/VersionUpgrade27to30/tests/TestVersionUpgrade27to30.py new file mode 100644 index 0000000000..86127df24f --- /dev/null +++ b/plugins/VersionUpgrade/VersionUpgrade27to30/tests/TestVersionUpgrade27to30.py @@ -0,0 +1,171 @@ +# Copyright (c) 2017 Ultimaker B.V. +# Cura is released under the terms of the AGPLv3 or higher. + +import configparser #To parse the resulting config files. +import pytest #To register tests with. + +import VersionUpgrade27to30 #The module we're testing. + +## Creates an instance of the upgrader to test with. +@pytest.fixture +def upgrader(): + return VersionUpgrade27to30.VersionUpgrade27to30() + +test_cfg_version_good_data = [ + { + "test_name": "Simple", + "file_data": """[general] +version = 1 +""", + "version": 1000000 + }, + { + "test_name": "Other Data Around", + "file_data": """[nonsense] +life = good + +[general] +version = 3 + +[values] +layer_height = 0.12 +infill_sparse_density = 42 +""", + "version": 3000000 + }, + { + "test_name": "Negative Version", #Why not? + "file_data": """[general] +version = -20 +""", + "version": -20000000 + }, + { + "test_name": "Setting Version", + "file_data": """[general] +version = 1 +[metadata] +setting_version = 1 +""", + "version": 1000001 + }, + { + "test_name": "Negative Setting Version", + "file_data": """[general] +version = 1 +[metadata] +setting_version = -3 +""", + "version": 999997 + } +] + +## Tests the technique that gets the version number from CFG files. +# +# \param data The parametrised data to test with. It contains a test name +# to debug with, the serialised contents of a CFG file and the correct +# version number in that CFG file. +# \param upgrader The instance of the upgrade class to test. +@pytest.mark.parametrize("data", test_cfg_version_good_data) +def test_cfgVersionGood(data, upgrader): + version = upgrader.getCfgVersion(data["file_data"]) + assert version == data["version"] + +test_cfg_version_bad_data = [ + { + "test_name": "Empty", + "file_data": "", + "exception": configparser.Error #Explicitly not specified further which specific error we're getting, because that depends on the implementation of configparser. + }, + { + "test_name": "No General", + "file_data": """[values] +layer_height = 0.1337 +""", + "exception": configparser.Error + }, + { + "test_name": "No Version", + "file_data": """[general] +true = false +""", + "exception": configparser.Error + }, + { + "test_name": "Not a Number", + "file_data": """[general] +version = not-a-text-version-number +""", + "exception": ValueError + }, + { + "test_name": "Setting Value NaN", + "file_data": """[general] +version = 4 +[metadata] +setting_version = latest_or_something +""", + "exception": ValueError + }, + { + "test_name": "Major-Minor", + "file_data": """[general] +version = 1.2 +""", + "exception": ValueError + } +] + +## Tests whether getting a version number from bad CFG files gives an +# exception. +# +# \param data The parametrised data to test with. It contains a test name +# to debug with, the serialised contents of a CFG file and the class of +# exception it needs to throw. +# \param upgrader The instance of the upgrader to test. +@pytest.mark.parametrize("data", test_cfg_version_bad_data) +def test_cfgVersionBad(data, upgrader): + with pytest.raises(data["exception"]): + upgrader.getCfgVersion(data["file_data"]) + +test_translate_theme_data = [ + ( + "Original Cura theme", + """[general] +version = 4 +theme = cura +[metadata] +setting_version = 2 +""", + "cura-light" + ), + ( + "No theme", + """[general] +version = 4 +[metadata] +setting_version = 2 +""", + None #Indicates that the theme should be absent in the new file. + ) +] + +## Tests whether the theme is properly translated. +@pytest.mark.parametrize("test_name, file_data, new_theme", test_translate_theme_data) +def test_translateTheme(test_name, file_data, new_theme, upgrader): + #Read old file. + original_parser = configparser.ConfigParser(interpolation = None) + original_parser.read_string(file_data) + + #Perform the upgrade. + _, upgraded_stacks = upgrader.upgradePreferences(file_data, "") + upgraded_stack = upgraded_stacks[0] + parser = configparser.ConfigParser(interpolation = None) + parser.read_string(upgraded_stack) + + #Check whether the theme was properly translated. + if not new_theme: + assert "theme" not in parser["general"] + else: + assert "theme" in parser["general"] + assert parser["general"]["theme"] == new_theme \ No newline at end of file From 95ba4b93687732bd35ea10a3766fed5b8e1fd2a9 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 31 Aug 2017 09:35:27 +0200 Subject: [PATCH 63/74] Link anchors differently Once this is in a scroll view, the width of the parent box isn't fixed any more. We'd have a lot of binding loops. So now this linking is not dependent on the parent width any more but rather on the theme sizes. Contributes to issue CURA-4148. --- resources/qml/SidebarSimple.qml | 402 ++++++++++++++++---------------- 1 file changed, 195 insertions(+), 207 deletions(-) diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index 2f9adfc510..b2d9321f2d 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -23,7 +23,7 @@ Item Component.onCompleted: PrintInformation.enabled = true Component.onDestruction: PrintInformation.enabled = false - UM.I18nCatalog { id: catalog; name:"cura"} + UM.I18nCatalog { id: catalog; name: "cura" } Item { @@ -31,7 +31,7 @@ Item anchors.top: parent.top anchors.left: parent.left anchors.topMargin: UM.Theme.getSize("sidebar_margin").height - width: base.width * .45 - UM.Theme.getSize("sidebar_margin").width + width: UM.Theme.getSize("sidebar").width * .45 - UM.Theme.getSize("sidebar_margin").width height: childrenRect.height Text @@ -53,7 +53,7 @@ Item id: infillCellRight height: childrenRect.height; - width: base.width * .55 + width: UM.Theme.getSize("sidebar").width * .55 spacing: UM.Theme.getSize("sidebar_margin").width @@ -248,239 +248,227 @@ Item } } - Item + Text { - id: helpersCell + id: enableSupportLabel + anchors.left: parent.left + anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width + anchors.verticalCenter: enableSupportCheckBox.verticalCenter + text: catalog.i18nc("@label", "Generate Support"); + font: UM.Theme.getFont("default"); + color: UM.Theme.getColor("text"); + } + + CheckBox + { + id: enableSupportCheckBox + property alias _hovered: enableSupportMouseArea.containsMouse + anchors.top: infillCellRight.bottom anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 2 + anchors.left: infillCellRight.left + anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width + + style: UM.Theme.styles.checkbox; + enabled: base.settingsEnabled + + checked: supportEnabled.properties.value == "True"; + + MouseArea + { + id: enableSupportMouseArea + anchors.fill: parent + hoverEnabled: true + enabled: true + onClicked: + { + // The value is a string "True" or "False" + supportEnabled.setPropertyValue("value", supportEnabled.properties.value != "True"); + } + onEntered: + { + base.showTooltip(enableSupportCheckBox, Qt.point(-enableSupportCheckBox.x, 0), + catalog.i18nc("@label", "Generate structures to support parts of the model which have overhangs. Without these structures, such parts would collapse during printing.")); + } + onExited: + { + base.hideTooltip(); + } + } + } + + Text + { + id: supportExtruderLabel + visible: (supportEnabled.properties.value == "True") && (machineExtruderCount.properties.value > 1) anchors.left: parent.left - anchors.right: parent.right - height: childrenRect.height + anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width + anchors.verticalCenter: supportExtruderCombobox.verticalCenter + text: catalog.i18nc("@label", "Support Extruder"); + font: UM.Theme.getFont("default"); + color: UM.Theme.getColor("text"); + } - Text + ComboBox + { + id: supportExtruderCombobox + visible: (supportEnabled.properties.value == "True") && (machineExtruderCount.properties.value > 1) + model: extruderModel + + property string color_override: "" // for manually setting values + property string color: // is evaluated automatically, but the first time is before extruderModel being filled { - id: enableSupportLabel - anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width - anchors.verticalCenter: enableSupportCheckBox.verticalCenter - width: parent.width * .45 - 3 * UM.Theme.getSize("sidebar_margin").width - text: catalog.i18nc("@label", "Generate Support"); - font: UM.Theme.getFont("default"); - color: UM.Theme.getColor("text"); + var current_extruder = extruderModel.get(currentIndex); + color_override = ""; + if (current_extruder === undefined) { + return ""; + } + var model_color = current_extruder.color; + return (model_color) ? model_color : ""; } - CheckBox + textRole: 'text' // this solves that the combobox isn't populated in the first time Cura is started + + anchors.top: enableSupportCheckBox.bottom + anchors.topMargin: { - id: enableSupportCheckBox - property alias _hovered: enableSupportMouseArea.containsMouse + if ((supportEnabled.properties.value == "True") && (machineExtruderCount.properties.value > 1)) + { + return UM.Theme.getSize("sidebar_margin").height; + } + else + { + return 0; + } + } + anchors.left: infillCellRight.left + anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width + width: UM.Theme.getSize("sidebar").width * .55 + height: + { + if ((supportEnabled.properties.value == "True") && (machineExtruderCount.properties.value > 1)) + { + // default height when control is enabled + return UM.Theme.getSize("setting_control").height; + } + else + { + return 0; + } + } + Behavior on height { NumberAnimation { duration: 100 } } - anchors.top: parent.top - anchors.left: enableSupportLabel.right - anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width + style: UM.Theme.styles.combobox_color + enabled: base.settingsEnabled + property alias _hovered: supportExtruderMouseArea.containsMouse - style: UM.Theme.styles.checkbox; + currentIndex: supportExtruderNr.properties !== null ? parseFloat(supportExtruderNr.properties.value) : 0 + onActivated: + { + // Send the extruder nr as a string. + supportExtruderNr.setPropertyValue("value", String(index)); + } + MouseArea + { + id: supportExtruderMouseArea + anchors.fill: parent + hoverEnabled: true enabled: base.settingsEnabled - - checked: supportEnabled.properties.value == "True"; - - MouseArea + acceptedButtons: Qt.NoButton + onEntered: { - id: enableSupportMouseArea - anchors.fill: parent - hoverEnabled: true - enabled: true - onClicked: - { - // The value is a string "True" or "False" - supportEnabled.setPropertyValue("value", supportEnabled.properties.value != "True"); - } - onEntered: - { - base.showTooltip(enableSupportCheckBox, Qt.point(-enableSupportCheckBox.x, 0), - catalog.i18nc("@label", "Generate structures to support parts of the model which have overhangs. Without these structures, such parts would collapse during printing.")); - } - onExited: - { - base.hideTooltip(); - } + base.showTooltip(supportExtruderCombobox, Qt.point(-supportExtruderCombobox.x, 0), + catalog.i18nc("@label", "Select which extruder to use for support. This will build up supporting structures below the model to prevent the model from sagging or printing in mid air.")); + } + onExited: + { + base.hideTooltip(); } } - Text + function updateCurrentColor() { - id: supportExtruderLabel - visible: (supportEnabled.properties.value == "True") && (machineExtruderCount.properties.value > 1) - anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width - anchors.verticalCenter: supportExtruderCombobox.verticalCenter - width: parent.width * .45 - 3 * UM.Theme.getSize("sidebar_margin").width - text: catalog.i18nc("@label", "Support Extruder"); - font: UM.Theme.getFont("default"); - color: UM.Theme.getColor("text"); + var current_extruder = extruderModel.get(currentIndex); + if (current_extruder !== undefined) { + supportExtruderCombobox.color_override = current_extruder.color; + } } - ComboBox + } + + Text + { + id: adhesionHelperLabel + anchors.left: parent.left + anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width + anchors.verticalCenter: adhesionCheckBox.verticalCenter + text: catalog.i18nc("@label", "Build Plate Adhesion"); + font: UM.Theme.getFont("default"); + color: UM.Theme.getColor("text"); + elide: Text.ElideRight + } + + CheckBox + { + id: adhesionCheckBox + property alias _hovered: adhesionMouseArea.containsMouse + + anchors.top: supportExtruderCombobox.bottom + anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 2 + anchors.left: infillCellRight.left + anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width + + //: Setting enable printing build-plate adhesion helper checkbox + style: UM.Theme.styles.checkbox; + enabled: base.settingsEnabled + + checked: platformAdhesionType.properties.value != "skirt" && platformAdhesionType.properties.value != "none" + + MouseArea { - id: supportExtruderCombobox - visible: (supportEnabled.properties.value == "True") && (machineExtruderCount.properties.value > 1) - model: extruderModel - - property string color_override: "" // for manually setting values - property string color: // is evaluated automatically, but the first time is before extruderModel being filled - { - var current_extruder = extruderModel.get(currentIndex); - color_override = ""; - if (current_extruder === undefined) { - return ""; - } - var model_color = current_extruder.color; - return (model_color) ? model_color : ""; - } - - textRole: 'text' // this solves that the combobox isn't populated in the first time Cura is started - - anchors.top: enableSupportCheckBox.bottom - anchors.topMargin: - { - if ((supportEnabled.properties.value == "True") && (machineExtruderCount.properties.value > 1)) - { - return UM.Theme.getSize("sidebar_margin").height; - } - else - { - return 0; - } - } - anchors.left: supportExtruderLabel.right - anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width - width: parent.width * .55 - height: - { - if ((supportEnabled.properties.value == "True") && (machineExtruderCount.properties.value > 1)) - { - // default height when control is enabled - return UM.Theme.getSize("setting_control").height; - } - else - { - return 0; - } - } - Behavior on height { NumberAnimation { duration: 100 } } - - style: UM.Theme.styles.combobox_color + id: adhesionMouseArea + anchors.fill: parent + hoverEnabled: true enabled: base.settingsEnabled - property alias _hovered: supportExtruderMouseArea.containsMouse - - currentIndex: supportExtruderNr.properties !== null ? parseFloat(supportExtruderNr.properties.value) : 0 - onActivated: + onClicked: { - // Send the extruder nr as a string. - supportExtruderNr.setPropertyValue("value", String(index)); - } - MouseArea - { - id: supportExtruderMouseArea - anchors.fill: parent - hoverEnabled: true - enabled: base.settingsEnabled - acceptedButtons: Qt.NoButton - onEntered: + var adhesionType = "skirt"; + if(!parent.checked) { - base.showTooltip(supportExtruderCombobox, Qt.point(-supportExtruderCombobox.x, 0), - catalog.i18nc("@label", "Select which extruder to use for support. This will build up supporting structures below the model to prevent the model from sagging or printing in mid air.")); - } - onExited: - { - base.hideTooltip(); - } - } - - function updateCurrentColor() - { - var current_extruder = extruderModel.get(currentIndex); - if (current_extruder !== undefined) { - supportExtruderCombobox.color_override = current_extruder.color; - } - } - - } - - Text - { - id: adhesionHelperLabel - anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width - anchors.verticalCenter: adhesionCheckBox.verticalCenter - width: parent.width * .45 - 3 * UM.Theme.getSize("sidebar_margin").width - text: catalog.i18nc("@label", "Build Plate Adhesion"); - font: UM.Theme.getFont("default"); - color: UM.Theme.getColor("text"); - elide: Text.ElideRight - } - - CheckBox - { - id: adhesionCheckBox - property alias _hovered: adhesionMouseArea.containsMouse - - anchors.top: supportExtruderCombobox.bottom - anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 2 - anchors.left: adhesionHelperLabel.right - anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width - - //: Setting enable printing build-plate adhesion helper checkbox - style: UM.Theme.styles.checkbox; - enabled: base.settingsEnabled - - checked: platformAdhesionType.properties.value != "skirt" && platformAdhesionType.properties.value != "none" - - MouseArea - { - id: adhesionMouseArea - anchors.fill: parent - hoverEnabled: true - enabled: base.settingsEnabled - onClicked: - { - var adhesionType = "skirt"; - if(!parent.checked) + // Remove the "user" setting to see if the rest of the stack prescribes a brim or a raft + platformAdhesionType.removeFromContainer(0); + adhesionType = platformAdhesionType.properties.value; + if(adhesionType == "skirt") { - // Remove the "user" setting to see if the rest of the stack prescribes a brim or a raft - platformAdhesionType.removeFromContainer(0); - adhesionType = platformAdhesionType.properties.value; - if(adhesionType == "skirt") - { - // If the rest of the stack doesn't prescribe an adhesion-type, default to a brim - adhesionType = "brim"; - } + // If the rest of the stack doesn't prescribe an adhesion-type, default to a brim + adhesionType = "brim"; } - platformAdhesionType.setPropertyValue("value", adhesionType); - } - onEntered: - { - base.showTooltip(adhesionCheckBox, Qt.point(-adhesionCheckBox.x, 0), - catalog.i18nc("@label", "Enable printing a brim or raft. This will add a flat area around or under your object which is easy to cut off afterwards.")); - } - onExited: - { - base.hideTooltip(); } + platformAdhesionType.setPropertyValue("value", adhesionType); + } + onEntered: + { + base.showTooltip(adhesionCheckBox, Qt.point(-adhesionCheckBox.x, 0), + catalog.i18nc("@label", "Enable printing a brim or raft. This will add a flat area around or under your object which is easy to cut off afterwards.")); + } + onExited: + { + base.hideTooltip(); } } + } - ListModel - { - id: extruderModel - Component.onCompleted: populateExtruderModel() - } + ListModel + { + id: extruderModel + Component.onCompleted: populateExtruderModel() + } - //: Model used to populate the extrudelModel - Cura.ExtrudersModel - { - id: extruders - onModelChanged: populateExtruderModel() - } + //: Model used to populate the extrudelModel + Cura.ExtrudersModel + { + id: extruders + onModelChanged: populateExtruderModel() } function populateExtruderModel() @@ -499,7 +487,7 @@ Item Item { id: tipsCell - anchors.top: helpersCell.bottom + anchors.top: adhesionCheckBox.bottom anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 2 anchors.left: parent.left width: parent.width From 526a42f7a01b4b74956ece4955838e62ff27e6c6 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 31 Aug 2017 09:51:19 +0200 Subject: [PATCH 64/74] Put sidebar contents inside a scroll view That means that you can't depend on the parent height and such any more. Luckily I already changed that in the previous commit. Contributes to issue CURA-4148. --- resources/qml/SidebarSimple.qml | 1086 ++++++++++++++++--------------- 1 file changed, 549 insertions(+), 537 deletions(-) diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index b2d9321f2d..c1468e5e5a 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -25,452 +25,584 @@ Item Component.onDestruction: PrintInformation.enabled = false UM.I18nCatalog { id: catalog; name: "cura" } - Item + ScrollView { - id: infillCellLeft - anchors.top: parent.top - anchors.left: parent.left - anchors.topMargin: UM.Theme.getSize("sidebar_margin").height - width: UM.Theme.getSize("sidebar").width * .45 - UM.Theme.getSize("sidebar_margin").width - height: childrenRect.height + anchors.fill: parent + style: UM.Theme.styles.scrollview + flickableItem.flickableDirection: Flickable.VerticalFlick - Text + Rectangle { - id: infillLabel - //: Infill selection label - text: catalog.i18nc("@label", "Infill"); - font: UM.Theme.getFont("default"); - color: UM.Theme.getColor("text"); - anchors.top: parent.top - anchors.topMargin: UM.Theme.getSize("sidebar_margin").height - anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width - } - } - - Row - { - id: infillCellRight - - height: childrenRect.height; - width: UM.Theme.getSize("sidebar").width * .55 - - spacing: UM.Theme.getSize("sidebar_margin").width - - anchors.left: infillCellLeft.right - anchors.top: infillCellLeft.top - - Repeater - { - id: infillListView - property int activeIndex: - { - for(var i = 0; i < infillModel.count; ++i) - { - var density = parseInt(infillDensity.properties.value); - var steps = parseInt(infillSteps.properties.value); - if(density > infillModel.get(i).percentageMin && density <= infillModel.get(i).percentageMax && steps > infillModel.get(i).stepsMin && steps <= infillModel.get(i).stepsMax) - { - return i; - } - } - - return -1; - } - model: infillModel; - + width: childrenRect.width + height: childrenRect.height Item { - width: childrenRect.width; - height: childrenRect.height; + id: infillCellLeft + anchors.top: parent.top + anchors.left: parent.left + anchors.topMargin: UM.Theme.getSize("sidebar_margin").height + width: UM.Theme.getSize("sidebar").width * .45 - UM.Theme.getSize("sidebar_margin").width + height: childrenRect.height - Rectangle - { - id: infillIconLining - - width: (infillCellRight.width - ((infillModel.count - 1) * UM.Theme.getSize("sidebar_margin").width)) / (infillModel.count); - height: width - - border.color: - { - if(!base.settingsEnabled) - { - return UM.Theme.getColor("setting_control_disabled_border") - } - else if(infillListView.activeIndex == index) - { - return UM.Theme.getColor("setting_control_selected") - } - else if(infillMouseArea.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: - { - if(infillListView.activeIndex == index) - { - if(!base.settingsEnabled) - { - return UM.Theme.getColor("setting_control_disabled_text") - } - return UM.Theme.getColor("setting_control_selected") - } - return "transparent" - } - - UM.RecolorImage - { - id: infillIcon - anchors.fill: parent; - anchors.margins: 2 - - sourceSize.width: width - sourceSize.height: width - source: UM.Theme.getIcon(model.icon); - color: { - if(infillListView.activeIndex == index) - { - return UM.Theme.getColor("text_emphasis") - } - if(!base.settingsEnabled) - { - return UM.Theme.getColor("setting_control_disabled_text") - } - return UM.Theme.getColor("setting_control_disabled_text") - } - } - - MouseArea - { - id: infillMouseArea - anchors.fill: parent - hoverEnabled: true - enabled: base.settingsEnabled - onClicked: { - if (infillListView.activeIndex != index) - { - infillDensity.setPropertyValue("value", model.percentage) - infillSteps.setPropertyValue("value", model.steps) - } - } - onEntered: - { - base.showTooltip(infillCellRight, Qt.point(-infillCellRight.x, 0), model.text); - } - onExited: - { - base.hideTooltip(); - } - } - } Text { id: infillLabel - width: (infillCellRight.width - ((infillModel.count - 1) * UM.Theme.getSize("sidebar_margin").width)) / (infillModel.count); - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - wrapMode: Text.WordWrap - font: UM.Theme.getFont("default") - anchors.top: infillIconLining.bottom - anchors.horizontalCenter: infillIconLining.horizontalCenter - color: infillListView.activeIndex == index ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_border") - text: name + //: Infill selection label + text: catalog.i18nc("@label", "Infill"); + font: UM.Theme.getFont("default"); + color: UM.Theme.getColor("text"); + anchors.top: parent.top + anchors.topMargin: UM.Theme.getSize("sidebar_margin").height + anchors.left: parent.left + anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width } } - } - ListModel - { - id: infillModel - - Component.onCompleted: + Row { - infillModel.append({ - name: catalog.i18nc("@label", "0%"), - percentage: 0, - steps: 0, - percentageMin: -1, - percentageMax: 0, - stepsMin: -1, - stepsMax: 0, - text: catalog.i18nc("@label", "Empty infill will leave your model hollow with low strength."), - icon: "hollow" - }) - infillModel.append({ - name: catalog.i18nc("@label", "20%"), - percentage: 20, - steps: 0, - percentageMin: 0, - percentageMax: 30, - stepsMin: -1, - stepsMax: 0, - text: catalog.i18nc("@label", "Light (20%) infill will give your model an average strength."), - icon: "sparse" - }) - infillModel.append({ - name: catalog.i18nc("@label", "50%"), - percentage: 50, - steps: 0, - percentageMin: 30, - percentageMax: 70, - stepsMin: -1, - stepsMax: 0, - text: catalog.i18nc("@label", "Dense (50%) infill will give your model an above average strength."), - icon: "dense" - }) - infillModel.append({ - name: catalog.i18nc("@label", "100%"), - percentage: 100, - steps: 0, - percentageMin: 70, - percentageMax: 9999999999, - stepsMin: -1, - stepsMax: 0, - text: catalog.i18nc("@label", "Solid (100%) infill will make your model completely solid."), - icon: "solid" - }) - infillModel.append({ - name: catalog.i18nc("@label", "Gradual"), - percentage: 90, - steps: 5, - percentageMin: 0, - percentageMax: 9999999999, - stepsMin: 0, - stepsMax: 9999999999, - infill_layer_height: 1.5, - text: catalog.i18nc("@label", "Gradual infill will gradually increase the amount of infill towards the top."), - icon: "gradual" - }) - } - } - } + id: infillCellRight - Text - { - id: enableSupportLabel - anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width - anchors.verticalCenter: enableSupportCheckBox.verticalCenter - text: catalog.i18nc("@label", "Generate Support"); - font: UM.Theme.getFont("default"); - color: UM.Theme.getColor("text"); - } + height: childrenRect.height; + width: UM.Theme.getSize("sidebar").width * .55 - CheckBox - { - id: enableSupportCheckBox - property alias _hovered: enableSupportMouseArea.containsMouse + spacing: UM.Theme.getSize("sidebar_margin").width - anchors.top: infillCellRight.bottom - anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 2 - anchors.left: infillCellRight.left - anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width + anchors.left: infillCellLeft.right + anchors.top: infillCellLeft.top - style: UM.Theme.styles.checkbox; - enabled: base.settingsEnabled - - checked: supportEnabled.properties.value == "True"; - - MouseArea - { - id: enableSupportMouseArea - anchors.fill: parent - hoverEnabled: true - enabled: true - onClicked: - { - // The value is a string "True" or "False" - supportEnabled.setPropertyValue("value", supportEnabled.properties.value != "True"); - } - onEntered: - { - base.showTooltip(enableSupportCheckBox, Qt.point(-enableSupportCheckBox.x, 0), - catalog.i18nc("@label", "Generate structures to support parts of the model which have overhangs. Without these structures, such parts would collapse during printing.")); - } - onExited: - { - base.hideTooltip(); - } - } - } - - Text - { - id: supportExtruderLabel - visible: (supportEnabled.properties.value == "True") && (machineExtruderCount.properties.value > 1) - anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width - anchors.verticalCenter: supportExtruderCombobox.verticalCenter - text: catalog.i18nc("@label", "Support Extruder"); - font: UM.Theme.getFont("default"); - color: UM.Theme.getColor("text"); - } - - ComboBox - { - id: supportExtruderCombobox - visible: (supportEnabled.properties.value == "True") && (machineExtruderCount.properties.value > 1) - model: extruderModel - - property string color_override: "" // for manually setting values - property string color: // is evaluated automatically, but the first time is before extruderModel being filled - { - var current_extruder = extruderModel.get(currentIndex); - color_override = ""; - if (current_extruder === undefined) { - return ""; - } - var model_color = current_extruder.color; - return (model_color) ? model_color : ""; - } - - textRole: 'text' // this solves that the combobox isn't populated in the first time Cura is started - - anchors.top: enableSupportCheckBox.bottom - anchors.topMargin: - { - if ((supportEnabled.properties.value == "True") && (machineExtruderCount.properties.value > 1)) - { - return UM.Theme.getSize("sidebar_margin").height; - } - else - { - return 0; - } - } - anchors.left: infillCellRight.left - anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width - width: UM.Theme.getSize("sidebar").width * .55 - height: - { - if ((supportEnabled.properties.value == "True") && (machineExtruderCount.properties.value > 1)) - { - // default height when control is enabled - return UM.Theme.getSize("setting_control").height; - } - else - { - return 0; - } - } - Behavior on height { NumberAnimation { duration: 100 } } - - style: UM.Theme.styles.combobox_color - enabled: base.settingsEnabled - property alias _hovered: supportExtruderMouseArea.containsMouse - - currentIndex: supportExtruderNr.properties !== null ? parseFloat(supportExtruderNr.properties.value) : 0 - onActivated: - { - // Send the extruder nr as a string. - supportExtruderNr.setPropertyValue("value", String(index)); - } - MouseArea - { - id: supportExtruderMouseArea - anchors.fill: parent - hoverEnabled: true - enabled: base.settingsEnabled - acceptedButtons: Qt.NoButton - onEntered: - { - base.showTooltip(supportExtruderCombobox, Qt.point(-supportExtruderCombobox.x, 0), - catalog.i18nc("@label", "Select which extruder to use for support. This will build up supporting structures below the model to prevent the model from sagging or printing in mid air.")); - } - onExited: - { - base.hideTooltip(); - } - } - - function updateCurrentColor() - { - var current_extruder = extruderModel.get(currentIndex); - if (current_extruder !== undefined) { - supportExtruderCombobox.color_override = current_extruder.color; - } - } - - } - - Text - { - id: adhesionHelperLabel - anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width - anchors.verticalCenter: adhesionCheckBox.verticalCenter - text: catalog.i18nc("@label", "Build Plate Adhesion"); - font: UM.Theme.getFont("default"); - color: UM.Theme.getColor("text"); - elide: Text.ElideRight - } - - CheckBox - { - id: adhesionCheckBox - property alias _hovered: adhesionMouseArea.containsMouse - - anchors.top: supportExtruderCombobox.bottom - anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 2 - anchors.left: infillCellRight.left - anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width - - //: Setting enable printing build-plate adhesion helper checkbox - style: UM.Theme.styles.checkbox; - enabled: base.settingsEnabled - - checked: platformAdhesionType.properties.value != "skirt" && platformAdhesionType.properties.value != "none" - - MouseArea - { - id: adhesionMouseArea - anchors.fill: parent - hoverEnabled: true - enabled: base.settingsEnabled - onClicked: - { - var adhesionType = "skirt"; - if(!parent.checked) + Repeater { - // Remove the "user" setting to see if the rest of the stack prescribes a brim or a raft - platformAdhesionType.removeFromContainer(0); - adhesionType = platformAdhesionType.properties.value; - if(adhesionType == "skirt") + id: infillListView + property int activeIndex: { - // If the rest of the stack doesn't prescribe an adhesion-type, default to a brim - adhesionType = "brim"; + for(var i = 0; i < infillModel.count; ++i) + { + var density = parseInt(infillDensity.properties.value); + var steps = parseInt(infillSteps.properties.value); + if(density > infillModel.get(i).percentageMin && density <= infillModel.get(i).percentageMax && steps > infillModel.get(i).stepsMin && steps <= infillModel.get(i).stepsMax) + { + return i; + } + } + + return -1; + } + model: infillModel; + + Item + { + width: childrenRect.width; + height: childrenRect.height; + + Rectangle + { + id: infillIconLining + + width: (infillCellRight.width - ((infillModel.count - 1) * UM.Theme.getSize("sidebar_margin").width)) / (infillModel.count); + height: width + + border.color: + { + if(!base.settingsEnabled) + { + return UM.Theme.getColor("setting_control_disabled_border") + } + else if(infillListView.activeIndex == index) + { + return UM.Theme.getColor("setting_control_selected") + } + else if(infillMouseArea.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: + { + if(infillListView.activeIndex == index) + { + if(!base.settingsEnabled) + { + return UM.Theme.getColor("setting_control_disabled_text") + } + return UM.Theme.getColor("setting_control_selected") + } + return "transparent" + } + + UM.RecolorImage + { + id: infillIcon + anchors.fill: parent; + anchors.margins: 2 + + sourceSize.width: width + sourceSize.height: width + source: UM.Theme.getIcon(model.icon); + color: { + if(infillListView.activeIndex == index) + { + return UM.Theme.getColor("text_emphasis") + } + if(!base.settingsEnabled) + { + return UM.Theme.getColor("setting_control_disabled_text") + } + return UM.Theme.getColor("setting_control_disabled_text") + } + } + + MouseArea + { + id: infillMouseArea + anchors.fill: parent + hoverEnabled: true + enabled: base.settingsEnabled + onClicked: { + if (infillListView.activeIndex != index) + { + infillDensity.setPropertyValue("value", model.percentage) + infillSteps.setPropertyValue("value", model.steps) + } + } + onEntered: + { + base.showTooltip(infillCellRight, Qt.point(-infillCellRight.x, 0), model.text); + } + onExited: + { + base.hideTooltip(); + } + } + } + Text + { + id: infillLabel + width: (infillCellRight.width - ((infillModel.count - 1) * UM.Theme.getSize("sidebar_margin").width)) / (infillModel.count); + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + wrapMode: Text.WordWrap + font: UM.Theme.getFont("default") + anchors.top: infillIconLining.bottom + anchors.horizontalCenter: infillIconLining.horizontalCenter + color: infillListView.activeIndex == index ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_border") + text: name + } + } + } + + ListModel + { + id: infillModel + + Component.onCompleted: + { + infillModel.append({ + name: catalog.i18nc("@label", "0%"), + percentage: 0, + steps: 0, + percentageMin: -1, + percentageMax: 0, + stepsMin: -1, + stepsMax: 0, + text: catalog.i18nc("@label", "Empty infill will leave your model hollow with low strength."), + icon: "hollow" + }) + infillModel.append({ + name: catalog.i18nc("@label", "20%"), + percentage: 20, + steps: 0, + percentageMin: 0, + percentageMax: 30, + stepsMin: -1, + stepsMax: 0, + text: catalog.i18nc("@label", "Light (20%) infill will give your model an average strength."), + icon: "sparse" + }) + infillModel.append({ + name: catalog.i18nc("@label", "50%"), + percentage: 50, + steps: 0, + percentageMin: 30, + percentageMax: 70, + stepsMin: -1, + stepsMax: 0, + text: catalog.i18nc("@label", "Dense (50%) infill will give your model an above average strength."), + icon: "dense" + }) + infillModel.append({ + name: catalog.i18nc("@label", "100%"), + percentage: 100, + steps: 0, + percentageMin: 70, + percentageMax: 9999999999, + stepsMin: -1, + stepsMax: 0, + text: catalog.i18nc("@label", "Solid (100%) infill will make your model completely solid."), + icon: "solid" + }) + infillModel.append({ + name: catalog.i18nc("@label", "Gradual"), + percentage: 90, + steps: 5, + percentageMin: 0, + percentageMax: 9999999999, + stepsMin: 0, + stepsMax: 9999999999, + infill_layer_height: 1.5, + text: catalog.i18nc("@label", "Gradual infill will gradually increase the amount of infill towards the top."), + icon: "gradual" + }) } } - platformAdhesionType.setPropertyValue("value", adhesionType); } - onEntered: + + Text { - base.showTooltip(adhesionCheckBox, Qt.point(-adhesionCheckBox.x, 0), - catalog.i18nc("@label", "Enable printing a brim or raft. This will add a flat area around or under your object which is easy to cut off afterwards.")); + id: enableSupportLabel + anchors.left: parent.left + anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width + anchors.verticalCenter: enableSupportCheckBox.verticalCenter + text: catalog.i18nc("@label", "Generate Support"); + font: UM.Theme.getFont("default"); + color: UM.Theme.getColor("text"); } - onExited: + + CheckBox { - base.hideTooltip(); + id: enableSupportCheckBox + property alias _hovered: enableSupportMouseArea.containsMouse + + anchors.top: infillCellRight.bottom + anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 2 + anchors.left: infillCellRight.left + anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width + + style: UM.Theme.styles.checkbox; + enabled: base.settingsEnabled + + checked: supportEnabled.properties.value == "True"; + + MouseArea + { + id: enableSupportMouseArea + anchors.fill: parent + hoverEnabled: true + enabled: true + onClicked: + { + // The value is a string "True" or "False" + supportEnabled.setPropertyValue("value", supportEnabled.properties.value != "True"); + } + onEntered: + { + base.showTooltip(enableSupportCheckBox, Qt.point(-enableSupportCheckBox.x, 0), + catalog.i18nc("@label", "Generate structures to support parts of the model which have overhangs. Without these structures, such parts would collapse during printing.")); + } + onExited: + { + base.hideTooltip(); + } + } + } + + Text + { + id: supportExtruderLabel + visible: (supportEnabled.properties.value == "True") && (machineExtruderCount.properties.value > 1) + anchors.left: parent.left + anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width + anchors.verticalCenter: supportExtruderCombobox.verticalCenter + text: catalog.i18nc("@label", "Support Extruder"); + font: UM.Theme.getFont("default"); + color: UM.Theme.getColor("text"); + } + + ComboBox + { + id: supportExtruderCombobox + visible: (supportEnabled.properties.value == "True") && (machineExtruderCount.properties.value > 1) + model: extruderModel + + property string color_override: "" // for manually setting values + property string color: // is evaluated automatically, but the first time is before extruderModel being filled + { + var current_extruder = extruderModel.get(currentIndex); + color_override = ""; + if (current_extruder === undefined) { + return ""; + } + var model_color = current_extruder.color; + return (model_color) ? model_color : ""; + } + + textRole: 'text' // this solves that the combobox isn't populated in the first time Cura is started + + anchors.top: enableSupportCheckBox.bottom + anchors.topMargin: + { + if ((supportEnabled.properties.value == "True") && (machineExtruderCount.properties.value > 1)) + { + return UM.Theme.getSize("sidebar_margin").height; + } + else + { + return 0; + } + } + anchors.left: infillCellRight.left + anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width + width: UM.Theme.getSize("sidebar").width * .55 + height: + { + if ((supportEnabled.properties.value == "True") && (machineExtruderCount.properties.value > 1)) + { + // default height when control is enabled + return UM.Theme.getSize("setting_control").height; + } + else + { + return 0; + } + } + Behavior on height { NumberAnimation { duration: 100 } } + + style: UM.Theme.styles.combobox_color + enabled: base.settingsEnabled + property alias _hovered: supportExtruderMouseArea.containsMouse + + currentIndex: supportExtruderNr.properties !== null ? parseFloat(supportExtruderNr.properties.value) : 0 + onActivated: + { + // Send the extruder nr as a string. + supportExtruderNr.setPropertyValue("value", String(index)); + } + MouseArea + { + id: supportExtruderMouseArea + anchors.fill: parent + hoverEnabled: true + enabled: base.settingsEnabled + acceptedButtons: Qt.NoButton + onEntered: + { + base.showTooltip(supportExtruderCombobox, Qt.point(-supportExtruderCombobox.x, 0), + catalog.i18nc("@label", "Select which extruder to use for support. This will build up supporting structures below the model to prevent the model from sagging or printing in mid air.")); + } + onExited: + { + base.hideTooltip(); + } + } + + function updateCurrentColor() + { + var current_extruder = extruderModel.get(currentIndex); + if (current_extruder !== undefined) { + supportExtruderCombobox.color_override = current_extruder.color; + } + } + + } + + Text + { + id: adhesionHelperLabel + anchors.left: parent.left + anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width + anchors.verticalCenter: adhesionCheckBox.verticalCenter + text: catalog.i18nc("@label", "Build Plate Adhesion"); + font: UM.Theme.getFont("default"); + color: UM.Theme.getColor("text"); + elide: Text.ElideRight + } + + CheckBox + { + id: adhesionCheckBox + property alias _hovered: adhesionMouseArea.containsMouse + + anchors.top: supportExtruderCombobox.bottom + anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 2 + anchors.left: infillCellRight.left + anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width + + //: Setting enable printing build-plate adhesion helper checkbox + style: UM.Theme.styles.checkbox; + enabled: base.settingsEnabled + + checked: platformAdhesionType.properties.value != "skirt" && platformAdhesionType.properties.value != "none" + + MouseArea + { + id: adhesionMouseArea + anchors.fill: parent + hoverEnabled: true + enabled: base.settingsEnabled + onClicked: + { + var adhesionType = "skirt"; + if(!parent.checked) + { + // Remove the "user" setting to see if the rest of the stack prescribes a brim or a raft + platformAdhesionType.removeFromContainer(0); + adhesionType = platformAdhesionType.properties.value; + if(adhesionType == "skirt") + { + // If the rest of the stack doesn't prescribe an adhesion-type, default to a brim + adhesionType = "brim"; + } + } + platformAdhesionType.setPropertyValue("value", adhesionType); + } + onEntered: + { + base.showTooltip(adhesionCheckBox, Qt.point(-adhesionCheckBox.x, 0), + catalog.i18nc("@label", "Enable printing a brim or raft. This will add a flat area around or under your object which is easy to cut off afterwards.")); + } + onExited: + { + base.hideTooltip(); + } + } + } + + ListModel + { + id: extruderModel + Component.onCompleted: populateExtruderModel() + } + + //: Model used to populate the extrudelModel + Cura.ExtrudersModel + { + id: extruders + onModelChanged: populateExtruderModel() + } + + Item + { + id: tipsCell + anchors.top: adhesionCheckBox.bottom + anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 2 + anchors.left: parent.left + width: parent.width + height: childrenRect.height + + Text + { + anchors.left: parent.left + anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width + anchors.right: parent.right + anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width + wrapMode: Text.WordWrap + //: Tips label + text: catalog.i18nc("@label", "Need help improving your prints?
Read the Ultimaker Troubleshooting Guides").arg("https://ultimaker.com/en/troubleshooting") + "".arg(UM.Theme.getIcon("play")) + font: UM.Theme.getFont("default"); + color: UM.Theme.getColor("text"); + linkColor: UM.Theme.getColor("text_link") + onLinkActivated: Qt.openUrlExternally(link) + } + } + + UM.SettingPropertyProvider + { + id: infillExtruderNumber + + containerStackId: Cura.MachineManager.activeStackId + key: "infill_extruder_nr" + watchedProperties: [ "value" ] + storeIndex: 0 + } + + Binding + { + target: infillDensity + property: "containerStackId" + value: + { + var activeMachineId = Cura.MachineManager.activeMachineId; + if (machineExtruderCount.properties.value > 1) + { + var infillExtruderNr = parseInt(infillExtruderNumber.properties.value); + if (infillExtruderNr >= 0) + { + activeMachineId = ExtruderManager.extruderIds[infillExtruderNumber.properties.value]; + } + else if (ExtruderManager.activeExtruderStackId) + { + activeMachineId = ExtruderManager.activeExtruderStackId; + } + } + + infillSteps.containerStackId = activeMachineId; + return activeMachineId; + } + } + + UM.SettingPropertyProvider + { + id: infillDensity + + containerStackId: Cura.MachineManager.activeStackId + key: "infill_sparse_density" + watchedProperties: [ "value" ] + storeIndex: 0 + } + + UM.SettingPropertyProvider + { + id: infillSteps + + containerStackId: Cura.MachineManager.activeStackId + key: "gradual_infill_steps" + watchedProperties: [ "value" ] + storeIndex: 0 + } + + UM.SettingPropertyProvider + { + id: platformAdhesionType + + containerStackId: Cura.MachineManager.activeMachineId + key: "adhesion_type" + watchedProperties: [ "value" ] + storeIndex: 0 + } + + UM.SettingPropertyProvider + { + id: supportEnabled + + containerStackId: Cura.MachineManager.activeMachineId + key: "support_enable" + watchedProperties: [ "value", "description" ] + storeIndex: 0 + } + + UM.SettingPropertyProvider + { + id: machineExtruderCount + + containerStackId: Cura.MachineManager.activeMachineId + key: "machine_extruder_count" + watchedProperties: [ "value" ] + storeIndex: 0 + } + + UM.SettingPropertyProvider + { + id: supportExtruderNr + + containerStackId: Cura.MachineManager.activeMachineId + key: "support_extruder_nr" + watchedProperties: [ "value" ] + storeIndex: 0 } } } - ListModel - { - id: extruderModel - Component.onCompleted: populateExtruderModel() - } - - //: Model used to populate the extrudelModel - Cura.ExtrudersModel - { - id: extruders - onModelChanged: populateExtruderModel() - } - function populateExtruderModel() { extruderModel.clear(); @@ -483,124 +615,4 @@ Item } supportExtruderCombobox.updateCurrentColor(); } - - Item - { - id: tipsCell - anchors.top: adhesionCheckBox.bottom - anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 2 - anchors.left: parent.left - width: parent.width - height: childrenRect.height - - Text - { - anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width - anchors.right: parent.right - anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width - wrapMode: Text.WordWrap - //: Tips label - text: catalog.i18nc("@label", "Need help improving your prints?
Read the Ultimaker Troubleshooting Guides").arg("https://ultimaker.com/en/troubleshooting") + "".arg(UM.Theme.getIcon("play")) - font: UM.Theme.getFont("default"); - color: UM.Theme.getColor("text"); - linkColor: UM.Theme.getColor("text_link") - onLinkActivated: Qt.openUrlExternally(link) - } - } - - UM.SettingPropertyProvider - { - id: infillExtruderNumber - - containerStackId: Cura.MachineManager.activeStackId - key: "infill_extruder_nr" - watchedProperties: [ "value" ] - storeIndex: 0 - } - - Binding - { - target: infillDensity - property: "containerStackId" - value: - { - var activeMachineId = Cura.MachineManager.activeMachineId; - if (machineExtruderCount.properties.value > 1) - { - var infillExtruderNr = parseInt(infillExtruderNumber.properties.value); - if (infillExtruderNr >= 0) - { - activeMachineId = ExtruderManager.extruderIds[infillExtruderNumber.properties.value]; - } - else if (ExtruderManager.activeExtruderStackId) - { - activeMachineId = ExtruderManager.activeExtruderStackId; - } - } - - infillSteps.containerStackId = activeMachineId; - return activeMachineId; - } - } - - UM.SettingPropertyProvider - { - id: infillDensity - - containerStackId: Cura.MachineManager.activeStackId - key: "infill_sparse_density" - watchedProperties: [ "value" ] - storeIndex: 0 - } - - UM.SettingPropertyProvider - { - id: infillSteps - - containerStackId: Cura.MachineManager.activeStackId - key: "gradual_infill_steps" - watchedProperties: [ "value" ] - storeIndex: 0 - } - - UM.SettingPropertyProvider - { - id: platformAdhesionType - - containerStackId: Cura.MachineManager.activeMachineId - key: "adhesion_type" - watchedProperties: [ "value" ] - storeIndex: 0 - } - - UM.SettingPropertyProvider - { - id: supportEnabled - - containerStackId: Cura.MachineManager.activeMachineId - key: "support_enable" - watchedProperties: [ "value", "description" ] - storeIndex: 0 - } - - UM.SettingPropertyProvider - { - id: machineExtruderCount - - containerStackId: Cura.MachineManager.activeMachineId - key: "machine_extruder_count" - watchedProperties: [ "value" ] - storeIndex: 0 - } - - UM.SettingPropertyProvider - { - id: supportExtruderNr - - containerStackId: Cura.MachineManager.activeMachineId - key: "support_extruder_nr" - watchedProperties: [ "value" ] - storeIndex: 0 - } } From c4910503e4d01ee3d24ec38e44713c8ba3b48a6a Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 31 Aug 2017 10:18:54 +0200 Subject: [PATCH 65/74] Correct height of tips text The contentHeight property seems to indicate the height of only one line, contrary to the documentation... Contributes to issue CURA-4148. --- resources/qml/SidebarSimple.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index c1468e5e5a..265c4c1642 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -488,14 +488,16 @@ Item anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 2 anchors.left: parent.left width: parent.width - height: childrenRect.height + height: tipsText.contentHeight * tipsText.lineCount Text { + id: tipsText anchors.left: parent.left anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width anchors.right: parent.right anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width + anchors.top: parent.top wrapMode: Text.WordWrap //: Tips label text: catalog.i18nc("@label", "Need help improving your prints?
Read the Ultimaker Troubleshooting Guides").arg("https://ultimaker.com/en/troubleshooting") + "".arg(UM.Theme.getIcon("play")) From ed7e204cc0f722c56a9638f84350d913e7ad14df Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 31 Aug 2017 10:21:28 +0200 Subject: [PATCH 66/74] Fix colour of time estimates text I'd like it to be the same colour as the text underneath it, so subtext it is. Contributes to issue CURA-4148. --- resources/qml/Sidebar.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Sidebar.qml b/resources/qml/Sidebar.qml index f0b0299653..bc860144fd 100755 --- a/resources/qml/Sidebar.qml +++ b/resources/qml/Sidebar.qml @@ -430,7 +430,7 @@ Rectangle anchors.left: parent.left anchors.bottom: parent.bottom font: UM.Theme.getFont("large") - color: UM.Theme.getColor("text_emphasis") + color: UM.Theme.getColor("text_subtext") text: (!base.printDuration || !base.printDuration.valid) ? catalog.i18nc("@label", "00h 00min") : base.printDuration.getDisplayString(UM.DurationFormat.Short) } } From a6e90270cf4d55362dfe10fc823f5054ff0d0c8b Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 1 Sep 2017 12:05:20 +0200 Subject: [PATCH 67/74] Updated margins so low resolution screens can actually have some settings visible --- resources/themes/cura-light/theme.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 9263b8a495..7e923a7e8e 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -277,7 +277,7 @@ "simple_mode_infill_caption": [0.0, 5.0], "simple_mode_infill_height": [0.0, 8.0], - "section": [0.0, 2.86], + "section": [0.0, 2.2], "section_icon": [1.6, 1.6], "section_icon_column": [2.8, 0.0], From a652ddbdd89279cd05206ea637f060d7b93cf34e Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 1 Sep 2017 14:54:57 +0200 Subject: [PATCH 68/74] Reset lastResponseTime when trying to connect CURA-3869 --- plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py index 8c13c344aa..96c511bccb 100755 --- a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py +++ b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py @@ -756,6 +756,8 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): self._createNetworkManager() + self._last_response_time = time() # Ensure we reset the time when trying to connect (again) + self.setConnectionState(ConnectionState.connecting) self._update() # Manually trigger the first update, as we don't want to wait a few secs before it starts. if not self._use_stream: From a288668baecae9ab587d66c59b010aa484ca9bad Mon Sep 17 00:00:00 2001 From: alekseisasin Date: Fri, 1 Sep 2017 17:45:50 +0200 Subject: [PATCH 69/74] Adjusted color for the extruder counter number in left toolbox and added extra margin-right in sidebar_category CURA-4148 --- resources/themes/cura-light/styles.qml | 2 +- resources/themes/cura-light/theme.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/themes/cura-light/styles.qml b/resources/themes/cura-light/styles.qml index 9b28af0dfb..2d40a0e8d0 100755 --- a/resources/themes/cura-light/styles.qml +++ b/resources/themes/cura-light/styles.qml @@ -482,7 +482,7 @@ QtObject { id: category_arrow anchors.verticalCenter: parent.verticalCenter anchors.right: parent.right - anchors.rightMargin: Theme.getSize("default_margin").width * 2 - width / 2 + anchors.rightMargin: Theme.getSize("default_margin").width * 3 - width / 2 width: Theme.getSize("standard_arrow").width height: Theme.getSize("standard_arrow").height sourceSize.width: width diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 7e923a7e8e..eb9fb72db6 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -90,7 +90,7 @@ "button_text_active": [255, 255, 255, 255], "button_text_active_hover": [255, 255, 255, 255], "button_disabled": [24, 41, 77, 255], - "button_disabled_text": [70, 84, 113, 51], + "button_disabled_text": [255, 255, 255, 101], "button_tooltip": [12, 169, 227, 255], "button_tooltip_border": [24, 41, 77, 255], From ee1ba30d0eec849f78a710ee5f270b2c756402fc Mon Sep 17 00:00:00 2001 From: Vivek Anand Date: Sat, 2 Sep 2017 12:01:38 +0000 Subject: [PATCH 70/74] CuraApplication: Minor pep8 fix --- cura/CuraApplication.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 1b7dafd53d..ee1c1aeec6 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -488,7 +488,7 @@ class CuraApplication(QtApplication): f.write(data) - @pyqtSlot(str, result = QUrl) + @pyqtSlot(str, result=QUrl) def getDefaultPath(self, key): default_path = Preferences.getInstance().getValue("local_file/%s" % key) return QUrl.fromLocalFile(default_path) @@ -1128,7 +1128,7 @@ class CuraApplication(QtApplication): expandedCategoriesChanged = pyqtSignal() - @pyqtProperty("QStringList", notify = expandedCategoriesChanged) + @pyqtProperty("QStringList", notify=expandedCategoriesChanged) def expandedCategories(self): return Preferences.getInstance().getValue("cura/categories_expanded").split(";") From d18d9223a5fd991e51fe58aadd1c41b19637fdfa Mon Sep 17 00:00:00 2001 From: Mark Date: Sun, 3 Sep 2017 08:18:12 +0200 Subject: [PATCH 71/74] refix the alignmet of the support and adhesion chackboxes CURA-4148 --- resources/qml/SidebarSimple.qml | 3 --- 1 file changed, 3 deletions(-) diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index 265c4c1642..25564f1172 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -277,7 +277,6 @@ Item anchors.top: infillCellRight.bottom anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 2 anchors.left: infillCellRight.left - anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width style: UM.Theme.styles.checkbox; enabled: base.settingsEnabled @@ -352,7 +351,6 @@ Item } } anchors.left: infillCellRight.left - anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width width: UM.Theme.getSize("sidebar").width * .55 height: { @@ -426,7 +424,6 @@ Item anchors.top: supportExtruderCombobox.bottom anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 2 anchors.left: infillCellRight.left - anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width //: Setting enable printing build-plate adhesion helper checkbox style: UM.Theme.styles.checkbox; From 3af37d5dbca9057e678b0a8ae0d33de4dff5ba48 Mon Sep 17 00:00:00 2001 From: Ruben D Date: Sun, 3 Sep 2017 16:41:02 +0200 Subject: [PATCH 72/74] Fix token replacement in extruder start and end g-codes Don't perform the replacement in the global stack for these settings, but in the extruder stacks. Fixes #2331. --- plugins/CuraEngineBackend/StartSliceJob.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index b6da2104a6..13aee06289 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -224,7 +224,18 @@ class StartSliceJob(Job): material_instance_container = stack.findContainer({"type": "material"}) + settings = {} for key in stack.getAllKeys(): + settings[key] = stack.getProperty(key, "value") + Job.yieldThread() + + settings["print_bed_temperature"] = settings["material_bed_temperature"] #Renamed settings. + settings["print_temperature"] = settings["material_print_temperature"] + settings["time"] = time.strftime("%H:%M:%S") #Some extra settings. + settings["date"] = time.strftime("%d-%m-%Y") + settings["day"] = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"][int(time.strftime("%w"))] + + for key, value in settings.items(): # Do not send settings that are not settable_per_extruder. if not stack.getProperty(key, "settable_per_extruder"): continue @@ -233,6 +244,8 @@ class StartSliceJob(Job): if key == "material_guid" and material_instance_container: # Also send the material GUID. This is a setting in fdmprinter, but we have no interface for it. setting.value = str(material_instance_container.getMetaDataEntry("GUID", "")).encode("utf-8") + elif key == "machine_extruder_start_code" or key == "machine_extruder_end_code": + setting.value = self._expandGcodeTokens(key, value, settings) else: setting.value = str(stack.getProperty(key, "value")).encode("utf-8") Job.yieldThread() @@ -278,7 +291,7 @@ class StartSliceJob(Job): for key, value in settings.items(): #Add all submessages for each individual setting. setting_message = self._slice_message.getMessage("global_settings").addRepeatedMessage("settings") setting_message.name = key - if key == "machine_start_gcode" or key == "machine_end_gcode" or key == "machine_extruder_start_code" or key == "machine_extruder_end_code": #If it's a g-code message, use special formatting. + if key == "machine_start_gcode" or key == "machine_end_gcode": #If it's a g-code message, use special formatting. setting_message.value = self._expandGcodeTokens(key, value, settings) else: setting_message.value = str(value).encode("utf-8") From 0358b1fcae8d20c48ca5d5bdfdc72bca3def3f24 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 4 Sep 2017 09:23:46 +0200 Subject: [PATCH 73/74] Fix User-Agent header in PluginBrowser --- plugins/PluginBrowser/PluginBrowser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/PluginBrowser/PluginBrowser.py b/plugins/PluginBrowser/PluginBrowser.py index 7df020f078..b8db123a91 100644 --- a/plugins/PluginBrowser/PluginBrowser.py +++ b/plugins/PluginBrowser/PluginBrowser.py @@ -47,7 +47,7 @@ class PluginBrowser(QObject, Extension): self._is_downloading = False self._request_header = [b"User-Agent", - str.encode("%s\%s (%s %s)" % (Application.getInstance().getApplicationName(), + str.encode("%s/%s (%s %s)" % (Application.getInstance().getApplicationName(), Application.getInstance().getVersion(), platform.system(), platform.machine(), From b70a89d0e1c5f130d8538e05eb889e9fcc21ec8c Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 4 Sep 2017 14:08:03 +0200 Subject: [PATCH 74/74] Fix stdout and stderr redirecting file location --- cura_app.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/cura_app.py b/cura_app.py index 1d8867f1f4..2e406f99d3 100755 --- a/cura_app.py +++ b/cura_app.py @@ -54,8 +54,17 @@ import Arcus #@UnusedImport import cura.CuraApplication import cura.Settings.CuraContainerRegistry +def get_cura_dir_path(): + if Platform.isWindows(): + return os.path.expanduser("~/AppData/Local/cura/") + elif Platform.isLinux(): + return os.path.expanduser("~/.local/share/cura") + elif Platform.isOSX(): + return os.path.expanduser("~/Library/Application Support/cura") + + if hasattr(sys, "frozen"): - dirpath = os.path.expanduser("~/AppData/Local/cura/") + dirpath = get_cura_dir_path() os.makedirs(dirpath, exist_ok = True) sys.stdout = open(os.path.join(dirpath, "stdout.log"), "w") sys.stderr = open(os.path.join(dirpath, "stderr.log"), "w")