From 59fe2eafd7904ca09473d5a406aadba16738c838 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Fri, 23 Jul 2021 11:47:33 +0200 Subject: [PATCH 1/9] Add theme entries and icons for the message types CURA-7278 --- resources/themes/cura-light/icons/low/Cancel.svg | 3 +++ resources/themes/cura-light/icons/low/Check.svg | 3 +++ resources/themes/cura-light/icons/low/Warning.svg | 3 +++ resources/themes/cura-light/theme.json | 10 +++++++++- 4 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 resources/themes/cura-light/icons/low/Cancel.svg create mode 100644 resources/themes/cura-light/icons/low/Check.svg create mode 100644 resources/themes/cura-light/icons/low/Warning.svg diff --git a/resources/themes/cura-light/icons/low/Cancel.svg b/resources/themes/cura-light/icons/low/Cancel.svg new file mode 100644 index 0000000000..e5c45c6bdd --- /dev/null +++ b/resources/themes/cura-light/icons/low/Cancel.svg @@ -0,0 +1,3 @@ + + + diff --git a/resources/themes/cura-light/icons/low/Check.svg b/resources/themes/cura-light/icons/low/Check.svg new file mode 100644 index 0000000000..03348e4bf1 --- /dev/null +++ b/resources/themes/cura-light/icons/low/Check.svg @@ -0,0 +1,3 @@ + + + diff --git a/resources/themes/cura-light/icons/low/Warning.svg b/resources/themes/cura-light/icons/low/Warning.svg new file mode 100644 index 0000000000..5dc2a04ae3 --- /dev/null +++ b/resources/themes/cura-light/icons/low/Warning.svg @@ -0,0 +1,3 @@ + + + diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index a2727ec12b..6b06687e4b 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -467,7 +467,15 @@ "monitor_carousel_dot_current": [119, 119, 119, 255], "cloud_unavailable": [153, 153, 153, 255], - "connection_badge_background": [255, 255, 255, 255] + "connection_badge_background": [255, 255, 255, 255], + + + "message_success_background": [36, 162, 73, 255], + "message_success_icon": [255, 255, 255, 255], + "message_warning_background": [253, 209, 58, 255], + "message_warning_icon": [0, 0, 0, 255], + "message_error_background": [218, 30, 40, 255], + "message_error_icon": [255, 255, 255, 255] }, "sizes": { From 722bac63123f5be3e72bdc610bbed779c627134b Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Fri, 23 Jul 2021 12:50:49 +0200 Subject: [PATCH 2/9] Move message icon theme entries close to the rest CURA-7278 --- resources/themes/cura-light/theme.json | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 6b06687e4b..011f32466e 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -363,6 +363,12 @@ "message_close_hover": [8, 7, 63, 255], "message_progressbar_background": [245, 245, 245, 255], "message_progressbar_control": [50, 130, 255, 255], + "message_success_icon_background": [36, 162, 73, 255], + "message_success_icon": [255, 255, 255, 255], + "message_warning_icon_background": [253, 209, 58, 255], + "message_warning_icon": [0, 0, 0, 255], + "message_error_icon_background": [218, 30, 40, 255], + "message_error_icon": [255, 255, 255, 255], "tool_panel_background": [255, 255, 255, 255], @@ -467,15 +473,7 @@ "monitor_carousel_dot_current": [119, 119, 119, 255], "cloud_unavailable": [153, 153, 153, 255], - "connection_badge_background": [255, 255, 255, 255], - - - "message_success_background": [36, 162, 73, 255], - "message_success_icon": [255, 255, 255, 255], - "message_warning_background": [253, 209, 58, 255], - "message_warning_icon": [0, 0, 0, 255], - "message_error_background": [218, 30, 40, 255], - "message_error_icon": [255, 255, 255, 255] + "connection_badge_background": [255, 255, 255, 255] }, "sizes": { From 588916e740fb927fa65773ecee537145856ac106 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Mon, 26 Jul 2021 09:34:31 +0200 Subject: [PATCH 3/9] Use the already existing warning and error colors for the messages According to the review https://github.com/Ultimaker/Cura/pull/10175#pullrequestreview-713677593. CURA-7278 --- resources/themes/cura-light/theme.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 011f32466e..3e15d2ccea 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -241,6 +241,7 @@ "error": [255, 140, 0, 255], "warning": [245, 166, 35, 255], + "success": [36, 162, 73, 255], "disabled": [229, 229, 229, 255], "toolbar_button_hover": [232, 242, 252, 255], @@ -363,11 +364,8 @@ "message_close_hover": [8, 7, 63, 255], "message_progressbar_background": [245, 245, 245, 255], "message_progressbar_control": [50, 130, 255, 255], - "message_success_icon_background": [36, 162, 73, 255], "message_success_icon": [255, 255, 255, 255], - "message_warning_icon_background": [253, 209, 58, 255], "message_warning_icon": [0, 0, 0, 255], - "message_error_icon_background": [218, 30, 40, 255], "message_error_icon": [255, 255, 255, 255], "tool_panel_background": [255, 255, 255, 255], @@ -622,6 +620,7 @@ "message_radius": [0.25, 0.25], "message_action_button": [0, 2.5], "message_image": [15.0, 5.0], + "message_type_icon": [1.5, 1.5], "infill_button_margin": [0.5, 0.5], From 66fb6723dec2890083a16854f97d126f9a0f45d2 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Mon, 26 Jul 2021 10:00:16 +0200 Subject: [PATCH 4/9] Fix error color CURA-7278 --- 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 3e15d2ccea..cdc56cb242 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -239,7 +239,7 @@ "text_scene": [102, 102, 102, 255], "text_scene_hover": [123, 123, 113, 255], - "error": [255, 140, 0, 255], + "error": [218, 30, 40, 255], "warning": [245, 166, 35, 255], "success": [36, 162, 73, 255], "disabled": [229, 229, 229, 255], From d59f745b90faca9564c6e86a9fefb62a38348860 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Mon, 26 Jul 2021 12:12:02 +0200 Subject: [PATCH 5/9] Add the CircleSolid svg CURA-7278 --- resources/themes/cura-light/icons/low/CircleSolid.svg | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 resources/themes/cura-light/icons/low/CircleSolid.svg diff --git a/resources/themes/cura-light/icons/low/CircleSolid.svg b/resources/themes/cura-light/icons/low/CircleSolid.svg new file mode 100644 index 0000000000..20c93fe73e --- /dev/null +++ b/resources/themes/cura-light/icons/low/CircleSolid.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file From 4a8bb4fa3fd5428cf6db078cd7684dbb392d1769 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Mon, 26 Jul 2021 12:12:49 +0200 Subject: [PATCH 6/9] Change the size of the message type icon CURA-7278 --- 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 cdc56cb242..5c17049643 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -620,7 +620,7 @@ "message_radius": [0.25, 0.25], "message_action_button": [0, 2.5], "message_image": [15.0, 5.0], - "message_type_icon": [1.5, 1.5], + "message_type_icon": [2, 2], "infill_button_margin": [0.5, 0.5], From 9c9bccec68eee24107bdc6d9503b3387603274d8 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Mon, 26 Jul 2021 12:14:46 +0200 Subject: [PATCH 7/9] Remove unnecessary tags from the SVGs > The clip-rule property is not supported by Qt. > The fill-rule property is not used in this image since there are no self-intersections. > The fill property is not used in this image, since it is always recoloured. The colour shown here is incorrect (different from what we actually use in the interface). CURA-7278 Co-Authored-By: Ghostkeeper --- resources/themes/cura-light/icons/low/Cancel.svg | 4 ++-- resources/themes/cura-light/icons/low/Check.svg | 4 ++-- resources/themes/cura-light/icons/low/CircleSolid.svg | 4 ++-- resources/themes/cura-light/icons/low/Warning.svg | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/resources/themes/cura-light/icons/low/Cancel.svg b/resources/themes/cura-light/icons/low/Cancel.svg index e5c45c6bdd..6fc1159747 100644 --- a/resources/themes/cura-light/icons/low/Cancel.svg +++ b/resources/themes/cura-light/icons/low/Cancel.svg @@ -1,3 +1,3 @@ - - + + diff --git a/resources/themes/cura-light/icons/low/Check.svg b/resources/themes/cura-light/icons/low/Check.svg index 03348e4bf1..a20a9b1b70 100644 --- a/resources/themes/cura-light/icons/low/Check.svg +++ b/resources/themes/cura-light/icons/low/Check.svg @@ -1,3 +1,3 @@ - - + + diff --git a/resources/themes/cura-light/icons/low/CircleSolid.svg b/resources/themes/cura-light/icons/low/CircleSolid.svg index 20c93fe73e..18f38a2341 100644 --- a/resources/themes/cura-light/icons/low/CircleSolid.svg +++ b/resources/themes/cura-light/icons/low/CircleSolid.svg @@ -1,3 +1,3 @@ - - + + \ No newline at end of file diff --git a/resources/themes/cura-light/icons/low/Warning.svg b/resources/themes/cura-light/icons/low/Warning.svg index 5dc2a04ae3..0def040628 100644 --- a/resources/themes/cura-light/icons/low/Warning.svg +++ b/resources/themes/cura-light/icons/low/Warning.svg @@ -1,3 +1,3 @@ - - + + From 9b42db3a3f3e5fdf6a6e42e5113dabba549cec0c Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Mon, 26 Jul 2021 13:48:33 +0200 Subject: [PATCH 8/9] Change the warning color To a bit of a lighter yellow. CURA-7278 --- 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 5c17049643..6d99b7ae03 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -240,7 +240,7 @@ "text_scene_hover": [123, 123, 113, 255], "error": [218, 30, 40, 255], - "warning": [245, 166, 35, 255], + "warning": [253, 209, 58, 255], "success": [36, 162, 73, 255], "disabled": [229, 229, 229, 255], From ff7b2a673f11541e2cb278b47a59c0fba37ba1c2 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 26 Jul 2021 15:17:54 +0200 Subject: [PATCH 9/9] Add experimental warning and error message types to two messages These are for our testers to be able to test the new message types. Later they will be added to all messages that need them. Contributes to issue CURA-7278. --- cura/Arranging/ArrangeObjectsJob.py | 3 ++- cura/BuildVolume.py | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cura/Arranging/ArrangeObjectsJob.py b/cura/Arranging/ArrangeObjectsJob.py index 46b1aa2d71..e65a442acb 100644 --- a/cura/Arranging/ArrangeObjectsJob.py +++ b/cura/Arranging/ArrangeObjectsJob.py @@ -39,6 +39,7 @@ class ArrangeObjectsJob(Job): no_full_solution_message = Message( i18n_catalog.i18nc("@info:status", "Unable to find a location within the build volume for all objects"), - title = i18n_catalog.i18nc("@info:title", "Can't Find Location")) + title = i18n_catalog.i18nc("@info:title", "Can't Find Location"), + message_type = Message.MessageType.ERROR) no_full_solution_message.show() self.finished.emit(self) diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py index 0c78be7547..cf397e395e 100755 --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -95,9 +95,11 @@ class BuildVolume(SceneNode): self._edge_disallowed_size = None self._build_volume_message = Message(catalog.i18nc("@info:status", - "The build volume height has been reduced due to the value of the" - " \"Print Sequence\" setting to prevent the gantry from colliding" - " with printed models."), title = catalog.i18nc("@info:title", "Build Volume")) + "The build volume height has been reduced due to the value of the" + " \"Print Sequence\" setting to prevent the gantry from colliding" + " with printed models."), + title = catalog.i18nc("@info:title", "Build Volume"), + message_type = Message.MessageType.WARNING) self._global_container_stack = None # type: Optional[GlobalStack]