mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 19:56:31 +01:00
gtkmm: use size_request() function instead of deprecated Gtk::Widget::size_request(&)
This commit is contained in:
parent
7f649efd42
commit
cb4e10683d
7 changed files with 11 additions and 15 deletions
|
|
@ -127,8 +127,7 @@ Widget::compute_bounding_box () const
|
|||
if (_allocation) {
|
||||
_bounding_box = Rect (0, 0, _allocation.width(), _allocation.height());
|
||||
} else {
|
||||
GtkRequisition req = { 0, 0 };
|
||||
_widget.size_request (req);
|
||||
GtkRequisition req = _widget.size_request ();
|
||||
_bounding_box = Rect (0., 0., req.width, req.height);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ Frame::on_size_request (GtkRequisition* r)
|
|||
}
|
||||
|
||||
if (_w) {
|
||||
_w->size_request (*r);
|
||||
*r = _w->size_request ();
|
||||
} else {
|
||||
r->width = 0;
|
||||
r->height = 0;
|
||||
|
|
|
|||
|
|
@ -101,13 +101,11 @@ Pane::on_size_request (GtkRequisition* req)
|
|||
}
|
||||
|
||||
for (Children::iterator c = children.begin(); c != children.end(); ++c) {
|
||||
GtkRequisition r;
|
||||
|
||||
if (!(*c)->w->get_visible ()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
(*c)->w->size_request (r);
|
||||
GtkRequisition r = (*c)->w->size_request ();
|
||||
|
||||
if (horizontal) {
|
||||
largest.height = max (largest.height, r.height);
|
||||
|
|
@ -300,8 +298,7 @@ Pane::reallocate (Gtk::Allocation const & alloc)
|
|||
fract = (*div)->fract;
|
||||
}
|
||||
|
||||
Gtk::Requisition cr;
|
||||
(*child)->w->size_request (cr);
|
||||
Gtk::Requisition cr = (*child)->w->size_request ();
|
||||
|
||||
if (horizontal) {
|
||||
child_alloc.set_width ((gint) floor (remaining * fract));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue