Port matrix useability fix.
When a page has changed, leave the adjustment where it is on the axis whose size remains the same. On the changed axis, set the scroller to zero.
This commit is contained in:
@@ -248,17 +248,26 @@ PortMatrix::setup_scrollbars ()
|
||||
{
|
||||
Adjustment* a = _hscroll.get_adjustment ();
|
||||
a->set_lower (0);
|
||||
a->set_upper (_body->full_scroll_width());
|
||||
a->set_page_size (_body->alloc_scroll_width());
|
||||
a->set_step_increment (32);
|
||||
a->set_page_increment (128);
|
||||
|
||||
/* Set the adjustment to zero if the size has changed.*/
|
||||
if (a->get_upper() != _body->full_scroll_width()) {
|
||||
a->set_upper (_body->full_scroll_width());
|
||||
a->set_value (0);
|
||||
}
|
||||
|
||||
a = _vscroll.get_adjustment ();
|
||||
a->set_lower (0);
|
||||
a->set_upper (_body->full_scroll_height());
|
||||
a->set_page_size (_body->alloc_scroll_height());
|
||||
a->set_step_increment (32);
|
||||
a->set_page_increment (128);
|
||||
|
||||
if (a->get_upper() != _body->full_scroll_height()) {
|
||||
a->set_upper (_body->full_scroll_height());
|
||||
a->set_value (0);
|
||||
}
|
||||
}
|
||||
|
||||
/** Disassociate all of our ports from each other */
|
||||
|
||||
Reference in New Issue
Block a user