Skip to content

Commit

Permalink
Update bg choices #163
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben2776 committed Sep 15, 2024
1 parent ab7a802 commit 104293b
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/PicView.Avalonia/UI/ThemeHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static void ChangeBackground(MainViewModel vm)
{
return;
}
SettingsHelper.Settings.UIProperties.BgColorChoice = (SettingsHelper.Settings.UIProperties.BgColorChoice + 1) % 8;
SettingsHelper.Settings.UIProperties.BgColorChoice = (SettingsHelper.Settings.UIProperties.BgColorChoice + 1) % 9;
vm.ImageBackground = BackgroundColorBrush;
}

Expand All @@ -30,12 +30,14 @@ public static void SetBackground(MainViewModel vm)
private static Brush BackgroundColorBrush => SettingsHelper.Settings.UIProperties.BgColorChoice switch
{
0 => new SolidColorBrush(Colors.Transparent),
1 => new SolidColorBrush(Colors.White),
3 => new SolidColorBrush(Color.FromRgb(35, 35, 35)),
4 => new SolidColorBrush(Color.FromRgb(15, 15, 15)),
5 => new SolidColorBrush(Color.FromRgb(5, 5, 5)),
6 => CreateCheckerboardBrush(),
7 => CreateCheckerboardBrush(Color.FromRgb(235, 235, 235), Color.FromRgb(40, 40, 40), 60),
1 => CreateCheckerboardBrush(),
2 => CreateCheckerboardBrush(Color.FromRgb(235, 235, 235), Color.FromRgb(40, 40, 40), 60),
3 => new SolidColorBrush(Colors.White),
4 => new SolidColorBrush(Color.FromRgb(200, 200, 200)),
5 => new SolidColorBrush(Color.FromRgb(155, 155, 155)),
6 => new SolidColorBrush(Color.FromArgb(90,35, 35, 35)),
7 => new SolidColorBrush(Color.FromArgb(90, 15, 15, 15)),
8 => new SolidColorBrush(Color.FromRgb(5, 5, 5)),
_ => new SolidColorBrush(Colors.Transparent),
};

Expand Down

0 comments on commit 104293b

Please sign in to comment.