fix(ui): apply the saved appearance settings at startup
Low-spec mode, theme effects, blur, UI and noise opacity and the console scanline reached the live effects state only once the Settings page or the first-run wizard was opened. "Effects off" and low-spec therefore reverted at every launch, and the animated defaults kept the main loop busy (91% of a core on an idle Lite wallet whose effects were saved off). - App::applyVisualSettings(): one low-spec-aware path from the saved prefs to the effects state, used at startup (after the skin, since setActiveSkin reloads the effect config), by the low-spec hotkey, the wizard and the Settings page. - Low-spec stays a runtime-only override. The Settings page shows the overrides but persists the real prefs from its snapshot, and opening it under low-spec no longer turns theme effects and blur back on. Unticking a low-spec in the wizard that was loaded rather than ticked there now restores the saved prefs. - Theme effects on/off always pairs with reduced transparency (the rainbow, shimmer and glare layers), as at startup and in the hotkeys. - kAcrylicMaxBlur moves to imgui_acrylic.h, so startup clamps blur values saved in the old 0-4 range the way the slider does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+6
-7
@@ -357,13 +357,9 @@ void App::renderFirstRunWizard() {
|
||||
if (lang.first == wiz_cur_lang) { wiz_language_index = idx; break; }
|
||||
idx++;
|
||||
}
|
||||
// Apply loaded settings to runtime so visuals match slider values
|
||||
ui::effects::setLowSpecMode(wiz_low_spec);
|
||||
ui::effects::ImGuiAcrylic::ApplyBlurAmount(wiz_blur_amount);
|
||||
ui::effects::ImGuiAcrylic::SetUIOpacity(wiz_ui_opacity);
|
||||
ui::effects::ThemeEffects::instance().setEnabled(wiz_theme_effects);
|
||||
ui::effects::ThemeEffects::instance().setReducedTransparency(!wiz_theme_effects);
|
||||
ui::ConsoleTab::s_scanline_enabled = wiz_scanline;
|
||||
// Apply the loaded settings to the runtime (same low-spec-aware path as startup) so the
|
||||
// visuals match the slider values
|
||||
applyVisualSettings();
|
||||
wiz_appearance_init = true;
|
||||
}
|
||||
|
||||
@@ -538,6 +534,9 @@ void App::renderFirstRunWizard() {
|
||||
settings_->setScanlineEnabled(wiz_scanline);
|
||||
settings_->setLowSpecMode(wiz_low_spec);
|
||||
settings_->save();
|
||||
// Make the runtime match what was just saved, both ways: unticking a low-spec that was
|
||||
// loaded rather than ticked here has no snapshot, so the branch above pushes nothing.
|
||||
applyVisualSettings();
|
||||
}
|
||||
ImGui::PopStyleVar();
|
||||
ImGui::SameLine();
|
||||
|
||||
Reference in New Issue
Block a user