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.
This commit is contained in:
DieSkaarj 2022-11-06 17:34:42 +00:00 committed by GitHub
parent f904f4c4ec
commit 38d40365f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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();