diff options
Diffstat (limited to 'gui')
-rw-r--r-- | gui/main-window.cpp | 22 | ||||
-rw-r--r-- | gui/main.cpp | 1 |
2 files changed, 9 insertions, 14 deletions
diff --git a/gui/main-window.cpp b/gui/main-window.cpp index 2489c983..d3e0baa8 100644 --- a/gui/main-window.cpp +++ b/gui/main-window.cpp @@ -21,7 +21,6 @@ #include <QString> #include <QChar> #include <QSignalBlocker> -#include <QStatusBar> #ifdef _WIN32 # include <windows.h> @@ -43,10 +42,7 @@ MainWindow::MainWindow() : menu_action_mappings(&tray_menu) { ui.setupUi(this); - setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); - adjustSize(); setFixedSize(size()); - setWindowFlags(Qt::MSWindowsFixedSizeDialogHint | windowFlags()); updateButtonState(false, false); if (group::ini_directory().size() == 0) @@ -579,10 +575,9 @@ bool mk_dialog(mem<dylib> lib, ptr<t>& orig) { t* dialog = reinterpret_cast<t*>(lib->Dialog()); dialog->setWindowFlags(Qt::Dialog); - dialog->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); - dialog->adjustSize(); - dialog->setFixedSize(dialog->size()); - dialog->setWindowFlags(Qt::MSWindowsFixedSizeDialogHint | dialog->windowFlags()); + // 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); @@ -625,12 +620,11 @@ static bool mk_window(ptr<t>* place, Args&&... params) else { *place = make_unique<t>(std::forward<Args>(params)...); - auto& dialog = *place; - dialog->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); - dialog->adjustSize(); - dialog->setFixedSize(dialog->size()); - dialog->setWindowFlags(Qt::MSWindowsFixedSizeDialogHint | dialog->windowFlags()); - dialog->show(); + (*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/main.cpp b/gui/main.cpp index acf82808..8bc09537 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -17,6 +17,7 @@ using namespace options; #include <QCommandLineParser> #include <QStyleFactory> #include <QStringList> +#include <QMessageBox> #include <QDebug> #include <memory> #include <cstring> |