mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-29 22:20:48 +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()); }
|
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)
|
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->setupUi(this);
|
||||||
ui->cancelButton->setDefault(true);
|
ui->cancelButton->setDefault(true);
|
||||||
ui->tabWidget->setUsesScrollButtons(false);
|
ui->tabWidget->setUsesScrollButtons(false);
|
||||||
ui->tabWidget->setCurrentIndex(tabIndex);
|
|
||||||
|
|
||||||
bool showDebugTab = xgui_settings->GetValue(GUI::m_showDebugTab).toBool();
|
bool showDebugTab = xgui_settings->GetValue(GUI::m_showDebugTab).toBool();
|
||||||
xgui_settings->SetValue(GUI::m_showDebugTab, showDebugTab);
|
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());
|
xgui_settings->SetValue(GUI::m_currentStylesheet, ui->combo_stylesheets->currentText());
|
||||||
Q_EMIT GuiStylesheetRequest(xgui_settings->GetCurrentStylesheetPath());
|
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:
|
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);
|
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:
|
Q_SIGNALS:
|
||||||
void GuiSettingsSyncRequest();
|
void GuiSettingsSyncRequest();
|
||||||
void GuiStylesheetRequest(const QString& path);
|
void GuiStylesheetRequest(const QString& path);
|
||||||
@ -40,6 +41,7 @@ private:
|
|||||||
bool m_isD3D12 = false;
|
bool m_isD3D12 = false;
|
||||||
bool m_isVulkan = false;
|
bool m_isVulkan = false;
|
||||||
|
|
||||||
|
int m_tab_Index;
|
||||||
Ui::settings_dialog *ui;
|
Ui::settings_dialog *ui;
|
||||||
std::shared_ptr<gui_settings> xgui_settings;
|
std::shared_ptr<gui_settings> xgui_settings;
|
||||||
};
|
};
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>550</width>
|
<width>550</width>
|
||||||
<height>646</height>
|
<height>604</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -163,19 +163,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -253,7 +240,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox_28">
|
<widget class="QGroupBox" name="groupBox_28">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
@ -264,6 +251,12 @@
|
|||||||
<layout class="QVBoxLayout" name="verticalLayout_12">
|
<layout class="QVBoxLayout" name="verticalLayout_12">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QListWidget" name="lleList">
|
<widget class="QListWidget" name="lleList">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="selectionMode">
|
<property name="selectionMode">
|
||||||
<enum>QAbstractItemView::ExtendedSelection</enum>
|
<enum>QAbstractItemView::ExtendedSelection</enum>
|
||||||
</property>
|
</property>
|
||||||
@ -282,7 +275,14 @@
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_11">
|
<layout class="QVBoxLayout" name="verticalLayout_11">
|
||||||
<item>
|
<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>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user