|
@@ -80,6 +80,7 @@ namespace PixiEditor.ViewModels
|
|
public RelayCommand CenterContentCommand { get; set; }
|
|
public RelayCommand CenterContentCommand { get; set; }
|
|
public RelayCommand OpenHyperlinkCommand { get; set; }
|
|
public RelayCommand OpenHyperlinkCommand { get; set; }
|
|
public RelayCommand ZoomCommand { get; set; }
|
|
public RelayCommand ZoomCommand { get; set; }
|
|
|
|
+ public RelayCommand ChangeToolSizeCommand { get; set; }
|
|
|
|
|
|
|
|
|
|
private double _mouseXonCanvas;
|
|
private double _mouseXonCanvas;
|
|
@@ -178,7 +179,6 @@ namespace PixiEditor.ViewModels
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public BitmapManager BitmapManager { get; set; }
|
|
public BitmapManager BitmapManager { get; set; }
|
|
public PixelChangesController ChangesController { get; set; }
|
|
public PixelChangesController ChangesController { get; set; }
|
|
|
|
|
|
@@ -239,6 +239,7 @@ namespace PixiEditor.ViewModels
|
|
CenterContentCommand = new RelayCommand(CenterContent, DocumentIsNotNull);
|
|
CenterContentCommand = new RelayCommand(CenterContent, DocumentIsNotNull);
|
|
OpenHyperlinkCommand = new RelayCommand(OpenHyperlink);
|
|
OpenHyperlinkCommand = new RelayCommand(OpenHyperlink);
|
|
ZoomCommand = new RelayCommand(ZoomViewport);
|
|
ZoomCommand = new RelayCommand(ZoomViewport);
|
|
|
|
+ ChangeToolSizeCommand = new RelayCommand(ChangeToolSize);
|
|
ToolSet = new ObservableCollection<Tool>
|
|
ToolSet = new ObservableCollection<Tool>
|
|
{
|
|
{
|
|
new MoveTool(), new PenTool(), new SelectTool(), new FloodFill(), new LineTool(),
|
|
new MoveTool(), new PenTool(), new SelectTool(), new FloodFill(), new LineTool(),
|
|
@@ -263,6 +264,8 @@ namespace PixiEditor.ViewModels
|
|
new Shortcut(Key.Z, SelectToolCommand, ToolType.Zoom),
|
|
new Shortcut(Key.Z, SelectToolCommand, ToolType.Zoom),
|
|
new Shortcut(Key.OemPlus, ZoomCommand, 115),
|
|
new Shortcut(Key.OemPlus, ZoomCommand, 115),
|
|
new Shortcut(Key.OemMinus, ZoomCommand, 85),
|
|
new Shortcut(Key.OemMinus, ZoomCommand, 85),
|
|
|
|
+ new Shortcut(Key.OemOpenBrackets, ChangeToolSizeCommand, -1),
|
|
|
|
+ new Shortcut(Key.OemCloseBrackets, ChangeToolSizeCommand, 1),
|
|
//Editor
|
|
//Editor
|
|
new Shortcut(Key.X, SwapColorsCommand),
|
|
new Shortcut(Key.X, SwapColorsCommand),
|
|
new Shortcut(Key.Y, RedoCommand, modifier: ModifierKeys.Control),
|
|
new Shortcut(Key.Y, RedoCommand, modifier: ModifierKeys.Control),
|
|
@@ -299,6 +302,16 @@ namespace PixiEditor.ViewModels
|
|
ZoomPercentage = 100;
|
|
ZoomPercentage = 100;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private void ChangeToolSize(object parameter)
|
|
|
|
+ {
|
|
|
|
+ int increment = (int)parameter;
|
|
|
|
+ int newSize = BitmapManager.ToolSize + increment;
|
|
|
|
+ if (newSize > 0)
|
|
|
|
+ {
|
|
|
|
+ BitmapManager.ToolSize = newSize;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
private void OpenHyperlink(object parameter)
|
|
private void OpenHyperlink(object parameter)
|
|
{
|
|
{
|
|
if (parameter == null) return;
|
|
if (parameter == null) return;
|