From 654b1a59c5078a7cc5a65d486266d32a5c8384fd Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 17 Sep 2016 16:43:35 +0200 Subject: gui: prevent stderr whining on setting dialog fixed size Adjust dialogs. --- filter-accela/ftnoir_accela_filtercontrols.ui | 10 ++++++++-- gui/main-window.cpp | 9 +++++++-- gui/options-dialog.ui | 2 +- tracker-aruco/aruco-trackercontrols.ui | 2 +- tracker-pt/FTNoIR_PT_Controls.ui | 2 +- 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/filter-accela/ftnoir_accela_filtercontrols.ui b/filter-accela/ftnoir_accela_filtercontrols.ui index 5b2dec16..246a9ba0 100644 --- a/filter-accela/ftnoir_accela_filtercontrols.ui +++ b/filter-accela/ftnoir_accela_filtercontrols.ui @@ -9,10 +9,16 @@ 0 0 - 558 - 421 + 550 + 408 + + + 0 + 0 + + Filter settings 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 lib, ptr& orig) { t* dialog = reinterpret_cast(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* place, Args&&... params) { *place = make_unique(std::forward(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; } diff --git a/gui/options-dialog.ui b/gui/options-dialog.ui index a1da2936..7011f156 100644 --- a/gui/options-dialog.ui +++ b/gui/options-dialog.ui @@ -7,7 +7,7 @@ 0 0 546 - 594 + 588 diff --git a/tracker-aruco/aruco-trackercontrols.ui b/tracker-aruco/aruco-trackercontrols.ui index 71bd1c1c..c0d409ca 100644 --- a/tracker-aruco/aruco-trackercontrols.ui +++ b/tracker-aruco/aruco-trackercontrols.ui @@ -10,7 +10,7 @@ 0 0 474 - 208 + 203 diff --git a/tracker-pt/FTNoIR_PT_Controls.ui b/tracker-pt/FTNoIR_PT_Controls.ui index 02eb05fb..222987a4 100644 --- a/tracker-pt/FTNoIR_PT_Controls.ui +++ b/tracker-pt/FTNoIR_PT_Controls.ui @@ -10,7 +10,7 @@ 0 0 424 - 586 + 584 -- cgit v1.2.3