@@ -26,10 +26,6 @@ internal sealed class TrayApplication : IDisposable
2626 private string ? _lastFetchError ;
2727 private int ? _hoverWindowLeft ;
2828 private int ? _hoverWindowTop ;
29- private int ? _hoverWindowWidth ;
30- private int ? _hoverWindowHeight ;
31- private int ? _maxHoverTitleWidth ;
32- private int ? _maxMenuTextWidth ;
3329
3430 // Overlay is now always enabled; legacy flag retained only for backward compatible config file reads.
3531
@@ -384,7 +380,7 @@ internal void SetCalendarUrl(string? url)
384380 this . _calendarUrl = string . IsNullOrWhiteSpace ( url ) ? string . Empty : url . Trim ( ) ;
385381
386382 // Save full config to preserve other values
387- this . SaveConfig ( new ConfigModel { CalendarUrl = this . _calendarUrl , RefreshMinutes = this . _refreshMinutes , ShowHoverWindow = this . _showHoverWindow , IgnoreFreeOrFollowing = this . _ignoreFreeOrFollowing , HoverWindowLeft = this . _hoverWindowLeft , HoverWindowTop = this . _hoverWindowTop , HoverWindowWidth = this . _hoverWindowWidth , HoverWindowHeight = this . _hoverWindowHeight , MaxHoverTitleWidth = this . _maxHoverTitleWidth , MaxMenuTextWidth = this . _maxMenuTextWidth } ) ;
383+ this . SaveConfig ( new ConfigModel { CalendarUrl = this . _calendarUrl , RefreshMinutes = this . _refreshMinutes , ShowHoverWindow = this . _showHoverWindow , IgnoreFreeOrFollowing = this . _ignoreFreeOrFollowing , HoverWindowLeft = this . _hoverWindowLeft , HoverWindowTop = this . _hoverWindowTop } ) ;
388384 }
389385
390386 /// <summary>Sets refresh interval minutes and persists config.</summary>
@@ -397,7 +393,7 @@ internal void SetRefreshMinutes(int minutes)
397393 }
398394
399395 this . _refreshMinutes = minutes ;
400- this . SaveConfig ( new ConfigModel { CalendarUrl = this . _calendarUrl , RefreshMinutes = this . _refreshMinutes , ShowHoverWindow = this . _showHoverWindow , IgnoreFreeOrFollowing = this . _ignoreFreeOrFollowing , HoverWindowLeft = this . _hoverWindowLeft , HoverWindowTop = this . _hoverWindowTop , HoverWindowWidth = this . _hoverWindowWidth , HoverWindowHeight = this . _hoverWindowHeight , MaxHoverTitleWidth = this . _maxHoverTitleWidth , MaxMenuTextWidth = this . _maxMenuTextWidth } ) ;
396+ this . SaveConfig ( new ConfigModel { CalendarUrl = this . _calendarUrl , RefreshMinutes = this . _refreshMinutes , ShowHoverWindow = this . _showHoverWindow , IgnoreFreeOrFollowing = this . _ignoreFreeOrFollowing , HoverWindowLeft = this . _hoverWindowLeft , HoverWindowTop = this . _hoverWindowTop } ) ;
401397 }
402398
403399 /// <summary>Gets whether to show the hover window.</summary>
@@ -409,7 +405,7 @@ internal void SetRefreshMinutes(int minutes)
409405 internal void SetShowHoverWindow ( bool v )
410406 {
411407 this . _showHoverWindow = v ;
412- this . SaveConfig ( new ConfigModel { CalendarUrl = this . _calendarUrl , RefreshMinutes = this . _refreshMinutes , ShowHoverWindow = this . _showHoverWindow , IgnoreFreeOrFollowing = this . _ignoreFreeOrFollowing , HoverWindowLeft = this . _hoverWindowLeft , HoverWindowTop = this . _hoverWindowTop , HoverWindowWidth = this . _hoverWindowWidth , HoverWindowHeight = this . _hoverWindowHeight , MaxHoverTitleWidth = this . _maxHoverTitleWidth , MaxMenuTextWidth = this . _maxMenuTextWidth } ) ;
408+ this . SaveConfig ( new ConfigModel { CalendarUrl = this . _calendarUrl , RefreshMinutes = this . _refreshMinutes , ShowHoverWindow = this . _showHoverWindow , IgnoreFreeOrFollowing = this . _ignoreFreeOrFollowing , HoverWindowLeft = this . _hoverWindowLeft , HoverWindowTop = this . _hoverWindowTop } ) ;
413409 }
414410
415411 /// <summary>
@@ -424,37 +420,7 @@ internal void SetShowHoverWindow(bool v)
424420 /// <returns>Top coordinate in screen pixels, or null if not set.</returns>
425421 internal int ? GetHoverWindowTopForUi ( ) => this . _hoverWindowTop ;
426422
427- /// <summary>Gets saved hover window width in pixels.</summary>
428- /// <returns>Width in pixels or null.</returns>
429- internal int ? GetHoverWindowWidthForUi ( ) => this . _hoverWindowWidth ;
430-
431- /// <summary>Gets saved hover window height in pixels.</summary>
432- /// <returns>Height in pixels or null.</returns>
433- internal int ? GetHoverWindowHeightForUi ( ) => this . _hoverWindowHeight ;
434-
435- /// <summary>Gets configured maximum hover title width in pixels for truncation purposes.</summary>
436- /// <returns>Max hover title width in pixels or null to use default.</returns>
437- internal int ? GetHoverTitleMaxWidthForUi ( ) => this . _maxHoverTitleWidth ;
438-
439- /// <summary>Sets configured maximum hover title width in pixels and persists config.</summary>
440- /// <param name="pixels">Width in pixels or null to clear.</param>
441- internal void SetHoverTitleMaxWidth ( int ? pixels )
442- {
443- this . _maxHoverTitleWidth = pixels ;
444- this . SaveConfig ( new ConfigModel { CalendarUrl = this . _calendarUrl , RefreshMinutes = this . _refreshMinutes , ShowHoverWindow = this . _showHoverWindow , IgnoreFreeOrFollowing = this . _ignoreFreeOrFollowing , HoverWindowLeft = this . _hoverWindowLeft , HoverWindowTop = this . _hoverWindowTop , HoverWindowWidth = this . _hoverWindowWidth , HoverWindowHeight = this . _hoverWindowHeight , MaxHoverTitleWidth = this . _maxHoverTitleWidth , MaxMenuTextWidth = this . _maxMenuTextWidth } ) ;
445- }
446-
447- /// <summary>Gets configured maximum menu text width in pixels for truncation purposes.</summary>
448- /// <returns>Max menu text width in pixels or null to use default.</returns>
449- internal int ? GetMenuTextMaxWidthForUi ( ) => this . _maxMenuTextWidth ;
450-
451- /// <summary>Sets configured maximum menu text width in pixels and persists config.</summary>
452- /// <param name="pixels">Width in pixels or null to clear.</param>
453- internal void SetMenuTextMaxWidth ( int ? pixels )
454- {
455- this . _maxMenuTextWidth = pixels ;
456- this . SaveConfig ( new ConfigModel { CalendarUrl = this . _calendarUrl , RefreshMinutes = this . _refreshMinutes , ShowHoverWindow = this . _showHoverWindow , IgnoreFreeOrFollowing = this . _ignoreFreeOrFollowing , HoverWindowLeft = this . _hoverWindowLeft , HoverWindowTop = this . _hoverWindowTop , HoverWindowWidth = this . _hoverWindowWidth , HoverWindowHeight = this . _hoverWindowHeight , MaxHoverTitleWidth = this . _maxHoverTitleWidth , MaxMenuTextWidth = this . _maxMenuTextWidth } ) ;
457- }
423+ // Hover window size getters removed; sizes are not persisted.
458424
459425 /// <summary>
460426 /// Sets hover window position and persists config.
@@ -465,17 +431,7 @@ internal void SetHoverWindowPosition(int? left, int? top)
465431 {
466432 this . _hoverWindowLeft = left ;
467433 this . _hoverWindowTop = top ;
468- this . SaveConfig ( new ConfigModel { CalendarUrl = this . _calendarUrl , RefreshMinutes = this . _refreshMinutes , ShowHoverWindow = this . _showHoverWindow , IgnoreFreeOrFollowing = this . _ignoreFreeOrFollowing , HoverWindowLeft = this . _hoverWindowLeft , HoverWindowTop = this . _hoverWindowTop , HoverWindowWidth = this . _hoverWindowWidth , HoverWindowHeight = this . _hoverWindowHeight , MaxHoverTitleWidth = this . _maxHoverTitleWidth , MaxMenuTextWidth = this . _maxMenuTextWidth } ) ;
469- }
470-
471- /// <summary>Sets hover window size and persists config.</summary>
472- /// <param name="width">Width in pixels, or null to clear.</param>
473- /// <param name="height">Height in pixels, or null to clear.</param>
474- internal void SetHoverWindowSize ( int ? width , int ? height )
475- {
476- this . _hoverWindowWidth = width ;
477- this . _hoverWindowHeight = height ;
478- this . SaveConfig ( new ConfigModel { CalendarUrl = this . _calendarUrl , RefreshMinutes = this . _refreshMinutes , ShowHoverWindow = this . _showHoverWindow , IgnoreFreeOrFollowing = this . _ignoreFreeOrFollowing , HoverWindowLeft = this . _hoverWindowLeft , HoverWindowTop = this . _hoverWindowTop , HoverWindowWidth = this . _hoverWindowWidth , HoverWindowHeight = this . _hoverWindowHeight , MaxHoverTitleWidth = this . _maxHoverTitleWidth , MaxMenuTextWidth = this . _maxMenuTextWidth } ) ;
434+ this . SaveConfig ( new ConfigModel { CalendarUrl = this . _calendarUrl , RefreshMinutes = this . _refreshMinutes , ShowHoverWindow = this . _showHoverWindow , IgnoreFreeOrFollowing = this . _ignoreFreeOrFollowing , HoverWindowLeft = this . _hoverWindowLeft , HoverWindowTop = this . _hoverWindowTop } ) ;
479435 }
480436
481437 /// <summary>Gets whether free/following meetings are ignored.</summary>
@@ -487,7 +443,7 @@ internal void SetHoverWindowSize(int? width, int? height)
487443 internal void SetIgnoreFreeOrFollowing ( bool v )
488444 {
489445 this . _ignoreFreeOrFollowing = v ;
490- this . SaveConfig ( new ConfigModel { CalendarUrl = this . _calendarUrl , RefreshMinutes = this . _refreshMinutes , ShowHoverWindow = this . _showHoverWindow , IgnoreFreeOrFollowing = this . _ignoreFreeOrFollowing , HoverWindowLeft = this . _hoverWindowLeft , HoverWindowTop = this . _hoverWindowTop , HoverWindowWidth = this . _hoverWindowWidth , HoverWindowHeight = this . _hoverWindowHeight , MaxHoverTitleWidth = this . _maxHoverTitleWidth , MaxMenuTextWidth = this . _maxMenuTextWidth } ) ;
446+ this . SaveConfig ( new ConfigModel { CalendarUrl = this . _calendarUrl , RefreshMinutes = this . _refreshMinutes , ShowHoverWindow = this . _showHoverWindow , IgnoreFreeOrFollowing = this . _ignoreFreeOrFollowing , HoverWindowLeft = this . _hoverWindowLeft , HoverWindowTop = this . _hoverWindowTop } ) ;
491447 }
492448
493449 /// <summary>
@@ -564,26 +520,6 @@ private void LoadConfig()
564520 {
565521 this . _hoverWindowTop = ht ;
566522 }
567-
568- if ( cfg . HoverWindowWidth is int ww )
569- {
570- this . _hoverWindowWidth = ww ;
571- }
572-
573- if ( cfg . MaxHoverTitleWidth is int mhw )
574- {
575- this . _maxHoverTitleWidth = mhw ;
576- }
577-
578- if ( cfg . MaxMenuTextWidth is int mmw )
579- {
580- this . _maxMenuTextWidth = mmw ;
581- }
582-
583- if ( cfg . HoverWindowHeight is int wh )
584- {
585- this . _hoverWindowHeight = wh ;
586- }
587523 }
588524 }
589525 catch ( JsonException )
@@ -608,7 +544,5 @@ private void LoadConfig()
608544 this . _configErrorDetected = true ;
609545 }
610546 }
611-
612- // Removed legacy MaybeShowBalloon method.
613547 }
614548}
0 commit comments