diff options
| author | DieSkaarj <40402624+DieSkaarj@users.noreply.github.com> | 2022-11-06 17:34:42 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-06 18:34:42 +0100 |
| commit | 38d40365f8d69cc6e60842a71011a184a8fca37e (patch) | |
| tree | 7ddb7e6c5cccc645e625872e35d280aa1a8ae916 /src/Fl_Scroll.cxx | |
| parent | f904f4c4eca104cfb57ae6b904515ecf91dc4db2 (diff) | |
Check for child visibility in Fl_Scroll (#432)
Calculate scroll area only according to visible children.
Note: "visible" means in this context: "not hidden" - as opposed
to being invisible because the widget doesn't have a background
and a label.
Diffstat (limited to 'src/Fl_Scroll.cxx')
| -rw-r--r-- | src/Fl_Scroll.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Fl_Scroll.cxx b/src/Fl_Scroll.cxx index ae7a76e54..f218915a8 100644 --- a/src/Fl_Scroll.cxx +++ b/src/Fl_Scroll.cxx @@ -206,7 +206,7 @@ void Fl_Scroll::recalc_scrollbars(ScrollInfo &si) const { Fl_Widget*const* a = array(); for (int i=children(); i--;) { Fl_Widget* o = *a++; - if ( o==&scrollbar || o==&hscrollbar ) continue; + if ( o==&scrollbar || o==&hscrollbar || o->visible()==0 ) continue; if ( first ) { first = 0; si.child.l = o->x(); |
