瀏覽代碼

Windows: extend outer resize borders to the edges when there are no corner grips. (#7440, #1710)

cfillion 1 年之前
父節點
當前提交
976dc23965
共有 2 個文件被更改,包括 3 次插入1 次删除
  1. 2 0
      docs/CHANGELOG.txt
  2. 1 1
      imgui.cpp

+ 2 - 0
docs/CHANGELOG.txt

@@ -55,6 +55,8 @@ Other changes:
 - Windows: Scrollbar visibility decision uses current size when both size and contents
   size are submitted by API. (#7252)
 - Windows: Double-click to collapse may be disabled via key-ownership mechanism. (#7369)
+- Windows: Extend outer resize borders to the edges when there are no corner grips.
+  Essentially affects resizable child windows. (#7440, #1710) [@cfillion]
 - Tables: Angled headers: fixed border hit box extending beyond when used within
   non-scrollable tables. (#7416) [@cfillion]
 - Tables: Angled headers: fixed borders not moving back up after TableAngleHeadersRow()

+ 1 - 1
imgui.cpp

@@ -5901,7 +5901,7 @@ static int ImGui::UpdateWindowManualResize(ImGuiWindow* window, const ImVec2& si
 
     int ret_auto_fit_mask = 0x00;
     const float grip_draw_size = IM_TRUNC(ImMax(g.FontSize * 1.35f, window->WindowRounding + 1.0f + g.FontSize * 0.2f));
-    const float grip_hover_inner_size = IM_TRUNC(grip_draw_size * 0.75f);
+    const float grip_hover_inner_size = (resize_grip_count > 0) ? IM_TRUNC(grip_draw_size * 0.75f) : 0.0f;
     const float grip_hover_outer_size = g.IO.ConfigWindowsResizeFromEdges ? WINDOWS_HOVER_PADDING : 0.0f;
 
     ImRect clamp_rect = visibility_rect;