diff options
author | David Robillard <d@drobilla.net> | 2014-08-09 05:06:33 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-08-09 05:06:33 +0000 |
commit | 4801cabdb2f5685d68d778ab81e8677752d835d4 (patch) | |
tree | 8d691052fe607198ad6d2ca65eabf99c4523e66f | |
parent | bbd2f572a06786eafc49f1ba046c3eddbb005917 (diff) | |
download | ingen-4801cabdb2f5685d68d778ab81e8677752d835d4.tar.gz ingen-4801cabdb2f5685d68d778ab81e8677752d835d4.tar.bz2 ingen-4801cabdb2f5685d68d778ab81e8677752d835d4.zip |
Fix initial size of properties window.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5447 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | src/gui/PropertiesWindow.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/gui/PropertiesWindow.cpp b/src/gui/PropertiesWindow.cpp index f6524e77..546a81dd 100644 --- a/src/gui/PropertiesWindow.cpp +++ b/src/gui/PropertiesWindow.cpp @@ -284,20 +284,19 @@ PropertiesWindow::on_show() { static const int WIN_PAD = 64; static const int VBOX_PAD = 16; + int width = 0; int height = 0; Gtk::Requisition req; for (const auto& c : _vbox->children()) { - req = c.get_widget()->size_request(); - if (c.get_widget() != _scrolledwindow) { - width = std::max(width, req.width); - height += req.height + VBOX_PAD; - } + req = c.get_widget()->size_request(); + width = std::max(width, req.width); + height += req.height + VBOX_PAD; } - req = _table->size_request(); - width = std::max(width, req.width); + req = _table->size_request(); + width = std::max(width, req.width + 128); height += req.height; set_default_size(width + WIN_PAD, height + WIN_PAD); |