Skip to content

Commit badb564

Browse files
committed
update dismiss button style and controls
1 parent 210bc80 commit badb564

5 files changed

Lines changed: 114 additions & 113 deletions

File tree

src/Notepads/Controls/DiffViewer/SideBySideDiffViewer.xaml

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,21 @@
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
44
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
55
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6-
Background="{ThemeResource SystemControlForegroundTransparentBrush}"
76
mc:Ignorable="d">
87

98
<UserControl.Resources>
109
<ResourceDictionary>
1110
<ResourceDictionary.ThemeDictionaries>
1211
<ResourceDictionary x:Key="Dark">
13-
<SolidColorBrush x:Key="RightBoxBackgroundThemeBrush" Color="Black" Opacity="0.15" />
14-
<SolidColorBrush x:Key="HeaderBackgroundThemeBrush" Color="Black" Opacity="0.2" />
12+
<SolidColorBrush x:Key="RightBoxBackgroundThemeBrush" Color="{StaticResource SystemAltHighColor}" Opacity="0.15" />
13+
<SolidColorBrush x:Key="HeaderBackgroundThemeBrush" Color="{StaticResource SystemAltHighColor}" Opacity="0.2" />
1514
</ResourceDictionary>
1615
<ResourceDictionary x:Key="Light">
17-
<SolidColorBrush x:Key="RightBoxBackgroundThemeBrush" Color="White" Opacity="0.25" />
18-
<SolidColorBrush x:Key="HeaderBackgroundThemeBrush" Color="LightGray" Opacity="0.35" />
16+
<SolidColorBrush x:Key="RightBoxBackgroundThemeBrush" Color="{StaticResource SystemAltHighColor}" Opacity="0.25" />
17+
<SolidColorBrush x:Key="HeaderBackgroundThemeBrush" Color="{StaticResource SystemBaseHighColor}" Opacity="0.05" />
1918
</ResourceDictionary>
2019
<ResourceDictionary x:Key="HighContrast">
21-
<SolidColorBrush x:Key="RightBoxBackgroundThemeBrush" Color="{ThemeResource SystemColorHighlightColor}" />
20+
<SolidColorBrush x:Key="RightBoxBackgroundThemeBrush" Color="{ThemeResource SystemColorWindowColor}" />
2221
<SolidColorBrush x:Key="HeaderBackgroundThemeBrush" Color="{ThemeResource SystemColorHighlightColor}" />
2322
</ResourceDictionary>
2423
</ResourceDictionary.ThemeDictionaries>
@@ -33,28 +32,25 @@
3332

3433
<Grid Grid.Column="0">
3534
<Grid.RowDefinitions>
36-
<RowDefinition Height="25" />
35+
<RowDefinition Height="24" />
3736
<RowDefinition Height="*" />
3837
</Grid.RowDefinitions>
3938

4039
<Grid Grid.Row="0" Background="{ThemeResource HeaderBackgroundThemeBrush}">
4140
<Button x:Name="DismissButton"
4241
Style="{StaticResource DismissButtonStyle}"
43-
Width="32"
44-
Height="25"
45-
Padding="0"
42+
Width="42"
43+
Height="24"
4644
HorizontalAlignment="Left"
4745
VerticalAlignment="Center"
4846
Content="&#xE894;"
49-
FontFamily="Segoe MDL2 Assets"
5047
FontSize="12"
5148
IsTabStop="False">
5249
<Button.KeyboardAccelerators>
5350
<KeyboardAccelerator Key="Escape" />
5451
</Button.KeyboardAccelerators>
5552
</Button>
5653
<TextBlock x:Uid="DiffViewer_Header_OldTextTittle"
57-
Grid.Row="0"
5854
HorizontalAlignment="Center"
5955
VerticalAlignment="Center"
6056
d:Text="Before your changes"
@@ -75,13 +71,12 @@
7571

7672
<Grid Grid.Column="1" Background="{ThemeResource RightBoxBackgroundThemeBrush}">
7773
<Grid.RowDefinitions>
78-
<RowDefinition Height="25" />
74+
<RowDefinition Height="24" />
7975
<RowDefinition Height="*" />
8076
</Grid.RowDefinitions>
8177

8278
<Grid Grid.Row="0" Background="{ThemeResource HeaderBackgroundThemeBrush}">
8379
<TextBlock x:Uid="DiffViewer_Header_NewTextTittle"
84-
Grid.Row="0"
8580
HorizontalAlignment="Center"
8681
VerticalAlignment="Center"
8782
d:Text="After your changes"

src/Notepads/Controls/FindAndReplace/FindAndReplaceControl.xaml

Lines changed: 36 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
d:DesignWidth="340"
99
mc:Ignorable="d">
1010

11-
<Grid x:Name="FindAndReplaceRootGrid" KeyDown="FindAndReplaceRootGrid_KeyDown">
11+
<Grid x:Name="FindAndReplaceRootGrid"
12+
Padding="1,1,1,1"
13+
KeyDown="FindAndReplaceRootGrid_KeyDown">
1214
<Grid.RowDefinitions>
1315
<RowDefinition Height="Auto" />
1416
<RowDefinition Height="Auto" />
@@ -21,19 +23,14 @@
2123

2224
<Grid x:Name="ToggleReplaceModeButtonGrid"
2325
Grid.Row="0"
24-
Grid.Column="0"
25-
Height="36"
26-
Padding="1,1,1,1">
26+
Grid.Column="0">
2727

2828
<Button x:Name="ToggleReplaceModeButton"
2929
x:Uid="FindAndReplace_ToggleReplaceModeButton"
30-
Grid.Column="0"
3130
Style="{StaticResource DismissButtonStyle}"
3231
Width="20"
33-
Padding="0"
34-
Content="&#xE00F;"
32+
MinHeight="32"
3533
d:Content="&#xE76C;"
36-
FontFamily="Segoe MDL2 Assets"
3734
FontSize="12"
3835
Click="ToggleReplaceModeButton_OnClick"
3936
IsTabStop="False" />
@@ -42,8 +39,7 @@
4239
<RelativePanel x:Name="FindBarPlaceHolder"
4340
Grid.Row="0"
4441
Grid.Column="1"
45-
Height="36"
46-
Padding="1,1,1,1">
42+
Height="36">
4743
<findAndReplace:FindAndReplaceTextBox x:Name="FindBar"
4844
x:Uid="FindAndReplace_FindBar"
4945
RelativePanel.AlignLeftWithPanel="True"
@@ -63,22 +59,23 @@
6359
LostFocus="FindBar_LostFocus"
6460
d:PlaceholderText="Find" />
6561

66-
<Grid x:Name="OptionButtonGrid"
67-
RelativePanel.AlignRightWithPanel="True"
68-
Background="Transparent">
69-
<Border x:Name="OptionButtonSelectionIndicator"
70-
BorderBrush="{StaticResource SystemControlBackgroundAccentBrush}"
71-
BorderThickness="1"
72-
Margin="9"
73-
VerticalAlignment="Bottom"
74-
Visibility="Collapsed"
75-
d:Visibility="Visible" />
62+
<Grid x:Name="OptionButtonGrid" RelativePanel.AlignRightWithPanel="True">
63+
<Line x:Name="OptionButtonSelectionIndicator"
64+
X1="9" Y1="24"
65+
X2="23" Y2="24"
66+
Stroke="{ThemeResource SystemControlHighlightAccentBrush}"
67+
StrokeThickness="2"
68+
StrokeStartLineCap="Round"
69+
StrokeEndLineCap="Round"
70+
Visibility="Collapsed"
71+
d:Visibility="Visible"
72+
IsHitTestVisible="False" />
7673
<Button x:Name="OptionButton"
7774
x:Uid="FindAndReplace_SearchOptionButton"
7875
Style="{StaticResource DismissButtonStyle}"
79-
Width="36"
76+
Width="32"
77+
Height="32"
8078
Content="&#xE712;"
81-
FontFamily="Segoe MDL2 Assets"
8279
FontSize="16"
8380
IsTabStop="False">
8481
<Button.Flyout>
@@ -87,21 +84,21 @@
8784
x:Uid="FindAndReplace_SearchOptionToggleButton_MatchCase"
8885
Click="OptionButtonFlyoutItem_OnClick">
8986
<ToggleMenuFlyoutItem.KeyboardAccelerators>
90-
<KeyboardAccelerator Key="C" Modifiers="Menu" />
87+
<KeyboardAccelerator Modifiers="Menu" Key="C" />
9188
</ToggleMenuFlyoutItem.KeyboardAccelerators>
9289
</ToggleMenuFlyoutItem>
9390
<ToggleMenuFlyoutItem x:Name="MatchWholeWordToggle"
9491
x:Uid="FindAndReplace_SearchOptionToggleButton_MatchWholeWord"
9592
Click="OptionButtonFlyoutItem_OnClick">
9693
<ToggleMenuFlyoutItem.KeyboardAccelerators>
97-
<KeyboardAccelerator Key="W" Modifiers="Menu" />
94+
<KeyboardAccelerator Modifiers="Menu" Key="W" />
9895
</ToggleMenuFlyoutItem.KeyboardAccelerators>
9996
</ToggleMenuFlyoutItem>
10097
<ToggleMenuFlyoutItem x:Name="UseRegexToggle"
10198
x:Uid="FindAndReplace_SearchOptionToggleButton_UseRegex"
10299
Click="OptionButtonFlyoutItem_OnClick">
103100
<ToggleMenuFlyoutItem.KeyboardAccelerators>
104-
<KeyboardAccelerator Key="E" Modifiers="Menu" />
101+
<KeyboardAccelerator Modifiers="Menu" Key="E" />
105102
</ToggleMenuFlyoutItem.KeyboardAccelerators>
106103
</ToggleMenuFlyoutItem>
107104
</MenuFlyout>
@@ -112,8 +109,8 @@
112109

