mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 00:41:26 +12:00
Qt: some cleanup
This commit is contained in:
parent
1a374126e1
commit
18e0b83ac9
2 changed files with 18 additions and 15 deletions
|
@ -54,11 +54,10 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> gui_settings, std
|
|||
ui->tab_widget_settings->setUsesScrollButtons(false);
|
||||
ui->tab_widget_settings->tabBar()->setObjectName("tab_bar_settings");
|
||||
|
||||
const bool show_debug_tab = m_gui_settings->GetValue(gui::m_showDebugTab).toBool();
|
||||
m_gui_settings->SetValue(gui::m_showDebugTab, show_debug_tab);
|
||||
if (!show_debug_tab)
|
||||
if (!m_gui_settings->GetValue(gui::m_showDebugTab).toBool())
|
||||
{
|
||||
ui->tab_widget_settings->removeTab(9);
|
||||
m_gui_settings->SetValue(gui::m_showDebugTab, false);
|
||||
}
|
||||
if (game)
|
||||
{
|
||||
|
@ -1870,7 +1869,7 @@ int settings_dialog::exec()
|
|||
// switch to the cpu tab after conjuring the settings_dialog with another tab opened first.
|
||||
// Weirdly enough this won't happen if we change the tab order so that anything else is at index 0.
|
||||
ui->tab_widget_settings->setCurrentIndex(0);
|
||||
QTimer::singleShot(0, [=, this]{ ui->tab_widget_settings->setCurrentIndex(m_tab_index); });
|
||||
QTimer::singleShot(0, [this]{ ui->tab_widget_settings->setCurrentIndex(m_tab_index); });
|
||||
|
||||
// Open a dialog if your config file contained invalid entries
|
||||
QTimer::singleShot(10, [this] { m_emu_settings->OpenCorrectionDialog(this); });
|
||||
|
@ -1901,8 +1900,13 @@ bool settings_dialog::eventFilter(QObject* object, QEvent* event)
|
|||
if (event->type() == QEvent::Enter || event->type() == QEvent::Leave)
|
||||
{
|
||||
const int i = ui->tab_widget_settings->currentIndex();
|
||||
|
||||
if (i < m_description_labels.size())
|
||||
{
|
||||
QLabel* label = m_description_labels[i].first;
|
||||
|
||||
if (label)
|
||||
{
|
||||
if (event->type() == QEvent::Enter)
|
||||
{
|
||||
label->setText(m_descriptions[object]);
|
||||
|
@ -1913,6 +1917,8 @@ bool settings_dialog::eventFilter(QObject* object, QEvent* event)
|
|||
label->setText(description);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return QDialog::eventFilter(object, event);
|
||||
}
|
||||
|
|
|
@ -35,9 +35,6 @@
|
|||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="coreTab">
|
||||
<attribute name="title">
|
||||
<string>CPU</string>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue