|
|
@ -6018,8 +6018,13 @@ static int ImGui::UpdateWindowManualResize(ImGuiWindow* window, const ImVec2& si |
|
|
|
ImVec2 clamp_min(border_n == ImGuiDir_Right ? clamp_rect.Min.x : -FLT_MAX, border_n == ImGuiDir_Down || (border_n == ImGuiDir_Up && window_move_from_title_bar) ? clamp_rect.Min.y : -FLT_MAX); |
|
|
|
ImVec2 clamp_min(border_n == ImGuiDir_Right ? clamp_rect.Min.x : -FLT_MAX, border_n == ImGuiDir_Down || (border_n == ImGuiDir_Up && window_move_from_title_bar) ? clamp_rect.Min.y : -FLT_MAX); |
|
|
|
ImVec2 clamp_max(border_n == ImGuiDir_Left ? clamp_rect.Max.x : +FLT_MAX, border_n == ImGuiDir_Up ? clamp_rect.Max.y : +FLT_MAX); |
|
|
|
ImVec2 clamp_max(border_n == ImGuiDir_Left ? clamp_rect.Max.x : +FLT_MAX, border_n == ImGuiDir_Up ? clamp_rect.Max.y : +FLT_MAX); |
|
|
|
border_target = ImClamp(border_target, clamp_min, clamp_max); |
|
|
|
border_target = ImClamp(border_target, clamp_min, clamp_max); |
|
|
|
if (window->Flags & ImGuiWindowFlags_ChildWindow) // Clamp resizing of childs within parent
|
|
|
|
if (flags & ImGuiWindowFlags_ChildWindow) // Clamp resizing of childs within parent
|
|
|
|
border_target = ImClamp(border_target, window->ParentWindow->InnerClipRect.Min, window->ParentWindow->InnerClipRect.Max); |
|
|
|
{ |
|
|
|
|
|
|
|
if ((flags & (ImGuiWindowFlags_HorizontalScrollbar | ImGuiWindowFlags_AlwaysHorizontalScrollbar)) == 0 || (flags & ImGuiWindowFlags_NoScrollbar)) |
|
|
|
|
|
|
|
border_target.x = ImClamp(border_target.x, window->ParentWindow->InnerClipRect.Min.x, window->ParentWindow->InnerClipRect.Max.x); |
|
|
|
|
|
|
|
if (flags & ImGuiWindowFlags_NoScrollbar) |
|
|
|
|
|
|
|
border_target.y = ImClamp(border_target.y, window->ParentWindow->InnerClipRect.Min.y, window->ParentWindow->InnerClipRect.Max.y); |
|
|
|
|
|
|
|
} |
|
|
|
if (!ignore_resize) |
|
|
|
if (!ignore_resize) |
|
|
|
CalcResizePosSizeFromAnyCorner(window, border_target, ImMin(def.SegmentN1, def.SegmentN2), &pos_target, &size_target); |
|
|
|
CalcResizePosSizeFromAnyCorner(window, border_target, ImMin(def.SegmentN1, def.SegmentN2), &pos_target, &size_target); |
|
|
|
} |
|
|
|
} |
|
|
|