113110
<Grid Grid.Row="0"
114111
Grid.Column="2"
115-
Height="36"
116-
Padding="1,1,1,1">
112+
Padding="2,0,0,0"
113+
VerticalAlignment="Top">
117114
<Grid.ColumnDefinitions>
118115
<ColumnDefinition Width="Auto" />
119116
<ColumnDefinition Width="Auto" />
@@ -125,14 +122,14 @@
125122
Grid.Column="0"
126123
Style="{StaticResource DismissButtonStyle}"
127124
Width="36"
128-
Content="&#xE110;"
129-
FontFamily="Segoe MDL2 Assets"
125+
Height="32"
126+
Content="&#xE74A;"
130127
FontSize="16"
131128
Click="SearchBackwardButton_OnClick"
132129
IsEnabled="False"
133130
IsTabStop="False">
134131
<Button.KeyboardAccelerators>
135-
<KeyboardAccelerator Key="F3" Modifiers="Shift" />
132+
<KeyboardAccelerator Modifiers="Shift" Key="F3" />
136133
</Button.KeyboardAccelerators>
137134
</Button>
138135

@@ -141,8 +138,8 @@
141138
Grid.Column="1"
142139
Style="{StaticResource DismissButtonStyle}"
143140
Width="36"
141+
Height="32"
144142
Content="&#xE74B;"
145-
FontFamily="Segoe MDL2 Assets"
146143
FontSize="16"
147144
Click="SearchForwardButton_OnClick"
148145
IsEnabled="False"
@@ -157,8 +154,8 @@
157154
Grid.Column="2"
158155
Style="{StaticResource DismissButtonStyle}"
159156
Width="36"
157+
Height="32"
160158
Content="&#xE894;"
161-
FontFamily="Segoe MDL2 Assets"
162159
FontSize="16"
163160
Click="DismissButton_OnClick"
164161
IsTabStop="False" />
@@ -167,8 +164,7 @@
167164
<Grid x:Name="ReplaceBarPlaceHolder"
168165
Grid.Row="1"
169166
Grid.Column="1"
170-
Height="36"
171-
Padding="1,1,1,1">
167+
VerticalAlignment="Top">
172168
<findAndReplace:FindAndReplaceTextBox x:Name="ReplaceBar"
173169
x:Uid="FindAndReplace_ReplaceBar"
174170
Style="{StaticResource TransparentTextBoxStyle}"
@@ -188,8 +184,8 @@
188184

189185
<Grid Grid.Row="1"
190186
Grid.Column="2"
191-
Height="36"
192-
Padding="1,1,1,1">
187+
Padding="2,0,0,0"
188+
VerticalAlignment="Top">
193189
<Grid>
194190
<Grid.ColumnDefinitions>
195191
<ColumnDefinition Width="Auto" />
@@ -201,14 +197,14 @@
201197
Grid.Column="0"
202198
Style="{StaticResource DismissButtonStyle}"
203199
Width="36"
200+
Height="32"
204201
Content="&#xE8AB;"
205-
FontFamily="Segoe MDL2 Assets"
206202
FontSize="16"
207203
Click="ReplaceButton_OnClick"
208204
IsEnabled="False"
209205
IsTabStop="False">
210206
<Button.KeyboardAccelerators>
211-
<KeyboardAccelerator Key="R" Modifiers="Menu" />
207+
<KeyboardAccelerator Modifiers="Menu" Key="R" />
212208
</Button.KeyboardAccelerators>
213209
</Button>
214210

@@ -217,14 +213,14 @@
217213
Grid.Column="1"
218214
Style="{StaticResource DismissButtonStyle}"
219215
Width="36"
216+
Height="32"
220217
Content="&#xE7FD;"
221-
FontFamily="Segoe MDL2 Assets"
222218
FontSize="16"
223219
Click="ReplaceAllButton_OnClick"
224220
IsEnabled="False"
225221
IsTabStop="False">
226222
<Button.KeyboardAccelerators>
227-
<KeyboardAccelerator Key="Enter" Modifiers="Control,Menu" />
223+
<KeyboardAccelerator Modifiers="Control,Menu" Key="Enter" />
228224
</Button.KeyboardAccelerators>
229225
</Button>
230226
</Grid>

