mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-18 19:12:17 +00:00
Fix zoom button tooltip width miscalculation (#12692)
wx strings to be converted to utf-8 before doing width calculation for consistency. JIRA-127
This commit is contained in:
@@ -8545,9 +8545,11 @@ void GLCanvas3D::_render_canvas_toolbar()
|
|||||||
zoom_to_selection();
|
zoom_to_selection();
|
||||||
}
|
}
|
||||||
} else if (ImGui::IsItemHovered()) {
|
} else if (ImGui::IsItemHovered()) {
|
||||||
auto tooltip = _L("Fit camera to scene or selected object.");
|
auto tooltip_str_wx = _L("Fit camera to scene or selected object.");
|
||||||
auto width = ImGui::CalcTextSize(tooltip.c_str()).x + imgui.scaled(2.0f);
|
std::string tooltip_str = tooltip_str_wx.ToUTF8().data();
|
||||||
imgui.tooltip(tooltip, width);
|
|
||||||
|
float width = ImGui::CalcTextSize(tooltip_str.c_str()).x + imgui.scaled(2.0f);
|
||||||
|
imgui.tooltip(tooltip_str, width);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user