Fix scroller position after reshape
This commit is contained in:
parent
3f5735e10f
commit
2906e31634
1 changed files with 9 additions and 0 deletions
|
|
@ -224,6 +224,15 @@ namespace psemek::ui
|
|||
child_bbox[0].max = child_bbox[0].min + child_constraints[0].min;
|
||||
}
|
||||
|
||||
{
|
||||
auto old_shift = shift_tgt_;
|
||||
clamp_shift();
|
||||
if (shift_tgt_[0] != old_shift[0])
|
||||
shift_[0] = shift_tgt_[0];
|
||||
if (shift_tgt_[1] != old_shift[1])
|
||||
shift_[1] = shift_tgt_[1];
|
||||
}
|
||||
|
||||
if (horizontal_scroll())
|
||||
child_bbox[0] += shift_[0];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue