From 8146be5510c76cb6a678cee036bf766dfbfb3c2d Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Wed, 16 Jan 2019 11:51:30 +0100 Subject: [PATCH] Added shortcut strings to gizmos and toolbars tooltips --- src/slic3r/GUI/GLCanvas3D.cpp | 12 ++++++------ src/slic3r/GUI/GLGizmo.cpp | 13 ++++++------- src/slic3r/GUI/KBShortcutsDialog.cpp | 3 +-- src/slic3r/GUI/Plater.cpp | 4 ++-- 4 files changed, 15 insertions(+), 17 deletions(-) diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 93ba79f2c..4e2eae7a6 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -5784,7 +5784,7 @@ bool GLCanvas3D::_init_toolbar() GLToolbarItem::Data item; item.name = "add"; - item.tooltip = GUI::L_str("Add..."); + item.tooltip = GUI::L_str("Add... [Ctrl+I]"); item.sprite_id = 0; item.is_toggable = false; item.action_event = EVT_GLTOOLBAR_ADD; @@ -5792,7 +5792,7 @@ bool GLCanvas3D::_init_toolbar() return false; item.name = "delete"; - item.tooltip = GUI::L_str("Delete"); + item.tooltip = GUI::L_str("Delete [Del]"); item.sprite_id = 1; item.is_toggable = false; item.action_event = EVT_GLTOOLBAR_DELETE; @@ -5800,7 +5800,7 @@ bool GLCanvas3D::_init_toolbar() return false; item.name = "deleteall"; - item.tooltip = GUI::L_str("Delete all"); + item.tooltip = GUI::L_str("Delete all [Ctrl+Del]"); item.sprite_id = 2; item.is_toggable = false; item.action_event = EVT_GLTOOLBAR_DELETE_ALL; @@ -5808,7 +5808,7 @@ bool GLCanvas3D::_init_toolbar() return false; item.name = "arrange"; - item.tooltip = GUI::L_str("Arrange"); + item.tooltip = GUI::L_str("Arrange [A]"); item.sprite_id = 3; item.is_toggable = false; item.action_event = EVT_GLTOOLBAR_ARRANGE; @@ -5819,7 +5819,7 @@ bool GLCanvas3D::_init_toolbar() return false; item.name = "more"; - item.tooltip = GUI::L_str("Add instance"); + item.tooltip = GUI::L_str("Add instance [+]"); item.sprite_id = 4; item.is_toggable = false; item.action_event = EVT_GLTOOLBAR_MORE; @@ -5827,7 +5827,7 @@ bool GLCanvas3D::_init_toolbar() return false; item.name = "fewer"; - item.tooltip = GUI::L_str("Remove instance"); + item.tooltip = GUI::L_str("Remove instance [-]"); item.sprite_id = 5; item.is_toggable = false; item.action_event = EVT_GLTOOLBAR_FEWER; diff --git a/src/slic3r/GUI/GLGizmo.cpp b/src/slic3r/GUI/GLGizmo.cpp index dda89d5f9..a7953572e 100644 --- a/src/slic3r/GUI/GLGizmo.cpp +++ b/src/slic3r/GUI/GLGizmo.cpp @@ -748,7 +748,7 @@ bool GLGizmoRotate3D::on_init() std::string GLGizmoRotate3D::on_get_name() const { - return L("Rotate"); + return L("Rotate [R]"); } void GLGizmoRotate3D::on_start_dragging(const GLCanvas3D::Selection& selection) @@ -838,7 +838,7 @@ bool GLGizmoScale3D::on_init() std::string GLGizmoScale3D::on_get_name() const { - return L("Scale"); + return L("Scale [S]"); } void GLGizmoScale3D::on_start_dragging(const GLCanvas3D::Selection& selection) @@ -1197,7 +1197,7 @@ bool GLGizmoMove3D::on_init() std::string GLGizmoMove3D::on_get_name() const { - return L("Move"); + return L("Move [M]"); } void GLGizmoMove3D::on_start_dragging(const GLCanvas3D::Selection& selection) @@ -1427,7 +1427,7 @@ bool GLGizmoFlatten::on_init() std::string GLGizmoFlatten::on_get_name() const { - return L("Place on face"); + return L("Place on face [F]"); } bool GLGizmoFlatten::on_is_activable(const GLCanvas3D::Selection& selection) const @@ -2240,9 +2240,8 @@ bool GLGizmoSlaSupports::on_is_selectable() const } std::string GLGizmoSlaSupports::on_get_name() const - { - return L("SLA Support Points"); + return L("SLA Support Points [L]"); } @@ -2353,7 +2352,7 @@ bool GLGizmoCut::on_init() std::string GLGizmoCut::on_get_name() const { - return L("Cut"); + return L("Cut [C]"); } void GLGizmoCut::on_set_state() diff --git a/src/slic3r/GUI/KBShortcutsDialog.cpp b/src/slic3r/GUI/KBShortcutsDialog.cpp index 939301635..688cf1af0 100644 --- a/src/slic3r/GUI/KBShortcutsDialog.cpp +++ b/src/slic3r/GUI/KBShortcutsDialog.cpp @@ -120,8 +120,7 @@ void KBShortcutsDialog::fill_shortcuts() main_shortcuts.push_back(Shortcut("+" ,L("Add Instance to selected object "))); main_shortcuts.push_back(Shortcut("-" ,L("Remove Instance from selected object"))); main_shortcuts.push_back(Shortcut("?" ,L("Show keyboard shortcuts list"))); - main_shortcuts.push_back(Shortcut("PgUp/PgDn" ,L("Switch between 3D and Preview"))); - main_shortcuts.push_back(Shortcut("Shift+LeftMouse" ,L("Select multiple object/Move multiple object"))); + main_shortcuts.push_back(Shortcut("Shift+LeftMouse", L("Select multiple object/Move multiple object"))); m_full_shortcuts.emplace(_(L("Main Shortcuts")), main_shortcuts); diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 96a6b1cff..d3dad31e9 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -2490,7 +2490,7 @@ void Plater::priv::init_view_toolbar() GLToolbarItem::Data item; item.name = "3D"; - item.tooltip = GUI::L_str("3D editor view"); + item.tooltip = GUI::L_str("3D editor view [Ctrl+5]"); item.sprite_id = 0; item.action_event = EVT_GLVIEWTOOLBAR_3D; item.is_toggable = false; @@ -2498,7 +2498,7 @@ void Plater::priv::init_view_toolbar() return; item.name = "Preview"; - item.tooltip = GUI::L_str("Preview"); + item.tooltip = GUI::L_str("Preview [Ctrl+6]"); item.sprite_id = 1; item.action_event = EVT_GLVIEWTOOLBAR_PREVIEW; item.is_toggable = false;