From 319a48f42df9ee99ab70d4fbeb07156442071a3b Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Mon, 4 Mar 2019 14:21:52 +0100 Subject: [PATCH] Added svg icons for view toolbar and gismos --- resources/icons/cut.svg | 28 +++++++++++++++++++ resources/icons/editor.svg | 20 +++++++++++++ resources/icons/move.svg | 42 ++++++++++++++++++++++++++++ resources/icons/place.svg | 32 +++++++++++++++++++++ resources/icons/preview.svg | 48 ++++++++++++++++++++++++++++++++ resources/icons/rotate.svg | 25 +++++++++++++++++ resources/icons/scale.svg | 38 +++++++++++++++++++++++++ resources/icons/sla_supports.svg | 42 ++++++++++++++++++++++++++++ src/slic3r/GUI/GLCanvas3D.cpp | 12 ++++---- src/slic3r/GUI/Plater.cpp | 4 +-- 10 files changed, 283 insertions(+), 8 deletions(-) create mode 100644 resources/icons/cut.svg create mode 100644 resources/icons/editor.svg create mode 100644 resources/icons/move.svg create mode 100644 resources/icons/place.svg create mode 100644 resources/icons/preview.svg create mode 100644 resources/icons/rotate.svg create mode 100644 resources/icons/scale.svg create mode 100644 resources/icons/sla_supports.svg diff --git a/resources/icons/cut.svg b/resources/icons/cut.svg new file mode 100644 index 000000000..c5c952742 --- /dev/null +++ b/resources/icons/cut.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + diff --git a/resources/icons/editor.svg b/resources/icons/editor.svg new file mode 100644 index 000000000..5866ce055 --- /dev/null +++ b/resources/icons/editor.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + diff --git a/resources/icons/move.svg b/resources/icons/move.svg new file mode 100644 index 000000000..019ea8ca7 --- /dev/null +++ b/resources/icons/move.svg @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/place.svg b/resources/icons/place.svg new file mode 100644 index 000000000..6acc2451e --- /dev/null +++ b/resources/icons/place.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/preview.svg b/resources/icons/preview.svg new file mode 100644 index 000000000..658bba2c6 --- /dev/null +++ b/resources/icons/preview.svg @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/rotate.svg b/resources/icons/rotate.svg new file mode 100644 index 000000000..508c4f39d --- /dev/null +++ b/resources/icons/rotate.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + diff --git a/resources/icons/scale.svg b/resources/icons/scale.svg new file mode 100644 index 000000000..ee9cef95a --- /dev/null +++ b/resources/icons/scale.svg @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/sla_supports.svg b/resources/icons/sla_supports.svg new file mode 100644 index 000000000..119fb6afc --- /dev/null +++ b/resources/icons/sla_supports.svg @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 4fba8009a..95c010c45 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -2476,7 +2476,7 @@ bool GLCanvas3D::Gizmos::init(GLCanvas3D& parent) } #if ENABLE_SVG_ICONS - GLGizmoBase* gizmo = new GLGizmoMove3D(parent, "add.svg", 0); + GLGizmoBase* gizmo = new GLGizmoMove3D(parent, "move.svg", 0); #else GLGizmoBase* gizmo = new GLGizmoMove3D(parent, 0); #endif // ENABLE_SVG_ICONS @@ -2489,7 +2489,7 @@ bool GLCanvas3D::Gizmos::init(GLCanvas3D& parent) m_gizmos.insert(GizmosMap::value_type(Move, gizmo)); #if ENABLE_SVG_ICONS - gizmo = new GLGizmoScale3D(parent, "remove.svg", 1); + gizmo = new GLGizmoScale3D(parent, "scale.svg", 1); #else gizmo = new GLGizmoScale3D(parent, 1); #endif // ENABLE_SVG_ICONS @@ -2502,7 +2502,7 @@ bool GLCanvas3D::Gizmos::init(GLCanvas3D& parent) m_gizmos.insert(GizmosMap::value_type(Scale, gizmo)); #if ENABLE_SVG_ICONS - gizmo = new GLGizmoRotate3D(parent, "delete_all.svg", 2); + gizmo = new GLGizmoRotate3D(parent, "rotate.svg", 2); #else gizmo = new GLGizmoRotate3D(parent, 2); #endif // ENABLE_SVG_ICONS @@ -2521,7 +2521,7 @@ bool GLCanvas3D::Gizmos::init(GLCanvas3D& parent) m_gizmos.insert(GizmosMap::value_type(Rotate, gizmo)); #if ENABLE_SVG_ICONS - gizmo = new GLGizmoFlatten(parent, "arrange.svg", 3); + gizmo = new GLGizmoFlatten(parent, "place.svg", 3); #else gizmo = new GLGizmoFlatten(parent, 3); #endif // ENABLE_SVG_ICONS @@ -2536,7 +2536,7 @@ bool GLCanvas3D::Gizmos::init(GLCanvas3D& parent) m_gizmos.insert(GizmosMap::value_type(Flatten, gizmo)); #if ENABLE_SVG_ICONS - gizmo = new GLGizmoCut(parent, "instance_add.svg", 4); + gizmo = new GLGizmoCut(parent, "cut.svg", 4); #else gizmo = new GLGizmoCut(parent, 4); #endif // ENABLE_SVG_ICONS @@ -2551,7 +2551,7 @@ bool GLCanvas3D::Gizmos::init(GLCanvas3D& parent) m_gizmos.insert(GizmosMap::value_type(Cut, gizmo)); #if ENABLE_SVG_ICONS - gizmo = new GLGizmoSlaSupports(parent, "instance_remove.svg", 5); + gizmo = new GLGizmoSlaSupports(parent, "sla_supports.svg", 5); #else gizmo = new GLGizmoSlaSupports(parent, 5); #endif // ENABLE_SVG_ICONS diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index dccfa61a8..661af87f6 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -2656,7 +2656,7 @@ void Plater::priv::init_view_toolbar() item.name = "3D"; #if ENABLE_SVG_ICONS - item.icon_filename = "add.svg"; + item.icon_filename = "editor.svg"; #endif // ENABLE_SVG_ICONS item.tooltip = GUI::L_str("3D editor view") + " [" + GUI::shortkey_ctrl_prefix() + "5]"; item.sprite_id = 0; @@ -2667,7 +2667,7 @@ void Plater::priv::init_view_toolbar() item.name = "Preview"; #if ENABLE_SVG_ICONS - item.icon_filename = "remove.svg"; + item.icon_filename = "preview.svg"; #endif // ENABLE_SVG_ICONS item.tooltip = GUI::L_str("Preview") + " [" + GUI::shortkey_ctrl_prefix() + "6]"; item.sprite_id = 1;