Skip to content

Commit e2b6e16

Browse files
committed
add tooltips
1 parent bc764c2 commit e2b6e16

File tree

1 file changed

+42
-29
lines changed

1 file changed

+42
-29
lines changed

PixelArtTool/MainWindow.xaml

Lines changed: 42 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,11 @@
107107

108108
<ToolBarTray Background="#FF1F1F1F" Height="32" VerticalAlignment="Top">
109109
<ToolBar Band="1" BandIndex="1" VerticalAlignment="Top" Background="#FF9C9C9C">
110-
<Button x:Name="btnNew" ToolTip="New (Ctrl+N)" PreviewMouseDown="OnClearButton">
111-
<Image Source="/Resources/Buttons/newimage.png" Width="24" Height="24" RenderOptions.BitmapScalingMode="NearestNeighbor" IsHitTestVisible="False" />
110+
<Button x:Name="btnNew" ToolTip="New Image (CTRL+N or Right click to just clear)" PreviewMouseDown="OnClearButton">
111+
<Image Source="/Resources/Buttons/newimage.png" Width="24" Height="24" RenderOptions.BitmapScalingMode="NearestNeighbor" IsHitTestVisible="False" ToolTip="" />
112112
</Button>
113113
<Button x:Name="btnSave" ToolTip="Save (Ctrl+S)" Click="OnSaveButton">
114-
<Image Source="/Resources/Buttons/save.png" Width="24" Height="24" RenderOptions.BitmapScalingMode="NearestNeighbor" />
114+
<Image Source="/Resources/Buttons/save.png" Width="24" Height="24" RenderOptions.BitmapScalingMode="NearestNeighbor" ToolTip="Save.." />
115115
</Button>
116116
</ToolBar>
117117

@@ -120,7 +120,7 @@
120120
IsChecked="{Binding Path=CurrentTool, Converter={StaticResource ComparisonConverter}, ConverterParameter={x:Static local:ToolMode.Draw},Mode=TwoWay}">
121121
<Image Source="/Resources/Buttons/drawmode.png" Width="24" Height="24" RenderOptions.BitmapScalingMode="NearestNeighbor" />
122122
</RadioButton>
123-
<RadioButton GroupName="Toolbar" Tag="Fill" ToolTip="Flood Fill (F)" Template="{DynamicResource ToggleButtonLeft}" Style="{StaticResource {x:Type ToggleButton}}"
123+
<RadioButton GroupName="Toolbar" Tag="Fill" ToolTip="Fill (F)" Template="{DynamicResource ToggleButtonLeft}" Style="{StaticResource {x:Type ToggleButton}}"
124124
IsChecked="{Binding Path=CurrentTool, Converter={StaticResource ComparisonConverter}, ConverterParameter={x:Static local:ToolMode.Fill},Mode=TwoWay}">
125125
<Image Source="/Resources/Buttons/paint.png" Width="24" Height="24" RenderOptions.BitmapScalingMode="NearestNeighbor" />
126126
</RadioButton>
@@ -141,10 +141,10 @@
141141

142142
<ToolBar Band="1" BandIndex="1" VerticalAlignment="Top" Background="#FF9C9C9C">
143143
<Button x:Name="btnUndo" ToolTip="Undo (Ctrl+z)" Click="OnUndoButtonDown">
144-
<Image Source="/Resources/Buttons/undo.png" Width="24" Height="24" RenderOptions.BitmapScalingMode="NearestNeighbor" />
144+
<Image Source="/Resources/Buttons/undo.png" Width="24" Height="24" RenderOptions.BitmapScalingMode="NearestNeighbor" ToolTip="Undo" />
145145
</Button>
146146
<Button x:Name="btnRedo" ToolTip="Redo (Ctrl+y)" Click="OnRedoButtonDown">
147-
<Image Source="/Resources/Buttons/redo.png" Width="24" Height="24" RenderOptions.BitmapScalingMode="NearestNeighbor" />
147+
<Image Source="/Resources/Buttons/redo.png" Width="24" Height="24" RenderOptions.BitmapScalingMode="NearestNeighbor" ToolTip="Redo" />
148148
</Button>
149149
</ToolBar>
150150

