mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-15 17:45:57 +08:00
Measuring - Gizmo measure - Disable background fadeout animation when showing imgui modal dialog to edit distance
This commit is contained in:
parent
1a0294e892
commit
5ebfa73f37
@ -903,6 +903,7 @@ void GLGizmoMeasure::render_dimensioning()
|
|||||||
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, { 1.0f, 1.0f });
|
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, { 1.0f, 1.0f });
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, { 4.0f, 0.0f });
|
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, { 4.0f, 0.0f });
|
||||||
if (ImGui::BeginPopupModal("distance_popup", nullptr, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoDecoration)) {
|
if (ImGui::BeginPopupModal("distance_popup", nullptr, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoDecoration)) {
|
||||||
|
m_imgui->disable_background_fadeout_animation();
|
||||||
ImGui::PushItemWidth(value_str_width);
|
ImGui::PushItemWidth(value_str_width);
|
||||||
if (ImGui::InputDouble("##distance", &edit_value, 0.0f, 0.0f, "%.3f")) {
|
if (ImGui::InputDouble("##distance", &edit_value, 0.0f, 0.0f, "%.3f")) {
|
||||||
}
|
}
|
||||||
|
@ -1145,6 +1145,13 @@ ImFontAtlasCustomRect* ImGuiWrapper::GetTextureCustomRect(const wchar_t& tex_id)
|
|||||||
}
|
}
|
||||||
#endif // ENABLE_LEGEND_TOOLBAR_ICONS
|
#endif // ENABLE_LEGEND_TOOLBAR_ICONS
|
||||||
|
|
||||||
|
#if ENABLE_MEASURE_GIZMO
|
||||||
|
void ImGuiWrapper::disable_background_fadeout_animation()
|
||||||
|
{
|
||||||
|
GImGui->DimBgRatio = 1.0f;
|
||||||
|
}
|
||||||
|
#endif // ENABLE_MEASURE_GIZMO
|
||||||
|
|
||||||
ImU32 ImGuiWrapper::to_ImU32(const ColorRGBA& color)
|
ImU32 ImGuiWrapper::to_ImU32(const ColorRGBA& color)
|
||||||
{
|
{
|
||||||
return ImGui::GetColorU32({ color.r(), color.g(), color.b(), color.a() });
|
return ImGui::GetColorU32({ color.r(), color.g(), color.b(), color.a() });
|
||||||
|
@ -136,6 +136,10 @@ public:
|
|||||||
void set_requires_extra_frame() { m_requires_extra_frame = true; }
|
void set_requires_extra_frame() { m_requires_extra_frame = true; }
|
||||||
void reset_requires_extra_frame() { m_requires_extra_frame = false; }
|
void reset_requires_extra_frame() { m_requires_extra_frame = false; }
|
||||||
|
|
||||||
|
#if ENABLE_MEASURE_GIZMO
|
||||||
|
void disable_background_fadeout_animation();
|
||||||
|
#endif // ENABLE_MEASURE_GIZMO
|
||||||
|
|
||||||
static ImU32 to_ImU32(const ColorRGBA& color);
|
static ImU32 to_ImU32(const ColorRGBA& color);
|
||||||
static ImVec4 to_ImVec4(const ColorRGBA& color);
|
static ImVec4 to_ImVec4(const ColorRGBA& color);
|
||||||
static ColorRGBA from_ImU32(const ImU32& color);
|
static ColorRGBA from_ImU32(const ImU32& color);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user