-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fix: Column view trace not updating on theme change #18056
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fix: Column view trace not updating on theme change #18056
Conversation
…12577) Added ActualThemeChanged event listener to ColumnLayoutPage to detect theme changes and reapply folder background colors. - Subscribe to ActualThemeChanged in OnNavigatedTo - Unsubscribe in OnNavigatingFrom to prevent memory leaks - Reapply folder background when theme changes - Fixes issue where trace was invisible when app theme differs from system theme Follows the same pattern as SpeedGraph.cs for handling theme changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
| currentIconSize = LayoutSizeKindHelper.GetIconSize(FolderLayoutModes.ColumnView); | ||
|
|
||
| UserSettingsService.LayoutSettingsService.PropertyChanged += LayoutSettingsService_PropertyChanged; | ||
| this.ActualThemeChanged += ColumnLayoutPage_ActualThemeChanged; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you bind to the event directly from xaml instead of manually subscribing and unsubscribing from code behind?
Unfortunately, this doesn't appear to resolve the issue. What issues are you having with compiling the project? |
Extremly Sorry for the Late reply and forgive me. This might be something versy silly but I might be doing something very dumb , I am new Can you guide me where am i Making the mistake. |
|
Did you set the packing project as the startup project? |
Yes sir I did |
Resolved / Related Issues
Quality Checklist
Steps used to test these changes
Due to system constraints with UWP packaging and deployment, I was unable to run the full app locally to test the fix at runtime. However, I have completed the following verification:
SpeedGraph.cs(lines 88-95)Implementation Details
The fix adds an
ActualThemeChangedevent handler toColumnLayoutPage.xaml.csthat reapplies the folder background color when the app theme changes. This ensures the visual trace (highlighted folder background) updates correctly when switching between Light/Dark themes.Changes Made:
OnNavigatedTo():this.ActualThemeChanged += ColumnLayoutPage_ActualThemeChanged;OnNavigatingFrom():this.ActualThemeChanged -= ColumnLayoutPage_ActualThemeChanged;SetFolderBackground()to reapply the theme-appropriate background colorTesting Request
Due to the system limitations mentioned above, I was unable to verify the fix in the running application. It would be greatly appreciated if a maintainer or reviewer could test this change to confirm it resolves the issue as expected. I am eager to address any feedback and make additional changes if needed to ensure this fix works correctly.
The solution builds successfully and the implementation follows established patterns in the codebase, so I'm confident in the approach, but runtime verification would be valuable.