From c1bf11a472b47e737063e5e8a8c42eab16db377e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 2 Apr 2026 00:26:07 +0000 Subject: [PATCH 1/3] Initial plan From 2f928e0332d26e8a119d6ae7157d1f32ce9f7c6c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 2 Apr 2026 00:37:11 +0000 Subject: [PATCH 2/3] Add setting to swap left/right click tray icon behavior Agent-Logs-Url: https://github.com/TheJoeFin/Trdo/sessions/a6cfa946-5b29-414f-a4aa-88dff8af317d Co-authored-by: TheJoeFin <7809853+TheJoeFin@users.noreply.github.com> --- Trdo/App.xaml.cs | 32 +++++++++++++++++--- Trdo/Pages/SettingsPage.xaml | 14 +++++++++ Trdo/Services/SettingsService.cs | 44 ++++++++++++++++++++++++++++ Trdo/ViewModels/SettingsViewModel.cs | 16 ++++++++++ 4 files changed, 102 insertions(+), 4 deletions(-) diff --git a/Trdo/App.xaml.cs b/Trdo/App.xaml.cs index a085ee6..0ca9768 100644 --- a/Trdo/App.xaml.cs +++ b/Trdo/App.xaml.cs @@ -156,18 +156,36 @@ private void InitializeTrayIcon() private void TrayIcon_ContextMenu(TrayIcon sender, TrayIconEventArgs args) { - WindowPlacementService.CapturePointerAnchor(); - args.Flyout = CreateFlyout(); + if (SettingsService.TrayClickBehavior == 1) + { + // Swapped: right click plays/pauses (fall back to flyout if no station selected) + if (_playerVm.CanPlay) + { + _playerVm.Toggle(); + _ = UpdateTrayIconAsync(); + return; + } + } + + // Default: right click opens flyout; also fallback when no station is available + ShowFlyout(args); } private void TrayIcon_Selected(TrayIcon sender, TrayIconEventArgs args) { + if (SettingsService.TrayClickBehavior == 1) + { + // Swapped: left click opens flyout + ShowFlyout(args); + return; + } + + // Default: left click plays/pauses // Check if we can play (have stations available and one selected) if (!_playerVm.CanPlay) { // No stations available, show the flyout to encourage user to add a station - WindowPlacementService.CapturePointerAnchor(); - args.Flyout = CreateFlyout(); + ShowFlyout(args); return; } @@ -176,6 +194,12 @@ private void TrayIcon_Selected(TrayIcon sender, TrayIconEventArgs args) _ = UpdateTrayIconAsync(); } + private void ShowFlyout(TrayIconEventArgs args) + { + WindowPlacementService.CapturePointerAnchor(); + args.Flyout = CreateFlyout(); + } + private Flyout CreateFlyout() { Flyout flyout = new() diff --git a/Trdo/Pages/SettingsPage.xaml b/Trdo/Pages/SettingsPage.xaml index 45101f3..31d2780 100644 --- a/Trdo/Pages/SettingsPage.xaml +++ b/Trdo/Pages/SettingsPage.xaml @@ -86,6 +86,20 @@ + + + + + + + + + + diff --git a/Trdo/Services/SettingsService.cs b/Trdo/Services/SettingsService.cs index c676d77..a5f14cc 100644 --- a/Trdo/Services/SettingsService.cs +++ b/Trdo/Services/SettingsService.cs @@ -15,6 +15,7 @@ public static class SettingsService private const string IsDiscogsEnabledKey = "IsDiscogsEnabled"; private const string IsAppleMusicEnabledKey = "IsAppleMusicEnabled"; private const string IsYouTubeMusicEnabledKey = "IsYouTubeMusicEnabled"; + private const string TrayClickBehaviorKey = "TrayClickBehavior"; public static event EventHandler? MusicSearchServicesChanged; @@ -136,6 +137,49 @@ public static bool IsYouTubeMusicEnabled set => SetBoolSetting(IsYouTubeMusicEnabledKey, value); } + /// + /// Gets or sets the tray icon click behavior. + /// 0 = left click plays/pauses, right click opens flyout (default). + /// 1 = left click opens flyout, right click plays/pauses. + /// + public static int TrayClickBehavior + { + get + { + try + { + if (ApplicationData.Current.LocalSettings.Values.TryGetValue(TrayClickBehaviorKey, out object? value)) + { + return value switch + { + int i => i, + string s when int.TryParse(s, out int i2) => i2, + _ => 0 + }; + } + return 0; + } + catch + { + return 0; + } + } + set + { + try + { + // Only valid values are 0 (default) and 1 (swapped) + if (value < 0 || value > 1) + value = 0; + ApplicationData.Current.LocalSettings.Values[TrayClickBehaviorKey] = value; + } + catch + { + // Silently fail if unable to save + } + } + } + private static bool GetBoolSetting(string key, bool defaultValue) { try diff --git a/Trdo/ViewModels/SettingsViewModel.cs b/Trdo/ViewModels/SettingsViewModel.cs index 71cb010..4eecf9e 100644 --- a/Trdo/ViewModels/SettingsViewModel.cs +++ b/Trdo/ViewModels/SettingsViewModel.cs @@ -241,6 +241,22 @@ public string YouTubeMusicToggleText } } + /// + /// Gets or sets the tray icon click behavior. + /// 0 = left click plays/pauses, right click opens flyout (default). + /// 1 = left click opens flyout, right click plays/pauses. + /// + public int TrayClickBehavior + { + get => SettingsService.TrayClickBehavior; + set + { + if (value == SettingsService.TrayClickBehavior) return; + SettingsService.TrayClickBehavior = value; + OnPropertyChanged(); + } + } + public bool IsWatchdogEnabled { get => _playerViewModel.WatchdogEnabled; From 5031f27e6a85130025cb69c8e0e45bfd2c39c159 Mon Sep 17 00:00:00 2001 From: Joe Finney Date: Wed, 1 Apr 2026 20:20:58 -0500 Subject: [PATCH 3/3] Redesign settings UI with card layout and improved styles Refactored SettingsPage.xaml to use card-style Borders for each setting, added new styles for titles, descriptions, and status text, and improved layout and alignment of controls. Enhanced clarity, grouping, and overall user experience. --- Trdo/Pages/SettingsPage.xaml | 749 +++++++++++++++++------------------ 1 file changed, 367 insertions(+), 382 deletions(-) diff --git a/Trdo/Pages/SettingsPage.xaml b/Trdo/Pages/SettingsPage.xaml index 31d2780..5326a09 100644 --- a/Trdo/Pages/SettingsPage.xaml +++ b/Trdo/Pages/SettingsPage.xaml @@ -10,6 +10,35 @@ + + + + + @@ -22,403 +51,359 @@ - - - - - - - - - + + + + + + + + + + + - - - - - - -