mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-06 04:58:47 +02:00
Scrollbar: Avoid overlapping the opposite side when window (often a child window) is forcibly too small.
This commit is contained in:
@ -2079,8 +2079,8 @@ static void ShowDemoWindowLayout()
|
||||
|
||||
ImGuiStyle& style = ImGui::GetStyle();
|
||||
float child_w = (ImGui::GetContentRegionAvail().x - 4 * style.ItemSpacing.x) / 5;
|
||||
if (child_w < 20.0f)
|
||||
child_w = 20.0f;
|
||||
if (child_w < 1.0f)
|
||||
child_w = 1.0f;
|
||||
ImGui::PushID("##VerticalScrolling");
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
|
Reference in New Issue
Block a user