mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
Modify hacks associated with initial sizing of port matrices to try and make things work with both fluxbox and metacity.
git-svn-id: svn://localhost/ardour2/branches/3.0@5604 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
94c5a98e02
commit
7c49119be0
10 changed files with 36 additions and 28 deletions
|
|
@ -923,3 +923,16 @@ convert_bgra_to_rgba (guint8 const* src,
|
|||
src_pixel += 4;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
resize_window_to_proportion_of_monitor (Gtk::Window* window, int max_width, int max_height)
|
||||
{
|
||||
Glib::RefPtr<Gdk::Screen> screen = window->get_screen ();
|
||||
Gdk::Rectangle monitor_rect;
|
||||
screen->get_monitor_geometry (0, monitor_rect);
|
||||
|
||||
int const w = std::min (monitor_rect.get_width(), max_width) * 0.8;
|
||||
int const h = std::min (monitor_rect.get_height(), max_height) * 0.8;
|
||||
|
||||
window->resize (w, h);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue