From 1a60c65670706829216f70539011b00f133d91d8 Mon Sep 17 00:00:00 2001 From: morkt Date: Sat, 17 Mar 2018 12:20:35 +0400 Subject: [PATCH] (GUI): Ctrl+S hotkey toggles image scaling. --- GUI/MainWindow.xaml | 2 ++ GUI/MainWindow.xaml.cs | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/GUI/MainWindow.xaml b/GUI/MainWindow.xaml index 68824a02..01953ec8 100644 --- a/GUI/MainWindow.xaml +++ b/GUI/MainWindow.xaml @@ -380,6 +380,7 @@ + @@ -421,6 +422,7 @@ + diff --git a/GUI/MainWindow.xaml.cs b/GUI/MainWindow.xaml.cs index 3c164448..31dfefa6 100644 --- a/GUI/MainWindow.xaml.cs +++ b/GUI/MainWindow.xaml.cs @@ -1321,6 +1321,16 @@ namespace GARbro.GUI dialog.ShowDialog(); } + private void ScaleImageExec (object sender, ExecutedRoutedEventArgs e) + { + DownScaleImage.Value = !DownScaleImage.Get(); + } + + private void CanExecuteScaleImage (object sender, CanExecuteRoutedEventArgs e) + { + e.CanExecute = ImageCanvas.Source != null; + } + private void CanExecuteAlways (object sender, CanExecuteRoutedEventArgs e) { e.CanExecute = true; @@ -1553,5 +1563,6 @@ namespace GARbro.GUI public static readonly RoutedCommand TroubleShooting = new RoutedCommand(); public static readonly RoutedCommand Descend = new RoutedCommand(); public static readonly RoutedCommand Ascend = new RoutedCommand(); + public static readonly RoutedCommand ScaleImage = new RoutedCommand(); } }