mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-26 15:08:17 +01:00
increase meterbridge with if scrollbar is not visible..
This commit is contained in:
parent
6f72c85344
commit
fd9c0a63fd
1 changed files with 16 additions and 0 deletions
|
|
@ -338,9 +338,25 @@ Meterbridge::on_size_request (Gtk::Requisition* r)
|
|||
|
||||
Gdk::Geometry geom;
|
||||
Gtk::Requisition mr = meterarea.size_request();
|
||||
|
||||
geom.max_width = mr.width + metrics_left.get_width() + metrics_right.get_width();
|
||||
geom.max_height = max_height;
|
||||
|
||||
const Gtk::Scrollbar * hsc = scroller.get_hscrollbar();
|
||||
Glib::RefPtr<Gdk::Screen> screen = get_screen ();
|
||||
Gdk::Rectangle monitor_rect;
|
||||
screen->get_monitor_geometry (0, monitor_rect);
|
||||
const int scr_w = monitor_rect.get_width() - 44;
|
||||
|
||||
if (cur_max_width < geom.max_width
|
||||
&& cur_max_width < scr_w
|
||||
&& !(scroller.get_hscrollbar_visible() && hsc)) {
|
||||
int h = r->height;
|
||||
*r = Gtk::Requisition();
|
||||
r->width = geom.max_width;
|
||||
r->height = h;
|
||||
}
|
||||
|
||||
if (cur_max_width != geom.max_width) {
|
||||
cur_max_width = geom.max_width;
|
||||
geom.height_inc = 16;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue