Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 30, 2025

Theme toggling was broken on both platforms: Android searchbar showed white text in light mode, lyrics borders didn't adapt to theme, sync lyrics page remained dark in light mode, navigation bar went blank on toggle, and Windows theme switching had no effect.

Changes

Android

  • Set searchbar text color explicitly based on UiBuilder.IsDark() in HomePageFragment.cs
  • Made lyrics border colors theme-aware in SongAdapter.cs (DarkSlateBlue for dark, #483D8B for light)
  • Made sync lyrics overlay opacity theme-aware in LyricsViewFragment.cs (150 alpha for dark, 200 for light)
  • Call Activity.Recreate() after theme toggle in BaseViewModelAnd.cs to properly reload all themed resources

Windows

  • Change ElementTheme on window root element in SettingsPage.xaml.cs
  • Update MAUI UserAppTheme to sync both theme systems
// Windows theme switching
var window = PlatUtils.GetNativeWindowFromMAUIWindow();
if (window != null && window.Content is FrameworkElement rootElement)
{
    rootElement.RequestedTheme = isDark ? ElementTheme.Dark : ElementTheme.Light;
}
Application.Current.UserAppTheme = isDark ? AppTheme.Dark : AppTheme.Light;
// Android theme-aware border
var isDark = UiBuilder.IsDark(_container.Context.Resources.Configuration);
_container.SetStrokeColor(AppUtil.ToColorStateList(
    isDark ? Color.DarkSlateBlue : Color.ParseColor("#483D8B")));

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • crl.godaddy.com
    • Triggering command: /usr/bin/dotnet dotnet restore --no-dependencies /home/REDACTED/work/Dimmer-MAUI/.codeql-scratch/dbs/csharp/working/EB23B7D1B15B85081672081E55C17E18/missingpackages_workingdir --packages /home/REDACTED/work/Dimmer-MAUI/.codeql-scratch/dbs/csharp/working/missingpackages /p:DisableImplicitNuGetFallbackFolder=true --verbosity normal --configfile /home/REDACTED/work/Dimmer-MAUI/.codeql-scratch/dbs/csharp/working/nugetconfig/nuget.config --force (dns block)
  • ocsp.godaddy.com
    • Triggering command: /usr/bin/dotnet dotnet restore --no-dependencies /home/REDACTED/work/Dimmer-MAUI/.codeql-scratch/dbs/csharp/working/EB23B7D1B15B85081672081E55C17E18/missingpackages_workingdir --packages /home/REDACTED/work/Dimmer-MAUI/.codeql-scratch/dbs/csharp/working/missingpackages /p:DisableImplicitNuGetFallbackFolder=true --verbosity normal --configfile /home/REDACTED/work/Dimmer-MAUI/.codeql-scratch/dbs/csharp/working/nugetconfig/nuget.config --force (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>fix theme completely</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)

@YBTopaz8 Maui has theming all setup already so switching will apply the right colors But in android I observe a couple of issues - toggling from dark to light theme or vice versa would cause the nav bar to go blank as if I'd need to call update layout or similar methods. - the searchbar in light theme shows text in white so not readable. - the border color for song with lyrics when dark is something light-ish but I didn't do a IsDark() to set the right color for when we are on light mode. Color will be dark slate blue for now. - sync lyrics page is still quite dark ish in light mode

On Windows switching theme does absolutely nothing so I gotta start accounting for that </comment_new>


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fix theme issues on Android and Windows platforms Fix theme switching on Android and Windows Dec 30, 2025
Copilot AI requested a review from YBTopaz8 December 30, 2025 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix theme completely

2 participants