Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for tooltips in gizmos for macos #12899

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
9 changes: 8 additions & 1 deletion src/slic3r/GUI/Gizmos/GLGizmoSeam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@
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