mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-23 13:45:34 +08:00
(GUI): Ctrl+S hotkey toggles image scaling.
This commit is contained in:
parent
add376037f
commit
1a60c65670
@ -380,6 +380,7 @@
|
|||||||
<KeyBinding Gesture="Ctrl+H" Command="{x:Static local:Commands.FitWindow}"/>
|
<KeyBinding Gesture="Ctrl+H" Command="{x:Static local:Commands.FitWindow}"/>
|
||||||
<KeyBinding Gesture="Ctrl+A" Command="{x:Static local:Commands.SelectAll}"/>
|
<KeyBinding Gesture="Ctrl+A" Command="{x:Static local:Commands.SelectAll}"/>
|
||||||
<KeyBinding Gesture="Ctrl+P" Command="{x:Static local:Commands.Preferences}"/>
|
<KeyBinding Gesture="Ctrl+P" Command="{x:Static local:Commands.Preferences}"/>
|
||||||
|
<KeyBinding Gesture="Ctrl+S" Command="{x:Static local:Commands.ScaleImage}"/>
|
||||||
<KeyBinding Gesture="Backspace" Command="{x:Static local:Commands.GoBack}"/>
|
<KeyBinding Gesture="Backspace" Command="{x:Static local:Commands.GoBack}"/>
|
||||||
<KeyBinding Gesture="Alt+Left" Command="{x:Static local:Commands.GoBack}"/>
|
<KeyBinding Gesture="Alt+Left" Command="{x:Static local:Commands.GoBack}"/>
|
||||||
<KeyBinding Gesture="Alt+Right" Command="{x:Static local:Commands.GoForward}"/>
|
<KeyBinding Gesture="Alt+Right" Command="{x:Static local:Commands.GoForward}"/>
|
||||||
@ -421,6 +422,7 @@
|
|||||||
<CommandBinding Command="{x:Static local:Commands.CheckUpdates}" Executed="CheckUpdatesExec" CanExecute="CanExecuteUpdate"/>
|
<CommandBinding Command="{x:Static local:Commands.CheckUpdates}" Executed="CheckUpdatesExec" CanExecute="CanExecuteUpdate"/>
|
||||||
<CommandBinding Command="{x:Static local:Commands.StopPlayback}" Executed="StopPlaybackExec" CanExecute="CanExecutePlaybackControl"/>
|
<CommandBinding Command="{x:Static local:Commands.StopPlayback}" Executed="StopPlaybackExec" CanExecute="CanExecutePlaybackControl"/>
|
||||||
<CommandBinding Command="{x:Static local:Commands.Preferences}" Executed="PreferencesExec" CanExecute="CanExecuteAlways"/>
|
<CommandBinding Command="{x:Static local:Commands.Preferences}" Executed="PreferencesExec" CanExecute="CanExecuteAlways"/>
|
||||||
|
<CommandBinding Command="{x:Static local:Commands.ScaleImage}" Executed="ScaleImageExec" CanExecute="CanExecuteScaleImage"/>
|
||||||
<CommandBinding Command="{x:Static local:Commands.TroubleShooting}" Executed="TroubleShootingExec" CanExecute="CanExecuteAlways"/>
|
<CommandBinding Command="{x:Static local:Commands.TroubleShooting}" Executed="TroubleShootingExec" CanExecute="CanExecuteAlways"/>
|
||||||
<CommandBinding Command="{x:Static local:Commands.Descend}" Executed="DescendExec" CanExecute="CanExecuteAlways"/>
|
<CommandBinding Command="{x:Static local:Commands.Descend}" Executed="DescendExec" CanExecute="CanExecuteAlways"/>
|
||||||
<CommandBinding Command="{x:Static local:Commands.Ascend}" Executed="AscendExec" CanExecute="CanExecuteAlways"/>
|
<CommandBinding Command="{x:Static local:Commands.Ascend}" Executed="AscendExec" CanExecute="CanExecuteAlways"/>
|
||||||
|
@ -1321,6 +1321,16 @@ namespace GARbro.GUI
|
|||||||
dialog.ShowDialog();
|
dialog.ShowDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ScaleImageExec (object sender, ExecutedRoutedEventArgs e)
|
||||||
|
{
|
||||||
|
DownScaleImage.Value = !DownScaleImage.Get<bool>();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CanExecuteScaleImage (object sender, CanExecuteRoutedEventArgs e)
|
||||||
|
{
|
||||||
|
e.CanExecute = ImageCanvas.Source != null;
|
||||||
|
}
|
||||||
|
|
||||||
private void CanExecuteAlways (object sender, CanExecuteRoutedEventArgs e)
|
private void CanExecuteAlways (object sender, CanExecuteRoutedEventArgs e)
|
||||||
{
|
{
|
||||||
e.CanExecute = true;
|
e.CanExecute = true;
|
||||||
@ -1553,5 +1563,6 @@ namespace GARbro.GUI
|
|||||||
public static readonly RoutedCommand TroubleShooting = new RoutedCommand();
|
public static readonly RoutedCommand TroubleShooting = new RoutedCommand();
|
||||||
public static readonly RoutedCommand Descend = new RoutedCommand();
|
public static readonly RoutedCommand Descend = new RoutedCommand();
|
||||||
public static readonly RoutedCommand Ascend = new RoutedCommand();
|
public static readonly RoutedCommand Ascend = new RoutedCommand();
|
||||||
|
public static readonly RoutedCommand ScaleImage = new RoutedCommand();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user