Fix several imgui UTF8 related issues (#11078)
Some checks are pending
Build all / Build All (push) Waiting to run
Build all / Flatpak (push) Waiting to run

* FIX:add  tooltip(const std::string &label, float wrap_width) api

jira: none
Change-Id: I2372f57177a362f540e509747552a4a27f23fe8f
(cherry picked from commit 9d690cddd60245cd3c16498e6c83183ec8446241)

* Fix crash when rendering text icons

---------

Co-authored-by: zhou.xu <zhou.xu@bambulab.com>
This commit is contained in:
Noisyfox 2025-10-18 19:17:50 +08:00 committed by GitHub
parent e20113402c
commit f12602c0bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 1 deletions

View file

@ -4478,7 +4478,7 @@ void GCodeViewer::render_legend(float &legend_height, int canvas_width, int canv
ImGui::SameLine(checkbox_pos);
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(0.0, 0.0)); // ensure no padding active
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0.0, 0.0)); // ensure no item spacing active
ImGui::Text(into_u8(visible ? ImGui::VisibleIcon : ImGui::HiddenIcon).c_str(), ImVec2(16 * m_scale, 16 * m_scale));
ImGui::Text("%s", into_u8(visible ? ImGui::VisibleIcon : ImGui::HiddenIcon).c_str());
ImGui::PopStyleVar(2);
}
}