mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-08-22 02:23:23 +02:00
UI: Add options to hide extra columns (#9093)
UI change that allows the user to hide the size and or file types columns
This commit is contained in:
parent
38e4382f53
commit
ece22fcbc7
@ -820,6 +820,8 @@ void Config::ReadUIGamelistValues() {
|
|||||||
|
|
||||||
ReadBasicSetting(UISettings::values.show_add_ons);
|
ReadBasicSetting(UISettings::values.show_add_ons);
|
||||||
ReadBasicSetting(UISettings::values.show_compat);
|
ReadBasicSetting(UISettings::values.show_compat);
|
||||||
|
ReadBasicSetting(UISettings::values.show_size);
|
||||||
|
ReadBasicSetting(UISettings::values.show_types);
|
||||||
ReadBasicSetting(UISettings::values.game_icon_size);
|
ReadBasicSetting(UISettings::values.game_icon_size);
|
||||||
ReadBasicSetting(UISettings::values.folder_icon_size);
|
ReadBasicSetting(UISettings::values.folder_icon_size);
|
||||||
ReadBasicSetting(UISettings::values.row_1_text_id);
|
ReadBasicSetting(UISettings::values.row_1_text_id);
|
||||||
@ -1416,6 +1418,8 @@ void Config::SaveUIGamelistValues() {
|
|||||||
|
|
||||||
WriteBasicSetting(UISettings::values.show_add_ons);
|
WriteBasicSetting(UISettings::values.show_add_ons);
|
||||||
WriteBasicSetting(UISettings::values.show_compat);
|
WriteBasicSetting(UISettings::values.show_compat);
|
||||||
|
WriteBasicSetting(UISettings::values.show_size);
|
||||||
|
WriteBasicSetting(UISettings::values.show_types);
|
||||||
WriteBasicSetting(UISettings::values.game_icon_size);
|
WriteBasicSetting(UISettings::values.game_icon_size);
|
||||||
WriteBasicSetting(UISettings::values.folder_icon_size);
|
WriteBasicSetting(UISettings::values.folder_icon_size);
|
||||||
WriteBasicSetting(UISettings::values.row_1_text_id);
|
WriteBasicSetting(UISettings::values.row_1_text_id);
|
||||||
|
@ -73,6 +73,8 @@ ConfigureUi::ConfigureUi(Core::System& system_, QWidget* parent)
|
|||||||
// Force game list reload if any of the relevant settings are changed.
|
// Force game list reload if any of the relevant settings are changed.
|
||||||
connect(ui->show_add_ons, &QCheckBox::stateChanged, this, &ConfigureUi::RequestGameListUpdate);
|
connect(ui->show_add_ons, &QCheckBox::stateChanged, this, &ConfigureUi::RequestGameListUpdate);
|
||||||
connect(ui->show_compat, &QCheckBox::stateChanged, this, &ConfigureUi::RequestGameListUpdate);
|
connect(ui->show_compat, &QCheckBox::stateChanged, this, &ConfigureUi::RequestGameListUpdate);
|
||||||
|
connect(ui->show_size, &QCheckBox::stateChanged, this, &ConfigureUi::RequestGameListUpdate);
|
||||||
|
connect(ui->show_types, &QCheckBox::stateChanged, this, &ConfigureUi::RequestGameListUpdate);
|
||||||
connect(ui->game_icon_size_combobox, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
connect(ui->game_icon_size_combobox, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||||
&ConfigureUi::RequestGameListUpdate);
|
&ConfigureUi::RequestGameListUpdate);
|
||||||
connect(ui->folder_icon_size_combobox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
connect(ui->folder_icon_size_combobox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||||
@ -111,6 +113,8 @@ void ConfigureUi::ApplyConfiguration() {
|
|||||||
ui->theme_combobox->itemData(ui->theme_combobox->currentIndex()).toString();
|
ui->theme_combobox->itemData(ui->theme_combobox->currentIndex()).toString();
|
||||||
UISettings::values.show_add_ons = ui->show_add_ons->isChecked();
|
UISettings::values.show_add_ons = ui->show_add_ons->isChecked();
|
||||||
UISettings::values.show_compat = ui->show_compat->isChecked();
|
UISettings::values.show_compat = ui->show_compat->isChecked();
|
||||||
|
UISettings::values.show_size = ui->show_size->isChecked();
|
||||||
|
UISettings::values.show_types = ui->show_types->isChecked();
|
||||||
UISettings::values.game_icon_size = ui->game_icon_size_combobox->currentData().toUInt();
|
UISettings::values.game_icon_size = ui->game_icon_size_combobox->currentData().toUInt();
|
||||||
UISettings::values.folder_icon_size = ui->folder_icon_size_combobox->currentData().toUInt();
|
UISettings::values.folder_icon_size = ui->folder_icon_size_combobox->currentData().toUInt();
|
||||||
UISettings::values.row_1_text_id = ui->row_1_text_combobox->currentData().toUInt();
|
UISettings::values.row_1_text_id = ui->row_1_text_combobox->currentData().toUInt();
|
||||||
@ -132,6 +136,8 @@ void ConfigureUi::SetConfiguration() {
|
|||||||
ui->language_combobox->findData(UISettings::values.language));
|
ui->language_combobox->findData(UISettings::values.language));
|
||||||
ui->show_add_ons->setChecked(UISettings::values.show_add_ons.GetValue());
|
ui->show_add_ons->setChecked(UISettings::values.show_add_ons.GetValue());
|
||||||
ui->show_compat->setChecked(UISettings::values.show_compat.GetValue());
|
ui->show_compat->setChecked(UISettings::values.show_compat.GetValue());
|
||||||
|
ui->show_size->setChecked(UISettings::values.show_size.GetValue());
|
||||||
|
ui->show_types->setChecked(UISettings::values.show_types.GetValue());
|
||||||
ui->game_icon_size_combobox->setCurrentIndex(
|
ui->game_icon_size_combobox->setCurrentIndex(
|
||||||
ui->game_icon_size_combobox->findData(UISettings::values.game_icon_size.GetValue()));
|
ui->game_icon_size_combobox->findData(UISettings::values.game_icon_size.GetValue()));
|
||||||
ui->folder_icon_size_combobox->setCurrentIndex(
|
ui->folder_icon_size_combobox->setCurrentIndex(
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>363</width>
|
<width>363</width>
|
||||||
<height>507</height>
|
<height>562</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -90,6 +90,20 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="show_size">
|
||||||
|
<property name="text">
|
||||||
|
<string>Show Size Column</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="show_types">
|
||||||
|
<property name="text">
|
||||||
|
<string>Show File Types Column</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="game_icon_size_qhbox_layout_2">
|
<layout class="QHBoxLayout" name="game_icon_size_qhbox_layout_2">
|
||||||
<item>
|
<item>
|
||||||
|
@ -788,6 +788,8 @@ void GameList::PopulateAsync(QVector<UISettings::GameDir>& game_dirs) {
|
|||||||
// Update the columns in case UISettings has changed
|
// Update the columns in case UISettings has changed
|
||||||
tree_view->setColumnHidden(COLUMN_ADD_ONS, !UISettings::values.show_add_ons);
|
tree_view->setColumnHidden(COLUMN_ADD_ONS, !UISettings::values.show_add_ons);
|
||||||
tree_view->setColumnHidden(COLUMN_COMPATIBILITY, !UISettings::values.show_compat);
|
tree_view->setColumnHidden(COLUMN_COMPATIBILITY, !UISettings::values.show_compat);
|
||||||
|
tree_view->setColumnHidden(COLUMN_FILE_TYPE, !UISettings::values.show_types);
|
||||||
|
tree_view->setColumnHidden(COLUMN_SIZE, !UISettings::values.show_size);
|
||||||
|
|
||||||
// Delete any rows that might already exist if we're repopulating
|
// Delete any rows that might already exist if we're repopulating
|
||||||
item_model->removeRows(0, item_model->rowCount());
|
item_model->removeRows(0, item_model->rowCount());
|
||||||
|
@ -132,6 +132,10 @@ struct Values {
|
|||||||
// Compatibility List
|
// Compatibility List
|
||||||
Settings::Setting<bool> show_compat{false, "show_compat"};
|
Settings::Setting<bool> show_compat{false, "show_compat"};
|
||||||
|
|
||||||
|
// Size & File Types Column
|
||||||
|
Settings::Setting<bool> show_size{true, "show_size"};
|
||||||
|
Settings::Setting<bool> show_types{true, "show_types"};
|
||||||
|
|
||||||
bool configuration_applied;
|
bool configuration_applied;
|
||||||
bool reset_to_defaults;
|
bool reset_to_defaults;
|
||||||
Settings::Setting<bool> disable_web_applet{true, "disable_web_applet"};
|
Settings::Setting<bool> disable_web_applet{true, "disable_web_applet"};
|
||||||
|
Loading…
Reference in New Issue
Block a user