src/Notepads/Controls/FindAndReplace/FindAndReplaceControl.xaml.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ public void ShowReplaceBar(bool showReplaceBar)
116116
if (showReplaceBar)
117117
{
118118
ToggleReplaceModeButtonGrid.SetValue(Grid.RowSpanProperty, 2);
119-
ToggleReplaceModeButton.Content = new FontIcon { Glyph = "\xE011", FontSize = 12 };
119+
ToggleReplaceModeButton.VerticalAlignment = VerticalAlignment.Stretch;
120+
ToggleReplaceModeButton.Content = "\uE70D";
120121
ReplaceBarPlaceHolder.Visibility = Visibility.Visible;
121122
if (!string.IsNullOrEmpty(FindBar.Text))
122123
{
@@ -127,7 +128,8 @@ public void ShowReplaceBar(bool showReplaceBar)
127128
else
128129
{
129130
ToggleReplaceModeButtonGrid.SetValue(Grid.RowSpanProperty, 1);
130-
ToggleReplaceModeButton.Content = new FontIcon { Glyph = "\xE00F", FontSize = 12 };
131+
ToggleReplaceModeButton.VerticalAlignment = VerticalAlignment.Top;
132+
ToggleReplaceModeButton.Content = "\uE76C";
131133
ReplaceBarPlaceHolder.Visibility = Visibility.Collapsed;
132134
ReplaceButton.IsEnabled = false;
133135
ReplaceAllButton.IsEnabled = false;

src/Notepads/Controls/GoTo/GoToControl.xaml

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
44
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
55
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6-
Height="36"
6+
d:DesignHeight="36"
77
d:DesignWidth="260"
88
mc:Ignorable="d">
99

@@ -20,38 +20,38 @@
2020

2121
<TextBlock x:Uid="GoTo_GoToBarLabel"
2222
Grid.Column="0"
23-
Margin="5,0,8,3"
23+
Margin="6,0,8,5"
2424
VerticalAlignment="Center"
2525
d:Text="Go To:"
26-
FontSize="15"
27-
TextAlignment="Center" />
26+
FontSize="15" />
2827

29-
<Grid Grid.Column="1">
30-
<TextBox x:Name="GoToBar"
31-
x:Uid="GoTo_GoToBar"
32-
Style="{StaticResource TransparentTextBoxStyle}"
33-
Foreground="{ThemeResource SystemControlHighlightChromeAltLowBrush}"
34-
BorderThickness="0"
35-
HorizontalAlignment="Stretch"
36-
VerticalAlignment="Stretch"
37-
FontSize="15"
38-
TextAlignment="Left"
39-
TextChanged="GoToBar_OnTextChanged"
40-
BeforeTextChanging="GoToBar_BeforeTextChanging"
41-
GotFocus="GoToBar_GotFocus"
42-
IsSpellCheckEnabled="False"
43-
KeyDown="GoToBar_OnKeyDown"
44-
LostFocus="GoToBar_LostFocus"
45-
d:PlaceholderText="Go To Line" />
46-
</Grid>
28+
<TextBox x:Name="GoToBar"
29+
x:Uid="GoTo_GoToBar"
30+
Grid.Column="1"
31+
Style="{StaticResource TransparentTextBoxStyle}"
32+
Foreground="{ThemeResource SystemControlHighlightChromeAltLowBrush}"
33+
BorderThickness="0"
34+
HorizontalAlignment="Stretch"
35+
VerticalAlignment="Top"
36+
FontSize="15"
37+
TextAlignment="Left"
38+
TextChanged="GoToBar_OnTextChanged"
39+
BeforeTextChanging="GoToBar_BeforeTextChanging"
40+
GotFocus="GoToBar_GotFocus"
41+
InputScope="Number"
42+
IsSpellCheckEnabled="False"
43+
KeyDown="GoToBar_OnKeyDown"
44+
LostFocus="GoToBar_LostFocus"
45+
d:PlaceholderText="Go To Line" />
4746

4847
<Button x:Name="SearchButton"
4948
x:Uid="GoTo_SearchButton"
5049
Grid.Column="2"
5150
Style="{StaticResource DismissButtonStyle}"
5251
Width="36"
52+
Height="32"
53+
VerticalAlignment="Top"
5354
Content="&#xEBE7;"
54-
FontFamily="Segoe MDL2 Assets"
5555
FontSize="16"
5656
Visibility="Collapsed"
5757
d:Visibility="Visible"
@@ -63,8 +63,9 @@
6363
Grid.Column="3"
6464
Style="{StaticResource DismissButtonStyle}"
6565
Width="36"
66+
Height="32"
67+
VerticalAlignment="Top"
6668
Content="&#xE894;"
67-
FontFamily="Segoe MDL2 Assets"
6869
FontSize="16"
6970
Click="DismissButton_OnClick"
7071
IsTabStop="False" />

0 commit comments

Comments
 (0)