@@ -188,53 +188,66 @@
188188
</Border>
189189
<Rectangle x:Name="recPreviewBg2x" Fill="Black" HorizontalAlignment="Left" Height="32" Margin="375,50,0,0" VerticalAlignment="Top" Width="32"/>
190190
<Border BorderBrush="Black" BorderThickness="0" HorizontalAlignment="Left" Height="32" Margin="375,50,0,0" VerticalAlignment="Top" Width="32">
191-
<Image x:Name="imgPreview2x" HorizontalAlignment="Left" Height="32" VerticalAlignment="Top" Width="32" Stretch="Fill" RenderOptions.BitmapScalingMode="NearestNeighbor"/>
191+
<Image x:Name="imgPreview2x" HorizontalAlignment="Left" Height="32" VerticalAlignment="Top" Width="32" Stretch="Fill" RenderOptions.BitmapScalingMode="NearestNeighbor" ToolTip=""/>
192192
</Border>
193193
<Rectangle x:Name="recPreviewBg1x" Fill="Black" HorizontalAlignment="Left" Height="16" Margin="425,50,0,0" VerticalAlignment="Top" Width="16"/>
194194
<Border BorderBrush="Black" BorderThickness="0" HorizontalAlignment="Left" Height="16" Margin="425,50,0,0" VerticalAlignment="Top" Width="16">
195-
<Image x:Name="imgPreview1x" HorizontalAlignment="Left" Height="16" VerticalAlignment="Top" Width="16" Stretch="Fill" RenderOptions.BitmapScalingMode="NearestNeighbor"/>
195+
<Image x:Name="imgPreview1x" HorizontalAlignment="Left" Height="16" VerticalAlignment="Top" Width="16" Stretch="Fill" RenderOptions.BitmapScalingMode="NearestNeighbor" ToolTip=""/>
196196
</Border>
197197
<Rectangle x:Name="recPreviewBg2xb" Fill="Gray" HorizontalAlignment="Left" Height="32" Margin="375,100,0,0" VerticalAlignment="Top" Width="32"/>
198198
<Border BorderBrush="Black" BorderThickness="0" HorizontalAlignment="Left" Height="32" Margin="375,100,0,0" VerticalAlignment="Top" Width="32">
199-
<Image x:Name="imgPreview2xb" HorizontalAlignment="Left" Height="32" VerticalAlignment="Top" Width="32" Stretch="Fill" RenderOptions.BitmapScalingMode="NearestNeighbor"/>
199+
<Image x:Name="imgPreview2xb" HorizontalAlignment="Left" Height="32" VerticalAlignment="Top" Width="32" Stretch="Fill" RenderOptions.BitmapScalingMode="NearestNeighbor" ToolTip=""/>
200200
</Border>
201201
<Rectangle x:Name="recPreviewBg1xb" Fill="Gray" HorizontalAlignment="Left" Height="16" Margin="425,100,0,0" VerticalAlignment="Top" Width="16"/>
202202
<Border BorderBrush="Black" BorderThickness="0" HorizontalAlignment="Left" Height="16" Margin="425,100,0,0" VerticalAlignment="Top" Width="16">
203-
<Image x:Name="imgPreview1xb" HorizontalAlignment="Left" Height="16" VerticalAlignment="Top" Width="16" Stretch="Fill" RenderOptions.BitmapScalingMode="NearestNeighbor"/>
203+
<Image x:Name="imgPreview1xb" HorizontalAlignment="Left" Height="16" VerticalAlignment="Top" Width="16" Stretch="Fill" RenderOptions.BitmapScalingMode="NearestNeighbor" ToolTip=""/>
204204
</Border>
205205
<Rectangle x:Name="recPreviewBg2xc" Fill="White" HorizontalAlignment="Left" Height="32" Margin="375,150,0,0" VerticalAlignment="Top" Width="32"/>
206206
<Border BorderBrush="Black" BorderThickness="0" HorizontalAlignment="Left" Height="32" Margin="375,150,0,0" VerticalAlignment="Top" Width="32">
207-
<Image x:Name="imgPreview2xc" HorizontalAlignment="Left" Height="32" VerticalAlignment="Top" Width="32" Stretch="Fill" RenderOptions.BitmapScalingMode="NearestNeighbor"/>
207+
<Image x:Name="imgPreview2xc" HorizontalAlignment="Left" Height="32" VerticalAlignment="Top" Width="32" Stretch="Fill" RenderOptions.BitmapScalingMode="NearestNeighbor" ToolTip=""/>
208208
</Border>
209209
<Rectangle x:Name="recPreviewBg1xc" Fill="White" HorizontalAlignment="Left" Height="16" Margin="425,150,0,0" VerticalAlignment="Top" Width="16"/>
210210
<Border BorderBrush="Black" BorderThickness="0" HorizontalAlignment="Left" Height="16" Margin="425,150,0,0" VerticalAlignment="Top" Width="16">
211-
<Image x:Name="imgPreview1xc" HorizontalAlignment="Left" Height="16" VerticalAlignment="Top" Width="16" Stretch="Fill" RenderOptions.BitmapScalingMode="NearestNeighbor"/>
211+
<Image x:Name="imgPreview1xc" HorizontalAlignment="Left" Height="16" VerticalAlignment="Top" Width="16" Stretch="Fill" RenderOptions.BitmapScalingMode="NearestNeighbor" ToolTip=""/>
212212
</Border>
213-
<Button x:Name="btnScrollUp" Click="OnScrollButtonUpClicked" Content="/\" HorizontalAlignment="Left" Margin="388,252,0,0" VerticalAlignment="Top" Width="24"/>
214-
<Button x:Name="btnScrollDown" Click="OnScrollButtonDownClicked" Content="\/" HorizontalAlignment="Left" Margin="388,274,0,0" VerticalAlignment="Top" Width="24"/>
215-
<Button x:Name="btnScrollLeft" Click="OnScrollButtonLeftClicked" Content="&lt;" HorizontalAlignment="Left" Margin="361,263,0,0" VerticalAlignment="Top" Width="24"/>
216-
<Button x:Name="btnScrollRight" Click="OnScrollButtonRightClicked" Content="&gt;" HorizontalAlignment="Left" Margin="415,262,0,0" VerticalAlignment="Top" Width="24"/>
217-
<Button x:Name="btnFlipX" Click="OnFlipXButtonDown" Content="FlipX" HorizontalAlignment="Left" Margin="365,316,0,0" VerticalAlignment="Top" Width="32"/>
218-
<Button x:Name="btnFlipY" Click="OnFlipYButtonDown" Content="FlipY" HorizontalAlignment="Left" Margin="402,316,0,0" VerticalAlignment="Top" Width="32"/>
219-
<Button x:Name="btnLoadPalette" Click="OnLoadPaletteButton" Content="Load Palette" HorizontalAlignment="Left" Margin="9,329,0,0" VerticalAlignment="Top" Width="71"/>
213+
<Button x:Name="btnScrollUp" Click="OnScrollButtonUpClicked" Content="/\" HorizontalAlignment="Left" Margin="388,252,0,0" VerticalAlignment="Top" Width="24" ToolTip="Pan up"/>
214+
<Button x:Name="btnScrollDown" Click="OnScrollButtonDownClicked" Content="\/" HorizontalAlignment="Left" Margin="388,274,0,0" VerticalAlignment="Top" Width="24" ToolTip="Pan down"/>
215+
<Button x:Name="btnScrollLeft" Click="OnScrollButtonLeftClicked" Content="&lt;" HorizontalAlignment="Left" Margin="361,263,0,0" VerticalAlignment="Top" Width="24" ToolTip="Pan left"/>
216+
<Button x:Name="btnScrollRight" Click="OnScrollButtonRightClicked" Content="&gt;" HorizontalAlignment="Left" Margin="415,262,0,0" VerticalAlignment="Top" Width="24" ToolTip="Pan right"/>
217+
<Button x:Name="btnFlipX" Click="OnFlipXButtonDown" Content="FlipX" HorizontalAlignment="Left" Margin="365,316,0,0" VerticalAlignment="Top" Width="32" ToolTip="Flip horizontal"/>
218+
<Button x:Name="btnFlipY" Click="OnFlipYButtonDown" Content="FlipY" HorizontalAlignment="Left" Margin="402,316,0,0" VerticalAlignment="Top" Width="32" ToolTip="Flip vertical"/>
219+
<Button x:Name="btnLoadPalette" Click="OnLoadPaletteButton" Content="Load Palette" HorizontalAlignment="Left" Margin="9,329,0,0" VerticalAlignment="Top" Width="71" ToolTip="Open 1x lospec png palette files"/>
220+
</Grid>
221+
<CheckBox x:Name="chkOutline" Content="Outline" HorizontalAlignment="Left" Margin="638,50,0,0" VerticalAlignment="Top" Width="64" Click="chkOutline_Click" ToolTip="Automatic outline"/>
222+
<Grid>
223+
<Rectangle x:Name="rectCurrentColorBg" HorizontalAlignment="Left" Height="28" Margin="10,256,0,0" Stroke="Black" VerticalAlignment="Top" Width="28" MouseDown="OnGetTransparentColorButton">
224+
<Rectangle.Fill>
225+
<ImageBrush ImageSource="Resources/Images/transparentbg.png"/>
226+
</Rectangle.Fill>
227+
</Rectangle>
228+
<Rectangle x:Name="rectCurrentColor" Fill="#FFF4F4F5" HorizontalAlignment="Left" Height="28" Margin="10,256,0,0" Stroke="Black" VerticalAlignment="Top" Width="28" MouseDown="rectCurrentColor_MouseDown" ToolTip="Current color"/>
229+
</Grid>
230+
<CheckBox x:Name="chkMirrorX" Content="Symmetry X" HorizontalAlignment="Left" Margin="638,71,0,0" VerticalAlignment="Top" Width="93" Unchecked="chkMirrorX_Unchecked" Checked="chkMirrorX_Checked" ToolTip="Symmetry horizontal"/>
231+
<Grid>
232+
<Rectangle x:Name="rectSecondaryColorBg" HorizontalAlignment="Left" Height="28" Margin="47,256,0,0" Stroke="Black" VerticalAlignment="Top" Width="28" MouseDown="OnGetTransparentColorButton">
233+
<Rectangle.Fill>
234+
<ImageBrush ImageSource="Resources/Images/transparentbg.png"/>
235+
</Rectangle.Fill>
236+
</Rectangle>
237+
<Rectangle x:Name="rectSecondaryColor" Fill="Black" HorizontalAlignment="Left" Height="28" Margin="47,256,0,0" Stroke="Black" VerticalAlignment="Top" Width="28" MouseDown="rectSecondaryColor_MouseDown" ToolTip="Secondary current color"/>
220238
</Grid>
221-
<CheckBox x:Name="chkOutline" Content="Outline" HorizontalAlignment="Left" Margin="638,50,0,0" VerticalAlignment="Top" Width="64" Click="chkOutline_Click"/>
222-
<Rectangle x:Name="rectCurrentColor" Fill="#FFF4F4F5" HorizontalAlignment="Left" Height="28" Margin="10,256,0,0" Stroke="Black" VerticalAlignment="Top" Width="28" MouseDown="rectCurrentColor_MouseDown"/>
223-
<CheckBox x:Name="chkMirrorX" Content="Symmetry X" HorizontalAlignment="Left" Margin="638,71,0,0" VerticalAlignment="Top" Width="93" Unchecked="chkMirrorX_Unchecked" Checked="chkMirrorX_Checked"/>
224-
<Rectangle x:Name="rectSecondaryColor" Fill="Black" HorizontalAlignment="Left" Height="28" Margin="47,256,0,0" Stroke="Black" VerticalAlignment="Top" Width="28" MouseDown="rectSecondaryColor_MouseDown"/>
225-
226239
<!-- https://stackoverflow.com/a/32514853/5452781 -->
227240
<Rectangle x:Name="tempRect" Width="200" Height="200" Margin="459,130,0,0" SnapsToDevicePixels="True" HorizontalAlignment="Left" VerticalAlignment="Top" UseLayoutRounding="False" Fill="Black" />
228241
<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" />
229242
<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" />
230-
<Rectangle x:Name="rectGetTransparentColor" HorizontalAlignment="Left" Height="28" Margin="547,97,0,0" Stroke="Black" VerticalAlignment="Top" Width="28" MouseDown="OnGetTransparentColorButton">
243+
<Rectangle x:Name="rectGetTransparentColor" HorizontalAlignment="Left" Height="28" Margin="547,97,0,0" Stroke="Black" VerticalAlignment="Top" Width="28" MouseDown="OnGetTransparentColorButton" ToolTip="Use transparent color">
231244
<Rectangle.Fill>
232245
<ImageBrush ImageSource="Resources/Images/transparentbg.png"/>
233246
</Rectangle.Fill>
234247
</Rectangle>
235248

