You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (hovered && g.HoveredIdTimer <= WINDOWS_RESIZE_FROM_EDGES_FEEDBACK_TIMER)
5969
5969
hovered = false;
5970
5970
if (hovered || held)
@@ -5983,14 +5983,44 @@ static int ImGui::UpdateWindowManualResize(ImGuiWindow* window, const ImVec2& si
5983
5983
}
5984
5984
else if (held)
5985
5985
{
5986
+
// Switch to relative resizing mode when border geometry moved (e.g. resizing a child altering parent scroll), in order to avoid resizing feedback loop.
5987
+
// Currently only using relative mode on resizable child windows, as the problem to solve is more likely noticeable for them, but could apply for all windows eventually.
5988
+
// FIXME: May want to generalize this idiom at lower-level, so more widgets can use it!
Copy file name to clipboardExpand all lines: imgui_internal.h
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1899,6 +1899,7 @@ struct ImGuiContext
1899
1899
ImGuiWindow* WheelingWindow; // Track the window we started mouse-wheeling on. Until a timer elapse or mouse has moved, generally keep scrolling the same window even if during the course of scrolling the mouse ends up hovering a child window.
1900
1900
ImVec2 WheelingWindowRefMousePos;
1901
1901
int WheelingWindowStartFrame; // This may be set one frame before WheelingWindow is != NULL
1902
+
int WheelingWindowScrolledFrame;
1902
1903
float WheelingWindowReleaseTimer;
1903
1904
ImVec2 WheelingWindowWheelRemainder;
1904
1905
ImVec2 WheelingAxisAvg;
@@ -2091,6 +2092,8 @@ struct ImGuiContext
2091
2092
ImU32 ColorEditSavedColor; // RGB value with alpha set to 0.
2092
2093
ImVec4 ColorPickerRef; // Initial/reference color at the time of opening the color picker.
2093
2094
ImGuiComboPreviewData ComboPreviewData;
2095
+
ImRect WindowResizeBorderExpectedRect; // Expected border rect, switch to relative edit if moving
2096
+
bool WindowResizeRelativeMode;
2094
2097
float SliderGrabClickOffset;
2095
2098
float SliderCurrentAccum; // Accumulated slider delta when using navigation controls.
2096
2099
bool SliderCurrentAccumDirty; // Has the accumulated slider delta changed since last time we tried to apply it?
0 commit comments