Browse Source

Revert back to storing Height as an int

Less precise but simpler for user
Daniel Chalmers 3 years ago
parent
commit
b841691f63
2 changed files with 2 additions and 2 deletions
  1. 1 1
      DesktopClock/MainWindow.xaml.cs
  2. 1 1
      DesktopClock/Properties/Settings.cs

+ 1 - 1
DesktopClock/MainWindow.xaml.cs

@@ -39,7 +39,7 @@ public partial class MainWindow : Window
             // Scale size based on scroll amount, with one notch on a default PC mouse being a change of 15%.
             var steps = e.Delta / (double)Mouse.MouseWheelDeltaForOneLine;
             var change = Settings.Default.Height * steps * 0.15;
-            Settings.Default.Height = Math.Min(Math.Max(Settings.Default.Height + change, 16), 160);
+            Settings.Default.Height = (int)Math.Min(Math.Max(Settings.Default.Height + change, 16), 160);
         }
     }
 

+ 1 - 1
DesktopClock/Properties/Settings.cs

@@ -45,7 +45,7 @@ public sealed class Settings : INotifyPropertyChanged
     public double BackgroundOpacity { get; set; } = 0.90;
     public bool Topmost { get; set; } = true;
     public bool ShowInTaskbar { get; set; } = true;
-    public double Height { get; set; } = 48;
+    public int Height { get; set; } = 48;
     public WindowPlacement Placement { get; set; }
 
     [JsonIgnore]