mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 23:35:03 +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
|
|
@ -1138,7 +1138,7 @@ AUPluginUI::parent_cocoa_window ()
|
||||||
resizable = false;
|
resizable = false;
|
||||||
|
|
||||||
if (toplevel && toplevel->is_toplevel()) {
|
if (toplevel && toplevel->is_toplevel()) {
|
||||||
toplevel->size_request (req);
|
req = toplevel->size_request ();
|
||||||
toplevel->set_size_request (req.width, req.height);
|
toplevel->set_size_request (req.width, req.height);
|
||||||
dynamic_cast<Gtk::Window*>(toplevel)->set_resizable (false);
|
dynamic_cast<Gtk::Window*>(toplevel)->set_resizable (false);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ BigClockWindow::BigClockWindow (AudioClock& c)
|
||||||
add (clock);
|
add (clock);
|
||||||
clock.show_all ();
|
clock.show_all ();
|
||||||
|
|
||||||
clock.size_request (default_size);
|
default_size = clock.size_request ();
|
||||||
|
|
||||||
clock.signal_size_allocate().connect (sigc::mem_fun (*this, &BigClockWindow::clock_size_reallocated));
|
clock.signal_size_allocate().connect (sigc::mem_fun (*this, &BigClockWindow::clock_size_reallocated));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -331,11 +331,11 @@ Editor::reset_controls_layout_width ()
|
||||||
GtkRequisition req = { 0, 0 };
|
GtkRequisition req = { 0, 0 };
|
||||||
gint w;
|
gint w;
|
||||||
|
|
||||||
edit_controls_vbox.size_request (req);
|
req = edit_controls_vbox.size_request ();
|
||||||
w = req.width;
|
w = req.width;
|
||||||
|
|
||||||
if (_group_tabs->get_visible()) {
|
if (_group_tabs->get_visible()) {
|
||||||
_group_tabs->size_request (req);
|
req = _group_tabs->size_request ();
|
||||||
w += req.width;
|
w += req.width;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1019,12 +1019,12 @@ GainMeter::get_gm_width ()
|
||||||
Gtk::Requisition sz;
|
Gtk::Requisition sz;
|
||||||
int min_w = 0;
|
int min_w = 0;
|
||||||
sz.width = 0;
|
sz.width = 0;
|
||||||
meter_metric_area.size_request (sz);
|
sz = meter_metric_area.size_request ();
|
||||||
min_w += sz.width;
|
min_w += sz.width;
|
||||||
level_meter->size_request (sz);
|
sz = level_meter->size_request ();
|
||||||
min_w += sz.width;
|
min_w += sz.width;
|
||||||
|
|
||||||
fader_alignment.size_request (sz);
|
sz = fader_alignment.size_request ();
|
||||||
if (_width == Wide)
|
if (_width == Wide)
|
||||||
return max(sz.width * 2, min_w * 2) + 6;
|
return max(sz.width * 2, min_w * 2) + 6;
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -127,8 +127,7 @@ Widget::compute_bounding_box () const
|
||||||
if (_allocation) {
|
if (_allocation) {
|
||||||
_bounding_box = Rect (0, 0, _allocation.width(), _allocation.height());
|
_bounding_box = Rect (0, 0, _allocation.width(), _allocation.height());
|
||||||
} else {
|
} else {
|
||||||
GtkRequisition req = { 0, 0 };
|
GtkRequisition req = _widget.size_request ();
|
||||||
_widget.size_request (req);
|
|
||||||
_bounding_box = Rect (0., 0., req.width, req.height);
|
_bounding_box = Rect (0., 0., req.width, req.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ Frame::on_size_request (GtkRequisition* r)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_w) {
|
if (_w) {
|
||||||
_w->size_request (*r);
|
*r = _w->size_request ();
|
||||||
} else {
|
} else {
|
||||||
r->width = 0;
|
r->width = 0;
|
||||||
r->height = 0;
|
r->height = 0;
|
||||||
|
|
|
||||||
|
|
@ -101,13 +101,11 @@ Pane::on_size_request (GtkRequisition* req)
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Children::iterator c = children.begin(); c != children.end(); ++c) {
|
for (Children::iterator c = children.begin(); c != children.end(); ++c) {
|
||||||
GtkRequisition r;
|
|
||||||
|
|
||||||
if (!(*c)->w->get_visible ()) {
|
if (!(*c)->w->get_visible ()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
(*c)->w->size_request (r);
|
GtkRequisition r = (*c)->w->size_request ();
|
||||||
|
|
||||||
if (horizontal) {
|
if (horizontal) {
|
||||||
largest.height = max (largest.height, r.height);
|
largest.height = max (largest.height, r.height);
|
||||||
|
|
@ -300,8 +298,7 @@ Pane::reallocate (Gtk::Allocation const & alloc)
|
||||||
fract = (*div)->fract;
|
fract = (*div)->fract;
|
||||||
}
|
}
|
||||||
|
|
||||||
Gtk::Requisition cr;
|
Gtk::Requisition cr = (*child)->w->size_request ();
|
||||||
(*child)->w->size_request (cr);
|
|
||||||
|
|
||||||
if (horizontal) {
|
if (horizontal) {
|
||||||
child_alloc.set_width ((gint) floor (remaining * fract));
|
child_alloc.set_width ((gint) floor (remaining * fract));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue