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 63b8545
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
10 changes: 8 additions & 2 deletions 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 All @@ -43,7 +50,6 @@ std::string GLGizmoFdmSupports::on_get_name() const
}



bool GLGizmoFdmSupports::on_init()
{
m_shortcut_key = WXK_CONTROL_L;
Expand Down Expand Up @@ -324,7 +330,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
10 changes: 9 additions & 1 deletion src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@

namespace Slic3r::GUI {

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

static inline void show_notification_extruders_limit_exceeded()
{
wxGetApp()
Expand Down Expand Up @@ -477,7 +485,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 63b8545

Please sign in to comment.