Fixed collapsing header border (if borders are enabled) being off the clip rectangle.
Tweak demo window.
This commit is contained in:
parent
b90d0c558d
commit
5a9639b423
13
imgui.cpp
13
imgui.cpp
@ -2887,8 +2887,8 @@ bool CollapsingHeader(const char* label, const char* str_id, const bool display_
|
||||
ImGuiAabb bb = ImGuiAabb(pos_min, ImVec2(pos_max.x, pos_min.y + text_size.y));
|
||||
if (display_frame)
|
||||
{
|
||||
bb.Min.x -= window_padding.x*0.5f;
|
||||
bb.Max.x += window_padding.x*0.5f;
|
||||
bb.Min.x -= window_padding.x*0.5f - 1;
|
||||
bb.Max.x += window_padding.x*0.5f - 1;
|
||||
bb.Max.y += style.FramePadding.y * 2;
|
||||
}
|
||||
|
||||
@ -5510,10 +5510,10 @@ void ShowTestWindow(bool* open)
|
||||
|
||||
if (ImGui::CollapsingHeader("Window options"))
|
||||
{
|
||||
ImGui::Checkbox("no titlebar", &no_titlebar); ImGui::SameLine(200);
|
||||
ImGui::Checkbox("no border", &no_border); ImGui::SameLine(400);
|
||||
ImGui::Checkbox("no titlebar", &no_titlebar); ImGui::SameLine(150);
|
||||
ImGui::Checkbox("no border", &no_border); ImGui::SameLine(300);
|
||||
ImGui::Checkbox("no resize", &no_resize);
|
||||
ImGui::Checkbox("no move", &no_move); ImGui::SameLine(200);
|
||||
ImGui::Checkbox("no move", &no_move); ImGui::SameLine(150);
|
||||
ImGui::Checkbox("no scrollbar", &no_scrollbar);
|
||||
ImGui::SliderFloat("fill alpha", &fill_alpha, 0.0f, 1.0f);
|
||||
if (ImGui::TreeNode("Style Editor"))
|
||||
@ -5596,6 +5596,9 @@ void ShowTestWindow(bool* open)
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
ImGui::Text("^ Horizontal separator");
|
||||
|
||||
static int item = 1;
|
||||
ImGui::Combo("combo", &item, "aaaa\0bbbb\0cccc\0dddd\0eeee\0\0");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user