From 6818c03799eced2a4ae06d8c4d45f54bb0a45129 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Sun, 6 Feb 2022 01:50:30 +0600 Subject: [PATCH] qt: All dialogs are now fixed --- src/qt/qt_deviceconfig.cpp | 1 + src/qt/qt_harddiskdialog.ui | 24 ++++- src/qt/qt_joystickconfiguration.cpp | 3 + src/qt/qt_mainwindow.cpp | 1 + src/qt/qt_newfloppydialog.ui | 14 ++- src/qt/qt_progsettings.ui | 12 +++ src/qt/qt_settings.cpp | 2 +- src/qt/qt_settings.ui | 14 ++- src/qt/qt_soundgain.ui | 144 ++++++++++++++++------------ 9 files changed, 147 insertions(+), 68 deletions(-) diff --git a/src/qt/qt_deviceconfig.cpp b/src/qt/qt_deviceconfig.cpp index 48f8e59a9..32e202e76 100644 --- a/src/qt/qt_deviceconfig.cpp +++ b/src/qt/qt_deviceconfig.cpp @@ -147,6 +147,7 @@ void DeviceConfig::ConfigureDevice(const _device_* device, int instance) { ++config; } + dc.setFixedSize(dc.minimumSizeHint()); int res = dc.exec(); if (res == QDialog::Accepted) { config = device->config; diff --git a/src/qt/qt_harddiskdialog.ui b/src/qt/qt_harddiskdialog.ui index 0d069ec17..823652aa6 100644 --- a/src/qt/qt_harddiskdialog.ui +++ b/src/qt/qt_harddiskdialog.ui @@ -10,6 +10,24 @@ 269 + + + 0 + 0 + + + + + 421 + 269 + + + + + 421 + 269 + + Dialog @@ -197,15 +215,15 @@ + + false + 0 true - - false - diff --git a/src/qt/qt_joystickconfiguration.cpp b/src/qt/qt_joystickconfiguration.cpp index f87ea8b3c..83b2f50be 100644 --- a/src/qt/qt_joystickconfiguration.cpp +++ b/src/qt/qt_joystickconfiguration.cpp @@ -27,6 +27,7 @@ JoystickConfiguration::JoystickConfiguration(int type, int joystick_nr, QWidget } ui->comboBoxDevice->setCurrentIndex(joystick_state[joystick_nr].plat_joystick_nr); + setFixedSize(minimumSizeHint()); } JoystickConfiguration::~JoystickConfiguration() @@ -180,4 +181,6 @@ void JoystickConfiguration::on_comboBoxDevice_currentIndexChanged(int index) { ++row; } + + setFixedSize(minimumSizeHint()); } diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index 8ca284a61..f7afab6e7 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -1414,6 +1414,7 @@ void MainWindow::on_actionAbout_86Box_triggered() QDesktopServices::openUrl(QUrl("https://86box.net/")); }); msgBox.setIconPixmap(QIcon(":/settings/win/icons/86Box-yellow.ico").pixmap(32, 32)); + msgBox.setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint); msgBox.exec(); } diff --git a/src/qt/qt_newfloppydialog.ui b/src/qt/qt_newfloppydialog.ui index c9e744845..42d5e0a4f 100644 --- a/src/qt/qt_newfloppydialog.ui +++ b/src/qt/qt_newfloppydialog.ui @@ -6,10 +6,22 @@ 0 0 - 287 + 327 140 + + + 327 + 140 + + + + + 327 + 140 + + New Image diff --git a/src/qt/qt_progsettings.ui b/src/qt/qt_progsettings.ui index 883a869ab..b64272f8b 100644 --- a/src/qt/qt_progsettings.ui +++ b/src/qt/qt_progsettings.ui @@ -10,6 +10,18 @@ 228 + + + 370 + 228 + + + + + 370 + 228 + + Preferences diff --git a/src/qt/qt_settings.cpp b/src/qt/qt_settings.cpp index 3efa79f1e..fbd16254e 100644 --- a/src/qt/qt_settings.cpp +++ b/src/qt/qt_settings.cpp @@ -112,7 +112,7 @@ Settings::Settings(QWidget *parent) : ui->stackedWidget->addWidget(otherRemovable); ui->stackedWidget->addWidget(otherPeripherals); - ui->listView->setMaximumWidth(ui->listView->sizeHintForColumn(0) + 5); + ui->listView->setFixedWidth(ui->listView->sizeHintForColumn(0) + 5); connect(machine, &SettingsMachine::currentMachineChanged, display, &SettingsDisplay::onCurrentMachineChanged); connect(machine, &SettingsMachine::currentMachineChanged, input, &SettingsInput::onCurrentMachineChanged); diff --git a/src/qt/qt_settings.ui b/src/qt/qt_settings.ui index da82b87e6..66047cffd 100644 --- a/src/qt/qt_settings.ui +++ b/src/qt/qt_settings.ui @@ -6,10 +6,22 @@ 0 0 - 900 + 831 595 + + + 831 + 595 + + + + + 831 + 595 + + Settings diff --git a/src/qt/qt_soundgain.ui b/src/qt/qt_soundgain.ui index af85e03c5..8e4d6b3f8 100644 --- a/src/qt/qt_soundgain.ui +++ b/src/qt/qt_soundgain.ui @@ -6,73 +6,93 @@ 0 0 - 262 - 279 + 182 + 250 + + + 0 + 0 + + + + + 182 + 250 + + + + + 182 + 250 + + Sound Gain - - - - 140 - 20 - 101 - 241 - - - - Qt::Vertical - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - 30 - 30 - 31 - 231 - - - - 18 - - - 2 - - - 4 - - - Qt::Vertical - - - false - - - QSlider::TicksBothSides - - - - - - -20 - 10 - 131 - 20 - - - - Gain - - - Qt::AlignCenter - - + + + + + + 0 + 0 + + + + 18 + + + 2 + + + 4 + + + Qt::Vertical + + + false + + + QSlider::TicksBothSides + + + + + + + + 0 + 0 + + + + Qt::Vertical + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + 0 + 0 + + + + Gain + + + Qt::AlignCenter + + + +