Skip to content

Commit

Permalink
fix 12898
Browse files Browse the repository at this point in the history
  • Loading branch information
Yornik committed Jun 24, 2024
1 parent e10e817 commit 4535b5c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
9 changes: 8 additions & 1 deletion src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@

namespace Slic3r::GUI {

static const std::string CTRL_STR =
#ifdef __APPLE__
"⌘ + "
#else
"Ctrl + "
#endif //__APPLE__
;


void GLGizmoFdmSupports::on_shutdown()
Expand Down Expand Up @@ -324,7 +331,7 @@ void GLGizmoFdmSupports::on_render_input_window(float x, float y, float bottom_l
auto clp_dist = float(m_c->object_clipper()->get_position());
ImGui::SameLine(sliders_left_width);
ImGui::PushItemWidth(window_width - sliders_left_width - slider_icon_width);
if (m_imgui->slider_float("##clp_dist", &clp_dist, 0.f, 1.f, "%.2f", 1.0f, true, _L("Ctrl + Mouse wheel")))
if (m_imgui->slider_float("##clp_dist", &clp_dist, 0.f, 1.f, "%.2f", 1.0f, true, _L(CTRL_STR + "Mouse wheel")))
m_c->object_clipper()->set_position_by_ratio(clp_dist, true);

ImGui::Separator();
Expand Down
9 changes: 8 additions & 1 deletion src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@
#include <GL/glew.h>

namespace Slic3r::GUI {
istatic const std::string CTRL_STR =
#ifdef __APPLE__
"⌘ + "
#else
"Ctrl + "
#endif //__APPLE__
;

static inline void show_notification_extruders_limit_exceeded()
{
Expand Down Expand Up @@ -477,7 +484,7 @@ void GLGizmoMmuSegmentation::on_render_input_window(float x, float y, float bott
auto clp_dist = float(m_c->object_clipper()->get_position());
ImGui::SameLine(sliders_left_width);
ImGui::PushItemWidth(window_width - sliders_left_width - slider_icon_width);
if (m_imgui->slider_float("##clp_dist", &clp_dist, 0.f, 1.f, "%.2f", 1.0f, true, _L("Ctrl + Mouse wheel")))
if (m_imgui->slider_float("##clp_dist", &clp_dist, 0.f, 1.f, "%.2f", 1.0f, true, _L(CTRL_STR+"Mouse wheel")))
m_c->object_clipper()->set_position_by_ratio(clp_dist, true);

ImGui::Separator();
Expand Down
11 changes: 9 additions & 2 deletions src/slic3r/GUI/Gizmos/GLGizmoSeam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@

namespace Slic3r::GUI {



istatic const std::string CTRL_STR =
#ifdef __APPLE__
"⌘ + "
#else
"Ctrl + "
#endif //__APPLE__
;

void GLGizmoSeam::on_shutdown()
{
Expand Down Expand Up @@ -168,7 +175,7 @@ void GLGizmoSeam::on_render_input_window(float x, float y, float bottom_limit)
auto clp_dist = float(m_c->object_clipper()->get_position());
ImGui::SameLine(sliders_left_width);
ImGui::PushItemWidth(window_width - sliders_left_width - slider_icon_width);
if (m_imgui->slider_float("##clp_dist", &clp_dist, 0.f, 1.f, "%.2f", 1.0f, true, _L("Ctrl + Mouse wheel")))
if (m_imgui->slider_float("##clp_dist", &clp_dist, 0.f, 1.f, "%.2f", 1.0f, true, _L(CTRL_STR+"Mouse wheel")))
m_c->object_clipper()->set_position_by_ratio(clp_dist, true);

ImGui::Separator();
Expand Down

0 comments on commit 4535b5c

Please sign in to comment.