mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-29 00:33:01 +00:00
Qt: use column names instead of numbers in gui_settings
This commit is contained in:
parent
d1a9afbd67
commit
99c52a0d0c
@ -265,5 +265,5 @@ gui_save gui_settings::GetGuiSaveForColumn(int col)
|
||||
{
|
||||
// hide sound format, parental level, firmware version and path by default
|
||||
bool show = col != gui::column_sound && col != gui::column_parental && col != gui::column_firmware && col != gui::column_path;
|
||||
return gui_save{ gui::game_list, "Col" + QString::number(col) + "visible", show };
|
||||
return gui_save{ gui::game_list, "visibility_" + gui::get_game_list_column_name((gui::game_list_columns)col), show };
|
||||
}
|
||||
|
@ -62,6 +62,40 @@ namespace gui
|
||||
column_count
|
||||
};
|
||||
|
||||
inline QString get_game_list_column_name(game_list_columns col)
|
||||
{
|
||||
switch (col)
|
||||
{
|
||||
case column_icon:
|
||||
return "column_icon";
|
||||
case column_name:
|
||||
return "column_name";
|
||||
case column_serial:
|
||||
return "column_serial";
|
||||
case column_firmware:
|
||||
return "column_firmware";
|
||||
case column_version:
|
||||
return "column_version";
|
||||
case column_category:
|
||||
return "column_category";
|
||||
case column_path:
|
||||
return "column_path";
|
||||
case column_move:
|
||||
return "column_move";
|
||||
case column_resolution:
|
||||
return "column_resolution";
|
||||
case column_sound:
|
||||
return "column_sound";
|
||||
case column_parental:
|
||||
return "column_parental";
|
||||
case column_compat:
|
||||
return "column_compat";
|
||||
case column_count:
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
};
|
||||
|
||||
const QSize gl_icon_size_min = QSize(40, 22);
|
||||
const QSize gl_icon_size_small = QSize(80, 44);
|
||||
const QSize gl_icon_size_medium = QSize(160, 88);
|
||||
@ -242,3 +276,5 @@ private:
|
||||
QSettings m_settings;
|
||||
QDir m_settingsDir;
|
||||
};
|
||||
|
||||
static gui_save GetGuiSaveForColumn(int col);
|
||||
|
Loading…
x
Reference in New Issue
Block a user