diff options
author | David Robillard <d@drobilla.net> | 2015-10-04 03:32:24 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2015-10-04 03:32:24 +0000 |
commit | 5791a2a5bb3db7784f87efbb181cf8151a40c2de (patch) | |
tree | 68b9981caff60274cbea8bec7aa7936943fd400d /src | |
parent | a52ed3f9fcee5c85b46243e7de21c2d7bd6cb82a (diff) | |
download | jalv-5791a2a5bb3db7784f87efbb181cf8151a40c2de.tar.gz jalv-5791a2a5bb3db7784f87efbb181cf8151a40c2de.tar.bz2 jalv-5791a2a5bb3db7784f87efbb181cf8151a40c2de.zip |
Set Qt window size to fit UI.
git-svn-id: http://svn.drobilla.net/lad/trunk/jalv@5740 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/jalv_qt.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/jalv_qt.cpp b/src/jalv_qt.cpp index 88a024d..b531f75 100644 --- a/src/jalv_qt.cpp +++ b/src/jalv_qt.cpp @@ -714,6 +714,15 @@ jalv_open_ui(Jalv* jalv) app->connect(app, SIGNAL(lastWindowClosed()), app, SLOT(quit())); win->show(); + if (jalv->ui_instance && !jalv_ui_is_resizable(jalv)) { + widget->setMinimumSize(widget->width(), widget->height()); + widget->setMaximumSize(widget->width(), widget->height()); + win->adjustSize(); + win->setFixedSize(win->width(), win->height()); + } else { + win->resize(widget->width(), + widget->height() + win->menuBar()->height()); + } Timer* timer = new Timer(jalv); timer->start(1000 / jalv->ui_update_hz); |