mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 00:34:59 +01:00
Canvas: fix behavior of Rectangle when used in a constraint packer
::size_allocate() sets the _position *and* the "self" rect appropriately
This commit is contained in:
parent
3c2bd05750
commit
28f85747ca
1 changed files with 7 additions and 3 deletions
|
|
@ -288,12 +288,15 @@ Rectangle::vertical_fraction (double y) const
|
|||
void
|
||||
Rectangle::size_allocate (Rect const & r)
|
||||
{
|
||||
/* leave position alone */
|
||||
|
||||
_allocation = r;
|
||||
|
||||
if (_layout_sensitive) {
|
||||
set (r);
|
||||
/* set position, and then set the _rect member with values that
|
||||
use _position as the origin.
|
||||
*/
|
||||
_position = Duple (r.x0, r.y0);
|
||||
Rect r2 (0, 0, r.x1 - r.x0, r.y1 - r.y0);
|
||||
set (r2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -306,3 +309,4 @@ Rectangle::set_corner_radius (double r)
|
|||
_corner_radius = r;
|
||||
end_change ();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue