mirror of https://github.com/fltk/fltk
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:
parent
f904f4c4ec
commit
38d40365f8
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue