qt: All dialogs are now fixed

This commit is contained in:
Cacodemon345
2022-02-06 01:50:30 +06:00
parent a570f01d97
commit 6818c03799
9 changed files with 147 additions and 68 deletions

View File

@@ -147,6 +147,7 @@ void DeviceConfig::ConfigureDevice(const _device_* device, int instance) {
++config; ++config;
} }
dc.setFixedSize(dc.minimumSizeHint());
int res = dc.exec(); int res = dc.exec();
if (res == QDialog::Accepted) { if (res == QDialog::Accepted) {
config = device->config; config = device->config;

View File

@@ -10,6 +10,24 @@
<height>269</height> <height>269</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>421</width>
<height>269</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>421</width>
<height>269</height>
</size>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>Dialog</string> <string>Dialog</string>
</property> </property>
@@ -197,15 +215,15 @@
</item> </item>
<item row="8" column="0" colspan="6"> <item row="8" column="0" colspan="6">
<widget class="QProgressBar" name="progressBar"> <widget class="QProgressBar" name="progressBar">
<property name="visible">
<bool>false</bool>
</property>
<property name="value"> <property name="value">
<number>0</number> <number>0</number>
</property> </property>
<property name="textVisible"> <property name="textVisible">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="visible">
<bool>false</bool>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>

View File

@@ -27,6 +27,7 @@ JoystickConfiguration::JoystickConfiguration(int type, int joystick_nr, QWidget
} }
ui->comboBoxDevice->setCurrentIndex(joystick_state[joystick_nr].plat_joystick_nr); ui->comboBoxDevice->setCurrentIndex(joystick_state[joystick_nr].plat_joystick_nr);
setFixedSize(minimumSizeHint());
} }
JoystickConfiguration::~JoystickConfiguration() JoystickConfiguration::~JoystickConfiguration()
@@ -180,4 +181,6 @@ void JoystickConfiguration::on_comboBoxDevice_currentIndexChanged(int index) {
++row; ++row;
} }
setFixedSize(minimumSizeHint());
} }

View File

@@ -1414,6 +1414,7 @@ void MainWindow::on_actionAbout_86Box_triggered()
QDesktopServices::openUrl(QUrl("https://86box.net/")); QDesktopServices::openUrl(QUrl("https://86box.net/"));
}); });
msgBox.setIconPixmap(QIcon(":/settings/win/icons/86Box-yellow.ico").pixmap(32, 32)); msgBox.setIconPixmap(QIcon(":/settings/win/icons/86Box-yellow.ico").pixmap(32, 32));
msgBox.setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint);
msgBox.exec(); msgBox.exec();
} }

View File

@@ -6,10 +6,22 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>287</width> <width>327</width>
<height>140</height> <height>140</height>
</rect> </rect>
</property> </property>
<property name="minimumSize">
<size>
<width>327</width>
<height>140</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>327</width>
<height>140</height>
</size>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>New Image</string> <string>New Image</string>
</property> </property>

View File

@@ -10,6 +10,18 @@
<height>228</height> <height>228</height>
</rect> </rect>
</property> </property>
<property name="minimumSize">
<size>
<width>370</width>
<height>228</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>370</width>
<height>228</height>
</size>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>Preferences</string> <string>Preferences</string>
</property> </property>

View File

@@ -112,7 +112,7 @@ Settings::Settings(QWidget *parent) :
ui->stackedWidget->addWidget(otherRemovable); ui->stackedWidget->addWidget(otherRemovable);
ui->stackedWidget->addWidget(otherPeripherals); 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, display, &SettingsDisplay::onCurrentMachineChanged);
connect(machine, &SettingsMachine::currentMachineChanged, input, &SettingsInput::onCurrentMachineChanged); connect(machine, &SettingsMachine::currentMachineChanged, input, &SettingsInput::onCurrentMachineChanged);

View File

@@ -6,10 +6,22 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>900</width> <width>831</width>
<height>595</height> <height>595</height>
</rect> </rect>
</property> </property>
<property name="minimumSize">
<size>
<width>831</width>
<height>595</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>831</width>
<height>595</height>
</size>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>Settings</string> <string>Settings</string>
</property> </property>

View File

@@ -6,73 +6,93 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>262</width> <width>182</width>
<height>279</height> <height>250</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>182</width>
<height>250</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>182</width>
<height>250</height>
</size>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>Sound Gain</string> <string>Sound Gain</string>
</property> </property>
<widget class="QDialogButtonBox" name="buttonBox"> <layout class="QGridLayout" name="gridLayout">
<property name="geometry"> <item row="1" column="0">
<rect> <widget class="QSlider" name="verticalSlider">
<x>140</x> <property name="sizePolicy">
<y>20</y> <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<width>101</width> <horstretch>0</horstretch>
<height>241</height> <verstretch>0</verstretch>
</rect> </sizepolicy>
</property> </property>
<property name="orientation"> <property name="maximum">
<enum>Qt::Vertical</enum> <number>18</number>
</property> </property>
<property name="standardButtons"> <property name="singleStep">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> <number>2</number>
</property> </property>
</widget> <property name="pageStep">
<widget class="QSlider" name="verticalSlider"> <number>4</number>
<property name="geometry"> </property>
<rect> <property name="orientation">
<x>30</x> <enum>Qt::Vertical</enum>
<y>30</y> </property>
<width>31</width> <property name="invertedAppearance">
<height>231</height> <bool>false</bool>
</rect> </property>
</property> <property name="tickPosition">
<property name="maximum"> <enum>QSlider::TicksBothSides</enum>
<number>18</number> </property>
</property> </widget>
<property name="singleStep"> </item>
<number>2</number> <item row="0" column="2" rowspan="2">
</property> <widget class="QDialogButtonBox" name="buttonBox">
<property name="pageStep"> <property name="sizePolicy">
<number>4</number> <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
</property> <horstretch>0</horstretch>
<property name="orientation"> <verstretch>0</verstretch>
<enum>Qt::Vertical</enum> </sizepolicy>
</property> </property>
<property name="invertedAppearance"> <property name="orientation">
<bool>false</bool> <enum>Qt::Vertical</enum>
</property> </property>
<property name="tickPosition"> <property name="standardButtons">
<enum>QSlider::TicksBothSides</enum> <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" name="label"> </item>
<property name="geometry"> <item row="0" column="0">
<rect> <widget class="QLabel" name="label">
<x>-20</x> <property name="sizePolicy">
<y>10</y> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<width>131</width> <horstretch>0</horstretch>
<height>20</height> <verstretch>0</verstretch>
</rect> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>Gain</string> <string>Gain</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignCenter</set> <set>Qt::AlignCenter</set>
</property> </property>
</widget> </widget>
</item>
</layout>
</widget> </widget>
<resources/> <resources/>
<connections> <connections>