Skip to content

Commit

Permalink
More bg choices #163
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben2776 committed Sep 15, 2024
1 parent 312caa2 commit ab7a802
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
11 changes: 6 additions & 5 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) % 6;
SettingsHelper.Settings.UIProperties.BgColorChoice = (SettingsHelper.Settings.UIProperties.BgColorChoice + 1) % 8;
vm.ImageBackground = BackgroundColorBrush;
}

Expand All @@ -31,10 +31,11 @@ public static void SetBackground(MainViewModel vm)
{
0 => new SolidColorBrush(Colors.Transparent),
1 => new SolidColorBrush(Colors.White),
2 => new SolidColorBrush(Color.FromRgb(15, 15, 15)),
3 => new SolidColorBrush(Color.FromRgb(5, 5, 5)),
4 => CreateCheckerboardBrush(),
5 => CreateCheckerboardBrush(Color.FromRgb(235, 235, 235), Color.FromRgb(40, 40, 40), 60),
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),
_ => new SolidColorBrush(Colors.Transparent),
};

Expand Down
7 changes: 6 additions & 1 deletion src/PicView.Avalonia/Views/ImageViewer.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@
Width="{CompiledBinding ScrollViewerWidth,
Mode=OneWay}"
x:Name="ImageScrollViewer">
<Border x:Name="MainBorder">
<Border
Height="{CompiledBinding ImageHeight,
Mode=OneWay}"
Width="{CompiledBinding ImageWidth,
Mode=OneWay}"
x:Name="MainBorder">
<customControls:PicBox
ImageType="{CompiledBinding ImageType,
Mode=OneWay}"
Expand Down

0 comments on commit ab7a802

Please sign in to comment.