Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/Wpf.Ui/Appearance/ApplicationAccentColorManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
/// <summary>
/// The maximum value of the background HSV brightness after which the text on the accent will be turned dark.
/// </summary>
private const double BackgroundBrightnessThresholdValue = 80d;

Check warning on line 55 in src/Wpf.Ui/Appearance/ApplicationAccentColorManager.cs

View workflow job for this annotation

GitHub Actions / build


/// <summary>
/// Gets the SystemAccentColor.
Expand Down Expand Up @@ -258,6 +258,13 @@
Color tertiaryAccent
)
{
// If the application is shut down (Application.Current becomes null), we cannot change resources, so return immediately.
var app = Application.Current;
if (app == null)
{
return;
}

System.Diagnostics.Debug.WriteLine("INFO | SystemAccentColor: " + systemAccent, "Wpf.Ui.Accent");
System.Diagnostics.Debug.WriteLine(
"INFO | SystemAccentColorPrimary: " + primaryAccent,
Expand Down
Loading