Skip to content

Commit

Permalink
Merge pull request #8291 from AvaloniaUI/fix-fluent-loader
Browse files Browse the repository at this point in the history
Fix FluentTheme density style
  • Loading branch information
Takoooooo authored Jun 6, 2022
2 parents 7064690 + 7c8aa9e commit b3cf3d9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Avalonia.Themes.Fluent/FluentTheme.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ public DensityStyle DensityStyle
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
{
base.OnPropertyChanged(change);

if (_loaded is null)
{
// If style wasn't yet loaded, no need to change children styles,
// it will be applied later in Loaded getter.
return;
}

if (change.Property == ModeProperty)
{
if (Mode == FluentThemeMode.Dark)
Expand Down

0 comments on commit b3cf3d9

Please sign in to comment.