Skip to content

Fix: Column view trace not updating on theme change#18056

Open
R0h1tAnand wants to merge 1 commit intofiles-community:mainfrom
R0h1tAnand:fix/column-view-theme-trace-12577
Open

Fix: Column view trace not updating on theme change#18056
R0h1tAnand wants to merge 1 commit intofiles-community:mainfrom
R0h1tAnand:fix/column-view-theme-trace-12577

Conversation

@R0h1tAnand
Copy link

Resolved / Related Issues

Quality Checklist

  • ✅ Follows established code patterns (ActualThemeChanged event handler similar to SpeedGraph.cs)
  • ✅ Follows Files coding style guidelines (tabs, PascalCase, proper structure)
  • ✅ Code formatting verified with dotnet format
  • ✅ Single logical change addressing one specific issue
  • ✅ PR linked to approved issue marked as "Ready to build"

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:

  1. ✅ Build verification: Successfully compiled the solution with 0 errors (Release configuration, x64)
  2. ✅ Code pattern validation: Implemented the fix following the exact same pattern used in SpeedGraph.cs (lines 88-95)
  3. ✅ Code review: Verified the logic correctly reapplies folder background when theme changes
  4. ✅ Style compliance: Passed formatting checks against Files coding guidelines

Implementation Details

The fix adds an ActualThemeChanged event handler to ColumnLayoutPage.xaml.cs that 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:

  • Added event subscription in OnNavigatedTo(): this.ActualThemeChanged += ColumnLayoutPage_ActualThemeChanged;
  • Added event unsubscription in OnNavigatingFrom(): this.ActualThemeChanged -= ColumnLayoutPage_ActualThemeChanged;
  • Added new event handler method that calls SetFolderBackground() to reapply the theme-appropriate background color

Testing 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.

…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.
Copilot AI review requested due to automatic review settings January 13, 2026 19:28
@yair100 yair100 added the ready for review Pull requests that are ready for review label Jan 13, 2026
Copy link
Contributor

Copilot AI left a 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;
Copy link
Member

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?

@yair100
Copy link
Member

yair100 commented Jan 14, 2026

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:

Unfortunately, this doesn't appear to resolve the issue. What issues are you having with compiling the project?

@yair100 yair100 added changes requested Changes are needed for this pull request and removed ready for review Pull requests that are ready for review labels Jan 14, 2026
@R0h1tAnand
Copy link
Author

R0h1tAnand commented Jan 23, 2026

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:

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.
When I am select the File.app which comes on the right sidebar and then selecting the Files from the top button and then running it.
I would like to add I have checked that I have all the dependencies required installed and on the terminal it sayd that it has build the app successfully but the apps doesnt pop up.

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.

@yair100
Copy link
Member

yair100 commented Jan 26, 2026

Did you set the packing project as the startup project?

@R0h1tAnand
Copy link
Author

Did you set the packing project as the startup project?

Yes sir I did

@yair100
Copy link
Member

yair100 commented Feb 2, 2026

After deploying, does Files Dev come up in the Start Menu?

@R0h1tAnand
Copy link
Author

R0h1tAnand commented Feb 2, 2026 via email

@yair100
Copy link
Member

yair100 commented Feb 2, 2026

It sounds like it wasn't deployed. Please share a screenshot of Visual Studio.

@R0h1tAnand
Copy link
Author

It sounds like it wasn't deployed. Please share a screenshot of Visual Studio.

I will try again and will update you ASAP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changes requested Changes are needed for this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Trace to visualize the path in column view don't work if the app theme is different than system theme

2 participants

Comments