mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-23 21:09:01 +08:00
Fix for latest
This commit is contained in:
parent
8ce47f82b4
commit
4bd4b41e73
@ -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);
|
||||
|
@ -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…
Reference in New Issue
Block a user