mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-22 19:00:14 -05:00
config: Read UISettings as basic settings
I must have been asleep or something. These need to be read with the new ReadBasicSetting function.
This commit is contained in:
parent
cf1cd3321d
commit
38f658d21e
1 changed files with 19 additions and 30 deletions
|
@ -926,10 +926,8 @@ void Config::ReadUIValues() {
|
||||||
UISettings::values.theme =
|
UISettings::values.theme =
|
||||||
ReadSetting(QStringLiteral("theme"), QString::fromUtf8(UISettings::themes[0].second))
|
ReadSetting(QStringLiteral("theme"), QString::fromUtf8(UISettings::themes[0].second))
|
||||||
.toString();
|
.toString();
|
||||||
UISettings::values.enable_discord_presence =
|
ReadBasicSetting(UISettings::values.enable_discord_presence);
|
||||||
ReadSetting(QStringLiteral("enable_discord_presence"), true).toBool();
|
ReadBasicSetting(UISettings::values.select_user_on_boot);
|
||||||
UISettings::values.select_user_on_boot =
|
|
||||||
ReadSetting(QStringLiteral("select_user_on_boot"), false).toBool();
|
|
||||||
|
|
||||||
ReadUIGamelistValues();
|
ReadUIGamelistValues();
|
||||||
ReadUILayoutValues();
|
ReadUILayoutValues();
|
||||||
|
@ -937,24 +935,17 @@ void Config::ReadUIValues() {
|
||||||
ReadScreenshotValues();
|
ReadScreenshotValues();
|
||||||
ReadShortcutValues();
|
ReadShortcutValues();
|
||||||
|
|
||||||
UISettings::values.single_window_mode =
|
ReadBasicSetting(UISettings::values.single_window_mode);
|
||||||
ReadSetting(QStringLiteral("singleWindowMode"), true).toBool();
|
ReadBasicSetting(UISettings::values.fullscreen);
|
||||||
UISettings::values.fullscreen = ReadSetting(QStringLiteral("fullscreen"), false).toBool();
|
ReadBasicSetting(UISettings::values.display_titlebar);
|
||||||
UISettings::values.display_titlebar =
|
ReadBasicSetting(UISettings::values.show_filter_bar);
|
||||||
ReadSetting(QStringLiteral("displayTitleBars"), true).toBool();
|
ReadBasicSetting(UISettings::values.show_status_bar);
|
||||||
UISettings::values.show_filter_bar =
|
ReadBasicSetting(UISettings::values.confirm_before_closing);
|
||||||
ReadSetting(QStringLiteral("showFilterBar"), true).toBool();
|
ReadBasicSetting(UISettings::values.first_start);
|
||||||
UISettings::values.show_status_bar =
|
ReadBasicSetting(UISettings::values.callout_flags);
|
||||||
ReadSetting(QStringLiteral("showStatusBar"), true).toBool();
|
ReadBasicSetting(UISettings::values.show_console);
|
||||||
UISettings::values.confirm_before_closing =
|
ReadBasicSetting(UISettings::values.pause_when_in_background);
|
||||||
ReadSetting(QStringLiteral("confirmClose"), true).toBool();
|
ReadBasicSetting(UISettings::values.hide_mouse);
|
||||||
UISettings::values.first_start = ReadSetting(QStringLiteral("firstStart"), true).toBool();
|
|
||||||
UISettings::values.callout_flags = ReadSetting(QStringLiteral("calloutFlags"), 0).toUInt();
|
|
||||||
UISettings::values.show_console = ReadSetting(QStringLiteral("showConsole"), false).toBool();
|
|
||||||
UISettings::values.pause_when_in_background =
|
|
||||||
ReadSetting(QStringLiteral("pauseWhenInBackground"), false).toBool();
|
|
||||||
UISettings::values.hide_mouse =
|
|
||||||
ReadSetting(QStringLiteral("hideInactiveMouse"), false).toBool();
|
|
||||||
|
|
||||||
qt_config->endGroup();
|
qt_config->endGroup();
|
||||||
}
|
}
|
||||||
|
@ -962,12 +953,11 @@ void Config::ReadUIValues() {
|
||||||
void Config::ReadUIGamelistValues() {
|
void Config::ReadUIGamelistValues() {
|
||||||
qt_config->beginGroup(QStringLiteral("UIGameList"));
|
qt_config->beginGroup(QStringLiteral("UIGameList"));
|
||||||
|
|
||||||
UISettings::values.show_add_ons = ReadSetting(QStringLiteral("show_add_ons"), true).toBool();
|
ReadBasicSetting(UISettings::values.show_add_ons);
|
||||||
UISettings::values.icon_size = ReadSetting(QStringLiteral("icon_size"), 64).toUInt();
|
ReadBasicSetting(UISettings::values.icon_size);
|
||||||
UISettings::values.row_1_text_id = ReadSetting(QStringLiteral("row_1_text_id"), 3).toUInt();
|
ReadBasicSetting(UISettings::values.row_1_text_id);
|
||||||
UISettings::values.row_2_text_id = ReadSetting(QStringLiteral("row_2_text_id"), 2).toUInt();
|
ReadBasicSetting(UISettings::values.row_2_text_id);
|
||||||
UISettings::values.cache_game_list =
|
ReadBasicSetting(UISettings::values.cache_game_list);
|
||||||
ReadSetting(QStringLiteral("cache_game_list"), true).toBool();
|
|
||||||
const int favorites_size = qt_config->beginReadArray(QStringLiteral("favorites"));
|
const int favorites_size = qt_config->beginReadArray(QStringLiteral("favorites"));
|
||||||
for (int i = 0; i < favorites_size; i++) {
|
for (int i = 0; i < favorites_size; i++) {
|
||||||
qt_config->setArrayIndex(i);
|
qt_config->setArrayIndex(i);
|
||||||
|
@ -990,8 +980,7 @@ void Config::ReadUILayoutValues() {
|
||||||
ReadSetting(QStringLiteral("gameListHeaderState")).toByteArray();
|
ReadSetting(QStringLiteral("gameListHeaderState")).toByteArray();
|
||||||
UISettings::values.microprofile_geometry =
|
UISettings::values.microprofile_geometry =
|
||||||
ReadSetting(QStringLiteral("microProfileDialogGeometry")).toByteArray();
|
ReadSetting(QStringLiteral("microProfileDialogGeometry")).toByteArray();
|
||||||
UISettings::values.microprofile_visible =
|
ReadBasicSetting(UISettings::values.microprofile_visible);
|
||||||
ReadSetting(QStringLiteral("microProfileDialogVisible"), false).toBool();
|
|
||||||
|
|
||||||
qt_config->endGroup();
|
qt_config->endGroup();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue