summaryrefslogtreecommitdiffhomepage
path: root/gui/main-window.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-09-17 16:43:35 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-09-17 16:43:35 +0200
commit654b1a59c5078a7cc5a65d486266d32a5c8384fd (patch)
tree7fc24caa7536656e3f91c92d6e23dd20e6385036 /gui/main-window.cpp
parent8fc3bd0b872b263d122d627d71910271ffe25927 (diff)
gui: prevent stderr whining on setting dialog fixed size
Adjust dialogs.
Diffstat (limited to 'gui/main-window.cpp')
-rw-r--r--gui/main-window.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/gui/main-window.cpp b/gui/main-window.cpp
index 0f070cc4..1730a806 100644
--- a/gui/main-window.cpp
+++ b/gui/main-window.cpp
@@ -572,10 +572,12 @@ bool mk_dialog(mem<dylib> lib, ptr<t>& orig)
{
t* dialog = reinterpret_cast<t*>(lib->Dialog());
dialog->setWindowFlags(Qt::Dialog);
- dialog->setFixedSize(dialog->size());
+ // HACK: prevent stderr whining by adding a few pixels
+ dialog->setFixedSize(dialog->size() + QSize(4, 4));
+ dialog->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ dialog->show();
orig.reset(dialog);
- dialog->show();
QObject::connect(dialog, &plugin_api::detail::BaseDialog::closing, [&]() -> void { orig = nullptr; });
@@ -616,6 +618,9 @@ static bool mk_window(ptr<t>* place, Args&&... params)
{
*place = make_unique<t>(std::forward<Args>(params)...);
(*place)->setWindowFlags(Qt::Dialog);
+ // HACK: prevent stderr whining by adding a few pixels
+ (*place)->setFixedSize((*place)->size() + QSize(4, 4));
+ (*place)->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
(*place)->show();
return true;
}