Browse Source

Change zoom step to zoom exactly to 400%, 800%, 1600% ... this isn't ideal but good enough for now

Equbuxu 3 years ago
parent
commit
b54e063d2c

+ 0 - 2
PixiEditor/Helpers/Converters/ZoomLevelToBitmapScalingModeConverter.cs

@@ -1,5 +1,4 @@
 using System;
-using System.Diagnostics;
 using System.Globalization;
 using System.Windows.Media;
 
@@ -10,7 +9,6 @@ namespace PixiEditor.Helpers.Converters
         public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
         {
             double zoomLevel = (double)value;
-            Debug.WriteLine(zoomLevel);
             if (zoomLevel < 1)
                 return BitmapScalingMode.HighQuality;
             return BitmapScalingMode.NearestNeighbor;

+ 1 - 1
PixiEditor/Views/UserControls/Zoombox.xaml.cs

@@ -105,7 +105,7 @@ namespace PixiEditor.Views.UserControls
         public static readonly DependencyProperty UseTouchGesturesProperty =
             DependencyProperty.Register(nameof(UseTouchGestures), typeof(bool), typeof(Zoombox));
 
-        private const double zoomFactor = 1.1;
+        private const double zoomFactor = 1.09050773267; //2^(1/8)
         private const double maxZoom = 50;
         private double minZoom = -28;
         public object AdditionalContent