@@ -74,13 +74,21 @@ pub struct UserSettings {
7474 #[ serde( default = "default_double_click_threshold_ms" ) ]
7575 pub double_click_threshold_ms : u16 ,
7676
77- /// Max size for compressed file cache (bytes )
77+ /// Max size for compressed file cache (MB )
7878 #[ serde( default = "default_archive_cache_size" ) ]
7979 pub archive_cache_size : u64 ,
8080
8181 /// Warning threshold for solid archives (MB)
8282 #[ serde( default = "default_archive_warning_threshold_mb" ) ]
8383 pub archive_warning_threshold_mb : u64 ,
84+
85+ // Window position and state
86+ #[ serde( default ) ]
87+ pub window_position_x : i32 ,
88+ #[ serde( default ) ]
89+ pub window_position_y : i32 ,
90+ #[ serde( default ) ]
91+ pub is_fullscreen : bool ,
8492}
8593
8694fn default_show_footer ( ) -> bool {
@@ -161,6 +169,9 @@ impl Default for UserSettings {
161169 double_click_threshold_ms : config:: DEFAULT_DOUBLE_CLICK_THRESHOLD_MS ,
162170 archive_cache_size : config:: DEFAULT_ARCHIVE_CACHE_SIZE ,
163171 archive_warning_threshold_mb : config:: DEFAULT_ARCHIVE_WARNING_THRESHOLD_MB ,
172+ window_position_x : 0 ,
173+ window_position_y : 0 ,
174+ is_fullscreen : false ,
164175 }
165176 }
166177}
@@ -285,6 +296,9 @@ impl UserSettings {
285296 result = Self :: replace_yaml_value_or_track ( & result, "double_click_threshold_ms" , & self . double_click_threshold_ms . to_string ( ) , & mut missing_keys) ;
286297 result = Self :: replace_yaml_value_or_track ( & result, "archive_cache_size" , & self . archive_cache_size . to_string ( ) , & mut missing_keys) ;
287298 result = Self :: replace_yaml_value_or_track ( & result, "archive_warning_threshold_mb" , & self . archive_warning_threshold_mb . to_string ( ) , & mut missing_keys) ;
299+ result = Self :: replace_yaml_value_or_track ( & result, "window_position_x" , & self . window_position_x . to_string ( ) , & mut missing_keys) ;
300+ result = Self :: replace_yaml_value_or_track ( & result, "window_position_y" , & self . window_position_y . to_string ( ) , & mut missing_keys) ;
301+ result = Self :: replace_yaml_value_or_track ( & result, "is_fullscreen" , & self . is_fullscreen . to_string ( ) , & mut missing_keys) ;
288302
289303 // Append missing keys with comments
290304 if !missing_keys. is_empty ( ) {
@@ -325,7 +339,7 @@ impl UserSettings {
325339 "window_height" => "# Default window height (pixels)" . to_string ( ) ,
326340 "atlas_size" => "# Texture atlas size (affects slider performance, power of 2)" . to_string ( ) ,
327341 "double_click_threshold_ms" => "# Double-click detection threshold (milliseconds)" . to_string ( ) ,
328- "archive_cache_size" => "# Max size for compressed file cache (bytes )" . to_string ( ) ,
342+ "archive_cache_size" => "# Max size for compressed file cache (MB )" . to_string ( ) ,
329343 "archive_warning_threshold_mb" => "# Warning threshold for solid archives (megabytes)" . to_string ( ) ,
330344 _ => String :: new ( ) ,
331345 }
@@ -418,7 +432,7 @@ atlas_size: {}
418432# Double-click detection threshold (milliseconds)
419433double_click_threshold_ms: {}
420434
421- # Max size for compressed file cache (bytes )
435+ # Max size for compressed file cache (MB )
422436archive_cache_size: {}
423437
424438# Warning threshold for solid archives (megabytes)
0 commit comments