Canvas: make Rectangle work with layouts
This commit is contained in:
parent
e0c58a2736
commit
240cb7b98f
|
@ -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…
Reference in New Issue
Block a user