Browse Source

Popups: allow Child Popups to be resizable if not explicitly disabling.

pull/7348/head
ocornut 9 months ago
parent
commit
d3f1a7165c
  1. 3
      imgui.cpp

3
imgui.cpp

@ -6758,10 +6758,9 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
#endif
// Handle manual resize: Resize Grips, Borders, Gamepad
// FIXME: _ChildWindow + _Popup windows may want resize grips.
int border_hovered = -1, border_held = -1;
ImU32 resize_grip_col[4] = {};
const int resize_grip_count = (window->Flags & ImGuiWindowFlags_ChildWindow) ? 0 : g.IO.ConfigWindowsResizeFromEdges ? 2 : 1; // Allow resize from lower-left if we have the mouse cursor feedback for it.
const int resize_grip_count = ((flags & ImGuiWindowFlags_ChildWindow) && !(flags & ImGuiWindowFlags_Popup)) ? 0 : g.IO.ConfigWindowsResizeFromEdges ? 2 : 1; // Allow resize from lower-left if we have the mouse cursor feedback for it.
const float resize_grip_draw_size = IM_TRUNC(ImMax(g.FontSize * 1.10f, window->WindowRounding + 1.0f + g.FontSize * 0.2f));
if (!window->Collapsed)
if (int auto_fit_mask = UpdateWindowManualResize(window, size_auto_fit, &border_hovered, &border_held, resize_grip_count, &resize_grip_col[0], visibility_rect))

Loading…
Cancel
Save