feat(settings): "Smart window size" toggle to opt out of monitor-relative
launch sizing Players who specifically prefer the literal 1280×800 baseline on every fresh-install launch had no way to opt out of the v0.19.0 smart-default sizer. Adds a Gameplay-section toggle (mirrors the "Winnable deals only" pattern) so they can flip it off. - New `Settings::disable_smart_default_size: bool` field with `#[serde(default)]` so legacy `settings.json` files load to the shipped behaviour (smart sizer enabled). - Settings panel gains a "Smart window size" row with ON/OFF label inverting the negative flag, and a tooltip clarifying that saved window geometry always wins over both branches. - `solitaire_app::main` reads the flag once at startup and skips the `apply_smart_default_window_size` registration when it's set. Mid-session changes apply on next launch (documented on the field). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -153,7 +153,12 @@ fn main() {
|
||||
// monitor opens the same 1280×800 window that a 1080p monitor
|
||||
// does — visually tiny relative to screen. Skipped entirely when
|
||||
// saved geometry was applied; the player's preference always wins.
|
||||
if !had_saved_geometry {
|
||||
//
|
||||
// Players who specifically want the literal 1280×800 baseline on
|
||||
// every fresh launch can flip `disable_smart_default_size` in
|
||||
// Settings to opt out. The flag is checked once at startup; a
|
||||
// mid-session change applies on the next launch.
|
||||
if !had_saved_geometry && !settings.disable_smart_default_size {
|
||||
app.add_systems(Update, apply_smart_default_window_size);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user