Fixed the layout of the painting gizmos after the edit icon for sliders was added.

This commit is contained in:
Lukáš Hejl
2021-11-16 15:23:10 +01:00
parent c8049b5cad
commit 751b04a2c1
5 changed files with 53 additions and 23 deletions

View File

@ -483,6 +483,11 @@ void ImGuiWrapper::tooltip(const wxString &label, float wrap_width)
}
#if ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT
ImVec2 ImGuiWrapper::get_slider_icon_size() const
{
return this->calc_button_size(std::wstring(&ImGui::SliderFloatEditBtnIcon, 1));
}
bool ImGuiWrapper::slider_float(const char* label, float* v, float v_min, float v_max, const char* format/* = "%.3f"*/, float power/* = 1.0f*/, bool clamp /*= true*/, const wxString& tooltip /*= ""*/, bool show_edit_btn /*= true*/)
{
const float max_tooltip_width = ImGui::GetFontSize() * 20.0f;