mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-12 00:14:20 +00:00
Merge branch 'master' into docking
# Conflicts: # imgui_demo.cpp
This commit is contained in:
commit
eaac68ca2c
4 changed files with 227 additions and 202 deletions
11
imgui.cpp
11
imgui.cpp
|
|
@ -8062,12 +8062,6 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|||
window->InnerClipRect.Max.y = ImFloor(window->InnerRect.Max.y - window->WindowBorderSize * 0.5f);
|
||||
window->InnerClipRect.ClipWithFull(host_rect);
|
||||
|
||||
// Default item width. Make it proportional to window size if window manually resizes
|
||||
if (window->Size.x > 0.0f && !(flags & ImGuiWindowFlags_Tooltip) && !(flags & ImGuiWindowFlags_AlwaysAutoResize))
|
||||
window->ItemWidthDefault = ImTrunc(window->Size.x * 0.65f);
|
||||
else
|
||||
window->ItemWidthDefault = ImTrunc(g.FontSize * 16.0f);
|
||||
|
||||
// SCROLLING
|
||||
|
||||
// Lock down maximum scrolling
|
||||
|
|
@ -8181,6 +8175,11 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|||
window->DC.LayoutType = ImGuiLayoutType_Vertical;
|
||||
window->DC.ParentLayoutType = parent_window ? parent_window->DC.LayoutType : ImGuiLayoutType_Vertical;
|
||||
|
||||
// Default item width. Make it proportional to window size if window manually resizes
|
||||
if (window->Size.x > 0.0f && !(flags & ImGuiWindowFlags_Tooltip) && !(flags & ImGuiWindowFlags_AlwaysAutoResize))
|
||||
window->ItemWidthDefault = ImTrunc(window->Size.x * 0.65f);
|
||||
else
|
||||
window->ItemWidthDefault = ImTrunc(g.FontSize * 16.0f);
|
||||
window->DC.ItemWidth = window->ItemWidthDefault;
|
||||
window->DC.TextWrapPos = -1.0f; // disabled
|
||||
window->DC.ItemWidthStack.resize(0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue