File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ Breaking Changes:
43
43
44
44
Other Changes:
45
45
- Window: Fixed InnerClipRect right-most coordinates using wrong padding setting (introduced in 1.71).
46
+ - Scrollbar: Avoid overlapping the opposite side when window (often a child window) is forcibly too small.
46
47
- Word-wrapping: Fixed overzealous word-wrapping when glyph edge lands exactly on the limit. Because
47
48
of this, auto-fitting exactly unwrapped text would make it wrap. (fixes initial 1.15 commit, 78645a7d).
48
49
- Scrolling: Added SetScrollHereX(), SetScrollFromPosX() for completeness. (#1580) [@kevreco]
Original file line number Diff line number Diff line change @@ -2079,8 +2079,8 @@ static void ShowDemoWindowLayout()
2079
2079
2080
2080
ImGuiStyle& style = ImGui::GetStyle ();
2081
2081
float child_w = (ImGui::GetContentRegionAvail ().x - 4 * style.ItemSpacing .x ) / 5 ;
2082
- if (child_w < 20 .0f )
2083
- child_w = 20 .0f ;
2082
+ if (child_w < 1 .0f )
2083
+ child_w = 1 .0f ;
2084
2084
ImGui::PushID (" ##VerticalScrolling" );
2085
2085
for (int i = 0 ; i < 5 ; i++)
2086
2086
{
Original file line number Diff line number Diff line change @@ -895,13 +895,13 @@ void ImGui::Scrollbar(ImGuiAxis axis)
895
895
ImRect bb;
896
896
if (axis == ImGuiAxis_X)
897
897
{
898
- bb.Min = ImVec2 (inner_rect.Min .x , outer_rect.Max .y - border_size - scrollbar_size);
898
+ bb.Min = ImVec2 (inner_rect.Min .x , ImMax ( outer_rect.Min . y , outer_rect. Max .y - border_size - scrollbar_size) );
899
899
bb.Max = ImVec2 (inner_rect.Max .x , outer_rect.Max .y );
900
900
rounding_corners |= ImDrawCornerFlags_BotLeft;
901
901
}
902
902
else
903
903
{
904
- bb.Min = ImVec2 (outer_rect.Max .x - border_size - scrollbar_size, inner_rect.Min .y );
904
+ bb.Min = ImVec2 (ImMax ( outer_rect.Min . x , outer_rect. Max .x - border_size - scrollbar_size) , inner_rect.Min .y );
905
905
bb.Max = ImVec2 (outer_rect.Max .x , window->InnerRect .Max .y );
906
906
rounding_corners |= ((window->Flags & ImGuiWindowFlags_NoTitleBar) && !(window->Flags & ImGuiWindowFlags_MenuBar)) ? ImDrawCornerFlags_TopRight : 0 ;
907
907
}
You can’t perform that action at this time.
0 commit comments