summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDieSkaarj <40402624+DieSkaarj@users.noreply.github.com>2022-11-06 17:34:42 +0000
committerGitHub <noreply@github.com>2022-11-06 18:34:42 +0100
commit38d40365f8d69cc6e60842a71011a184a8fca37e (patch)
tree7ddb7e6c5cccc645e625872e35d280aa1a8ae916 /src
parentf904f4c4eca104cfb57ae6b904515ecf91dc4db2 (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')
-rw-r--r--src/Fl_Scroll.cxx2
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();