Browse Source

Fix for latest

external/win98
ocornut 5 months ago
parent
commit
4bd4b41e73
  1. 4
      imgui.cpp
  2. 4
      imgui_widgets.cpp

4
imgui.cpp

@ -6418,8 +6418,8 @@ void ImGui::RenderWindowTitleBarContents(ImGuiWindow* window, const ImRect& titl
#ifdef WIN98 // windows style title bar
close_button_pos += ImVec2(0.0f, 2.0f);
collapse_button_pos += ImVec2(0.0f, 2.0f);
close_button_pos += ImVec2(-2.0f, -2.0f);
collapse_button_pos += ImVec2(-2.0f, -2.0f);
ImU32 col_left = IM_COL32(128,128,128,255);
ImU32 col_right = IM_COL32(181,181,181,255);

4
imgui_widgets.cpp

@ -6640,6 +6640,10 @@ bool ImGui::CollapsingHeader(const char* label, bool* p_visible, ImGuiTreeNodeFl
float button_size = g.FontSize;
float button_x = ImMax(g.LastItemData.Rect.Min.x, g.LastItemData.Rect.Max.x - g.Style.FramePadding.x - button_size);
float button_y = g.LastItemData.Rect.Min.y + g.Style.FramePadding.y;
#ifdef WIN98
button_x -= 4;
button_y -= 1;
#endif
ImGuiID close_button_id = GetIDWithSeed("#CLOSE", NULL, id);
if (CloseButton(close_button_id, ImVec2(button_x, button_y)))
*p_visible = false;

Loading…
Cancel
Save