mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-02-09 21:28:30 -06:00
Adjust the bottom buttons layout
This commit fixes an issue where the bottom buttons of 'PreferencesDialog' are positioned erratically on non-macOS platforms. For further information, refer to 'Need Help' section of #2394 PR.
This commit is contained in:
@@ -50,11 +50,9 @@ PreferencesDialog::PreferencesDialog(QWidget* parent, Tabs tab)
|
||||
// Set current tab
|
||||
ui->tabWidget->setCurrentIndex(tab);
|
||||
|
||||
// Add 'Export Settings' and 'Import Settings' buttons
|
||||
const QPushButton* exportSettings = ui->buttonBox->addButton(tr("Export Settings"), QDialogButtonBox::ActionRole);
|
||||
connect(exportSettings, &QPushButton::clicked, this, &PreferencesDialog::exportSettings);
|
||||
const QPushButton* importSettings = ui->buttonBox->addButton(tr("Import Settings"), QDialogButtonBox::ActionRole);
|
||||
connect(importSettings, &QPushButton::clicked, this, &PreferencesDialog::importSettings);
|
||||
// Connect 'Export Settings' and 'Import Settings' buttons
|
||||
connect(ui->buttonExportSettings, &QPushButton::clicked, this, &PreferencesDialog::exportSettings);
|
||||
connect(ui->buttonImportSettings, &QPushButton::clicked, this, &PreferencesDialog::importSettings);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1934,14 +1934,32 @@ Can be set to 0 for disabling completion.</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::RestoreDefaults|QDialogButtonBox::Save</set>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_bottomButtons">
|
||||
<item>
|
||||
<widget class="QPushButton" name="buttonExportSettings">
|
||||
<property name="text">
|
||||
<string>Export Settings</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="buttonImportSettings">
|
||||
<property name="text">
|
||||
<string>Import Settings</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::RestoreDefaults|QDialogButtonBox::Save</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
||||
Reference in New Issue
Block a user