Browse Source

Merge pull request #142 from Roflraging/master

Fix SetColumnOffset() subtracting a bool value instead of scrollbar width
omar 10 năm trước cách đây
mục cha
commit
fd6d6692cf
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      imgui.cpp

+ 1 - 1
imgui.cpp

@@ -6378,7 +6378,7 @@ void ImGui::SetColumnOffset(int column_index, float offset)
     const ImGuiID column_id = window->DC.ColumnsSetID + ImGuiID(column_index);
 
     const float min_x = window->DC.ColumnsStartX;
-    const float max_x = window->Size.x - (window->ScrollbarY);// - window->WindowPadding().x;
+    const float max_x = window->Size.x - (g.Style.ScrollBarWidth);// - window->WindowPadding().x;
     const float t = (offset - min_x) / (max_x - min_x);
     window->StateStorage.SetFloat(column_id, t);
     window->DC.ColumnsOffsetsT[column_index] = t;