|
6 | 6 | xmlns:local="clr-namespace:PixelArtTool"
|
7 | 7 | xmlns:System="clr-namespace:System;assembly=mscorlib" x:Name="window" x:Class="PixelArtTool.MainWindow"
|
8 | 8 | mc:Ignorable="d"
|
9 |
| - Title="PixelArtTool (Test Version)" Height="412.222" Width="739.444" Background="#FF252526" KeyDown="OnKeyDown" KeyUp="OnKeyUp"> |
| 9 | + Title="PixelArtTool (Test Version)" Height="412.222" Width="739.444" Background="#FF252526" KeyDown="OnKeyDown" KeyUp="OnKeyUp" Icon="Resources/Icons/appicon.ico"> |
10 | 10 | <Window.CommandBindings>
|
11 | 11 | <CommandBinding Command="ApplicationCommands.Undo" Executed="Executed_Undo" CanExecute="CanExecute_Undo"/>
|
12 | 12 | <CommandBinding Command="ApplicationCommands.Redo" Executed="Executed_Redo" CanExecute="CanExecute_Redo"/>
|
13 | 13 | <CommandBinding Command="ApplicationCommands.Paste" Executed="Executed_Paste" CanExecute="CanExecute_Paste"/>
|
14 | 14 | <CommandBinding Command="ApplicationCommands.Copy" Executed="Executed_Copy" CanExecute="CanExecute_Copy"/>
|
| 15 | + <CommandBinding Command="ApplicationCommands.SaveAs" Executed="Executed_SaveAs" CanExecute="CanExecute_SaveAs"/> |
| 16 | + <CommandBinding Command="ApplicationCommands.New" Executed="Executed_New" CanExecute="CanExecute_New"/> |
15 | 17 | </Window.CommandBindings>
|
16 | 18 | <Window.InputBindings>
|
17 | 19 | <KeyBinding Command="ApplicationCommands.Undo" Gesture="Ctrl+Z"/>
|
18 | 20 | <KeyBinding Command="ApplicationCommands.Redo" Gesture="Ctrl+Y"/>
|
19 | 21 | <KeyBinding Command="ApplicationCommands.Paste" Gesture="Ctrl+V"/>
|
20 | 22 | <KeyBinding Command="ApplicationCommands.Copy" Gesture="Ctrl+C"/>
|
| 23 | + <KeyBinding Command="ApplicationCommands.SaveAs" Gesture="Ctrl+Shift+S"/> |
| 24 | + <KeyBinding Command="ApplicationCommands.New" Gesture="Ctrl+N"/> |
21 | 25 | </Window.InputBindings>
|
22 | 26 | <Window.Resources>
|
23 | 27 |
|
|
63 | 67 |
|
64 | 68 | </Window.Resources>
|
65 | 69 |
|
66 |
| - <Grid> |
| 70 | + <Grid Margin="0,0,-8,-7"> |
67 | 71 | <Grid.Resources>
|
68 | 72 | <local:EnumBooleanConverter x:Key="ComparisonConverter" />
|
69 | 73 |
|
|
101 | 105 |
|
102 | 106 | <ToolBarTray Background="#FF1F1F1F" Height="32" VerticalAlignment="Top">
|
103 | 107 | <ToolBar Band="1" BandIndex="1" VerticalAlignment="Top" Background="#FF9C9C9C">
|
104 |
| - <Button x:Name="btnNew" ToolTip="New (clear image)" Click="OnClearButton"> |
| 108 | + <Button x:Name="btnNew" ToolTip="New (Ctrl+N)" Click="OnClearButton"> |
105 | 109 | <Image Source="/Resources/Buttons/newimage.png" Width="24" Height="24" RenderOptions.BitmapScalingMode="NearestNeighbor" />
|
106 | 110 | </Button>
|
107 |
| - <Button x:Name="btnSave" ToolTip="Save as.." Click="OnSaveButton"> |
| 111 | + <Button x:Name="btnSave" ToolTip="Save as..(Ctrl+Shift+s)" Click="OnSaveButton"> |
108 | 112 | <Image Source="/Resources/Buttons/save.png" Width="24" Height="24" RenderOptions.BitmapScalingMode="NearestNeighbor" />
|
109 | 113 | </Button>
|
110 | 114 | </ToolBar>
|
|
134 | 138 | </ToolBar>
|
135 | 139 |
|
136 | 140 | <ToolBar Band="1" BandIndex="1" VerticalAlignment="Top" Background="#FF9C9C9C">
|
137 |
| - <Button x:Name="btnUndo" ToolTip="Undo" Click="OnUndoButtonDown"> |
138 |
| - <Image Source="/Resources/Buttons/emptybutton.png" /> |
| 141 | + <Button x:Name="btnUndo" ToolTip="Undo (Ctrl+z)" Click="OnUndoButtonDown"> |
| 142 | + <Image Source="/Resources/Buttons/undo.png" Width="24" Height="24" RenderOptions.BitmapScalingMode="NearestNeighbor" /> |
139 | 143 | </Button>
|
140 |
| - <Button x:Name="btnRedo" ToolTip="Redo" Click="OnRedoButtonDown"> |
141 |
| - <Image Source="/Resources/Buttons/emptybutton.png" /> |
| 144 | + <Button x:Name="btnRedo" ToolTip="Redo (Ctrl+y)" Click="OnRedoButtonDown"> |
| 145 | + <Image Source="/Resources/Buttons/redo.png" Width="24" Height="24" RenderOptions.BitmapScalingMode="NearestNeighbor" /> |
142 | 146 | </Button>
|
143 | 147 | </ToolBar>
|
144 | 148 |
|
|
205 | 209 | <Button x:Name="btnScrollRight" Click="OnScrollButtonRightClicked" Content=">" HorizontalAlignment="Left" Margin="415,262,0,0" VerticalAlignment="Top" Width="24"/>
|
206 | 210 | <Button x:Name="btnFlipX" Click="OnFlipXButtonDown" Content="FlipX" HorizontalAlignment="Left" Margin="365,316,0,0" VerticalAlignment="Top" Width="32"/>
|
207 | 211 | <Button x:Name="btnFlipY" Click="OnFlipYButtonDown" Content="FlipY" HorizontalAlignment="Left" Margin="402,316,0,0" VerticalAlignment="Top" Width="32"/>
|
208 |
| - <Button x:Name="btnLoadPalette" Click="OnLoadPaletteButton" Content="Load Palette" HorizontalAlignment="Left" Margin="10,324,0,0" VerticalAlignment="Top" Width="71"/> |
| 212 | + <Button x:Name="btnLoadPalette" Click="OnLoadPaletteButton" Content="Load Palette" HorizontalAlignment="Left" Margin="9,329,0,0" VerticalAlignment="Top" Width="71"/> |
209 | 213 | </Grid>
|
210 | 214 | <CheckBox x:Name="chkOutline" Content="Outline" HorizontalAlignment="Left" Margin="638,50,0,0" VerticalAlignment="Top" Width="64" Click="chkOutline_Click"/>
|
211 | 215 | <Rectangle x:Name="rectCurrentColor" Fill="#FFF4F4F5" HorizontalAlignment="Left" Height="28" Margin="10,256,0,0" Stroke="Black" VerticalAlignment="Top" Width="28"/>
|
|
214 | 218 |
|
215 | 219 | <!-- https://stackoverflow.com/a/32514853/5452781 -->
|
216 | 220 | <Rectangle x:Name="tempRect" Width="200" Height="200" Margin="459,130,0,0" SnapsToDevicePixels="True" HorizontalAlignment="Left" VerticalAlignment="Top" UseLayoutRounding="False" Fill="Black" />
|
217 |
| - <Rectangle x:Name="rectSaturation" Fill="{StaticResource LevelSaturationBrush}" Width="200" Height="200" Margin="459,130,0,0" StrokeThickness="1" SnapsToDevicePixels="True" HorizontalAlignment="Left" VerticalAlignment="Top" MouseDown="OnLevelSaturationMouseDown" /> |
218 |
| - <Rectangle x:Name="rectHueBar" Fill="{StaticResource HueBrush}" Width="20" Height="200" Margin="664,130,0,0" Stroke="Black" StrokeThickness="1" SnapsToDevicePixels="True" MouseDown="rectHueBar_MouseDown" HorizontalAlignment="Left" VerticalAlignment="Top" /> |
| 221 | + <Rectangle x:Name="rectSaturation" Fill="{StaticResource LevelSaturationBrush}" Width="200" Height="200" Margin="459,130,0,0" StrokeThickness="1" SnapsToDevicePixels="True" HorizontalAlignment="Left" VerticalAlignment="Top" MouseDown="OnLevelSaturationMouseDown" MouseMove="OnLevelSaturationMouseMoved" /> |
| 222 | + <Rectangle x:Name="rectHueBar" Fill="{StaticResource HueBrush}" Width="20" Height="200" Margin="664,130,0,0" Stroke="Black" StrokeThickness="1" SnapsToDevicePixels="True" MouseDown="rectHueBar_MouseDown" HorizontalAlignment="Left" VerticalAlignment="Top" MouseMove="OnHueRectangleMouseMoved" /> |
219 | 223 | <Grid>
|
220 | 224 | <Rectangle x:Name="rectCurrentHue" Width="253" Height="14" Margin="91,316,0,0" Stroke="Black" StrokeThickness="1" SnapsToDevicePixels="True" HorizontalAlignment="Left" VerticalAlignment="Top" >
|
221 | 225 | <Rectangle.Fill>
|
|
234 | 238 | <ImageBrush ImageSource="Resources/Images/transparentbg.png"/>
|
235 | 239 | </Rectangle.Fill>
|
236 | 240 | </Rectangle>
|
| 241 | + <Rectangle x:Name="rectPixelPos" IsHitTestVisible="False" HorizontalAlignment="Left" VerticalAlignment="Top" Height="16" Stroke="Black" Width="16" Margin="90,50,0,0"/> |
237 | 242 |
|
238 | 243 | </Grid>
|
239 | 244 | </Window>
|
0 commit comments