236249
<Grid>
237-
<Rectangle x:Name="rectCurrentHue" Width="253" Height="14" Margin="91,316,0,0" Stroke="Black" StrokeThickness="1" SnapsToDevicePixels="True" HorizontalAlignment="Left" VerticalAlignment="Top" >
250+
<Rectangle x:Name="rectCurrentBrightness" Width="253" Height="14" Margin="91,316,0,0" Stroke="Black" StrokeThickness="1" SnapsToDevicePixels="True" HorizontalAlignment="Left" VerticalAlignment="Top" ToolTip="Current brightness (use mousewheel)" >
238251
<Rectangle.Fill>
239252
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
240253
<GradientStop Color="Black" Offset="0"/>
@@ -252,19 +265,19 @@
252265
<ImageBrush ImageSource="Resources/Images/transparentbg.png"/>
253266
</Rectangle.Fill>
254267
</Rectangle>
255-
<Rectangle x:Name="rectEraserColor" HorizontalAlignment="Left" Height="28" Margin="10,289,0,0" Stroke="Black" VerticalAlignment="Top" Width="28" Fill="#00000000"/>
268+
<Rectangle x:Name="rectEraserColor" HorizontalAlignment="Left" Height="28" Margin="10,289,0,0" Stroke="Black" VerticalAlignment="Top" Width="28" Fill="#00000000" ToolTip="Eraser color"/>
256269
</Grid>
257270
<Grid>
258271
<Rectangle x:Name="rectGetTransparentSecondaryBg" HorizontalAlignment="Left" Height="28" Margin="47,289,0,0" Stroke="Black" VerticalAlignment="Top" Width="28" MouseDown="OnGetTransparentColorButton">
259272
<Rectangle.Fill>
260273
<ImageBrush ImageSource="Resources/Images/transparentbg.png"/>
261274
</Rectangle.Fill>
262275
</Rectangle>
263-
<Rectangle x:Name="rectEraserColorSecondary" HorizontalAlignment="Left" Height="28" Margin="47,289,0,0" Stroke="Black" VerticalAlignment="Top" Width="28" Fill="Black" />
276+
<Rectangle x:Name="rectEraserColorSecondary" HorizontalAlignment="Left" Height="28" Margin="47,289,0,0" Stroke="Black" VerticalAlignment="Top" Width="28" Fill="Black" ToolTip="Secondary eraser color" />
264277
</Grid>
265278

266279
<Rectangle x:Name="rectPixelPos" IsHitTestVisible="False" HorizontalAlignment="Left" VerticalAlignment="Top" Height="16" Stroke="Black" Width="16" Margin="89,50,0,0"/>
267-
<Button x:Name="btnSettings" Content="Settings" HorizontalAlignment="Left" Margin="674,6,0,0" VerticalAlignment="Top" Width="50" Click="btnSettings_Click"/>
280+
<Button x:Name="btnSettings" Content="Settings" HorizontalAlignment="Left" Margin="674,6,0,0" VerticalAlignment="Top" Width="50" Click="btnSettings_Click" ToolTip="Settings.."/>
268281

269282
</Grid>
270283
</Window>

0 commit comments

Comments
 (0)