mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-14 10:21:21 +00:00
settings_dialog: make size consistent
This commit is contained in:
parent
ff772dd28b
commit
37c26b77ee
@ -26,12 +26,11 @@ inline std::string sstr(const QString& _in) { return _in.toUtf8().toStdString();
|
||||
inline std::string sstr(const QVariant& _in) { return sstr(_in.toString()); }
|
||||
|
||||
settings_dialog::settings_dialog(std::shared_ptr<gui_settings> xSettings, const Render_Creator& r_Creator, const int& tabIndex, QWidget *parent, const GameInfo* game)
|
||||
: QDialog(parent), xgui_settings(xSettings), ui(new Ui::settings_dialog)
|
||||
: QDialog(parent), xgui_settings(xSettings), ui(new Ui::settings_dialog), m_tab_Index(tabIndex)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->cancelButton->setDefault(true);
|
||||
ui->tabWidget->setUsesScrollButtons(false);
|
||||
ui->tabWidget->setCurrentIndex(tabIndex);
|
||||
|
||||
bool showDebugTab = xgui_settings->GetValue(GUI::m_showDebugTab).toBool();
|
||||
xgui_settings->SetValue(GUI::m_showDebugTab, showDebugTab);
|
||||
@ -945,3 +944,14 @@ void settings_dialog::OnApplyStylesheet()
|
||||
xgui_settings->SetValue(GUI::m_currentStylesheet, ui->combo_stylesheets->currentText());
|
||||
Q_EMIT GuiStylesheetRequest(xgui_settings->GetCurrentStylesheetPath());
|
||||
}
|
||||
|
||||
int settings_dialog::exec()
|
||||
{
|
||||
show();
|
||||
for (int i = 0; i < ui->tabWidget->count(); i++)
|
||||
{
|
||||
ui->tabWidget->setCurrentIndex(i);
|
||||
}
|
||||
ui->tabWidget->setCurrentIndex(m_tab_Index);
|
||||
return QDialog::exec();
|
||||
}
|
||||
|
@ -20,6 +20,7 @@ class settings_dialog : public QDialog
|
||||
|
||||
public:
|
||||
explicit settings_dialog(std::shared_ptr<gui_settings> xSettings, const Render_Creator& r_Creator, const int& tabIndex = 0, QWidget *parent = 0, const GameInfo *game = nullptr);
|
||||
int exec();
|
||||
Q_SIGNALS:
|
||||
void GuiSettingsSyncRequest();
|
||||
void GuiStylesheetRequest(const QString& path);
|
||||
@ -40,6 +41,7 @@ private:
|
||||
bool m_isD3D12 = false;
|
||||
bool m_isVulkan = false;
|
||||
|
||||
int m_tab_Index;
|
||||
Ui::settings_dialog *ui;
|
||||
std::shared_ptr<gui_settings> xgui_settings;
|
||||
};
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>550</width>
|
||||
<height>646</height>
|
||||
<height>604</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@ -163,19 +163,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@ -253,7 +240,7 @@
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_28">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -264,6 +251,12 @@
|
||||
<layout class="QVBoxLayout" name="verticalLayout_12">
|
||||
<item>
|
||||
<widget class="QListWidget" name="lleList">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::ExtendedSelection</enum>
|
||||
</property>
|
||||
@ -282,7 +275,14 @@
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_11">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="searchBox"/>
|
||||
<widget class="QLineEdit" name="searchBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
Loading…
x
Reference in New Issue
Block a user