mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
Canvas: make Rectangle work with layouts
This commit is contained in:
parent
e0c58a2736
commit
240cb7b98f
2 changed files with 9 additions and 0 deletions
|
|
@ -37,6 +37,7 @@ public:
|
|||
|
||||
void render (Rect const &, Cairo::RefPtr<Cairo::Context>) const;
|
||||
void compute_bounding_box () const;
|
||||
void size_allocate (Rect const&);
|
||||
|
||||
Rect const & get () const {
|
||||
return _rect;
|
||||
|
|
|
|||
|
|
@ -180,6 +180,8 @@ Rectangle::set (Rect const & r)
|
|||
as cheap to do it when asked.
|
||||
*/
|
||||
|
||||
cerr << name << " setting self rect\n";
|
||||
|
||||
if (r != _rect) {
|
||||
|
||||
begin_change ();
|
||||
|
|
@ -275,3 +277,9 @@ Rectangle::vertical_fraction (double y) const
|
|||
|
||||
return 1.0 - ((i.y - bbox.y0) / bbox.height());
|
||||
}
|
||||
|
||||
void
|
||||
Rectangle::size_allocate (Rect const & r)
|
||||
{
|
||||
set (r);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue