This repository was archived by the owner on Jun 21, 2023. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathTextBlocks.xaml
More file actions
289 lines (271 loc) · 18.2 KB
/
Copy pathTextBlocks.xaml
File metadata and controls
289 lines (271 loc) · 18.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ui="clr-namespace:GitHub.UI"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">
<!-- TextBox -->
<Style x:Key="GitHubTextBox" TargetType="{x:Type TextBox}">
<Setter Property="BorderBrush" Value="{DynamicResource GitHubTextBoxBorderBrush}" />
<Setter Property="Foreground" Value="{DynamicResource GitHubTextBoxForegroundBrush}" />
<Setter Property="FontFamily" Value="{DynamicResource GitHubFontFamilyNormal}" />
<Setter Property="FontSize" Value="12" />
<Setter Property="Padding" Value="3,3,3,0" />
<Setter Property="Margin" Value="12,0,12,0" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="ToolTipService.ShowDuration" Value="30000" />
<Setter Property="ToolTipService.ShowOnDisabled" Value="True" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}">
<Grid>
<Border x:Name="Bd" CornerRadius="2" ClipToBounds="True" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
<Border CornerRadius="0" BorderBrush="Black" BorderThickness="0,1,0,0" Margin="2,-2,2,0" Opacity="0.4">
<Border.Effect>
<DropShadowEffect Direction="270" ShadowDepth="0" BlurRadius="4" Opacity="1" />
</Border.Effect>
</Border>
</Border>
<Grid Margin="3,1,0,0">
<ScrollViewer x:Name="PART_ContentHost" Padding="{TemplateBinding Padding}" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" VerticalAlignment="Top" Margin="0"/>
</Grid>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.5" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="BorderBrush" TargetName="Bd" Value="{DynamicResource GitHubTextBoxMouseOverBorderBrush}" />
</Trigger>
<Trigger Property="IsKeyboardFocusWithin" Value="True">
<Setter Property="BorderBrush" TargetName="Bd" Value="{DynamicResource GitHubAccentBrush}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="RoundedPromptTextBox" TargetType="{x:Type ui:PromptTextBox}" BasedOn="{StaticResource GitHubTextBox}">
<Setter Property="Background" Value="White"/>
<Setter Property="BorderBrush" Value="#D1D1D1"/>
<Setter Property="Foreground" Value="{DynamicResource GHTextBrush}"/>
<Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="AllowDrop" Value="true"/>
<Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
<Setter Property="Height" Value="24" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ui:PromptTextBox}">
<Grid>
<Border x:Name="Bd" CornerRadius="2" ClipToBounds="True" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
<Border CornerRadius="0" BorderBrush="Black" BorderThickness="0,1,0,0" Margin="2,-2,2,0" Opacity="0.4">
<Border.Effect>
<DropShadowEffect Direction="270" ShadowDepth="0" BlurRadius="4" Opacity="1" />
</Border.Effect>
</Border>
</Border>
<Grid Margin="1,2,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<ScrollViewer x:Name="PART_ContentHost" Padding="{TemplateBinding Padding}" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" VerticalAlignment="Top" Margin="0"/>
<Label x:Name="PromptLabel" HorizontalAlignment="Left"
Foreground="{DynamicResource GHTextBrush}"
FontSize="{TemplateBinding FontSize}" Margin="2,0,0,0" Padding="{TemplateBinding Padding}" Opacity="0"
Target="{Binding ElementName=Bd}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Focusable="False" IsHitTestVisible="False"
VerticalAlignment="Top">
<TextBlock Text="{TemplateBinding PromptText}" TextTrimming="CharacterEllipsis" />
</Label>
<ContentControl Grid.Column="1"
Content="{TemplateBinding IconContent}"
ContentTemplate="{TemplateBinding IconContentTemplate}"
Foreground="{TemplateBinding Foreground}"/>
</Grid>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.5" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="BorderBrush" TargetName="Bd" Value="{DynamicResource GitHubTextBoxMouseOverBorderBrush}" />
</Trigger>
<Trigger Property="IsKeyboardFocusWithin" Value="True">
<Setter Property="BorderBrush" TargetName="Bd" Value="{DynamicResource GitHubAccentBrush}" />
</Trigger>
<DataTrigger Binding="{Binding Text.Length, RelativeSource={RelativeSource Self}}" Value="0">
<Setter Property="Opacity" TargetName="PromptLabel" Value="0.7" />
</DataTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource GitHubTextBox}" />
<Style TargetType="{x:Type ui:PromptTextBox}" BasedOn="{StaticResource RoundedPromptTextBox}" />
<Style TargetType="{x:Type ui:SecurePasswordBox}" BasedOn="{StaticResource RoundedPromptTextBox}" />
<!-- PasswordBox -->
<Style x:Key="GitHubPasswordBox" TargetType="{x:Type PasswordBox}">
<Setter Property="BorderBrush" Value="{DynamicResource GitHubTextBoxBorderBrush}" />
<Setter Property="Foreground" Value="{DynamicResource GitHubTextBoxForegroundBrush}" />
<Setter Property="FontFamily" Value="{DynamicResource GitHubFontFamilyNormal}" />
<Setter Property="FontSize" Value="12" />
<Setter Property="Padding" Value="3,2,3,3" />
<Setter Property="Margin" Value="12,0,12,0" />
<Setter Property="Width" Value="Auto" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type PasswordBox}">
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"
SnapsToDevicePixels="True">
<ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.5" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="BorderBrush" TargetName="Bd" Value="{DynamicResource GitHubTextBoxMouseOverBorderBrush}" />
</Trigger>
<Trigger Property="IsKeyboardFocusWithin" Value="True">
<Setter Property="BorderBrush" TargetName="Bd" Value="{DynamicResource GitHubAccentBrush}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type PasswordBox}" BasedOn="{StaticResource GitHubPasswordBox}" />
<!-- End PasswordBox -->
<!-- Label -->
<Style x:Key="GitHubLabel" TargetType="{x:Type Label}">
<Setter Property="Foreground" Value="{DynamicResource GHTextBrush}" />
</Style>
<Style TargetType="{x:Type Label}" BasedOn="{StaticResource GitHubLabel}" />
<!-- End Label -->
<!-- Textblock -->
<Style x:Key="GitHubTextBlock" TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="{DynamicResource GHTextBrush}" />
<Setter Property="FontFamily" Value="{DynamicResource GitHubFontFamilyNormal}" />
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="FontSize" Value="14" />
<Setter Property="Padding" Value="0" />
<Setter Property="Margin" Value="0" />
<Setter Property="ToolTipService.ShowDuration" Value="30000" />
</Style>
<Style x:Key="GitHubH1TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource GitHubTextBlock}">
<Setter Property="FontSize" Value="30" />
<Setter Property="FontWeight" Value="Light" />
<Setter Property="Margin" Value="24,10,0,6" />
<Setter Property="TextOptions.TextFormattingMode" Value="Ideal" />
</Style>
<Style x:Key="GitHubH2TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource GitHubH1TextBlock}">
<Setter Property="FontSize" Value="20" />
</Style>
<Style x:Key="GitHubDescriptionTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource GitHubTextBlock}">
<Setter Property="Margin" Value="24,0" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="TextWrapping" Value="Wrap" />
</Style>
<!-- End Textblock -->
<!-- ToolTip -->
<Style x:Key="GitHubToolTip" TargetType="{x:Type ToolTip}">
<Setter Property="Margin" Value="0" />
<Setter Property="FontSize" Value="10pt" />
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="HasDropShadow" Value="False" />
<Setter Property="Padding" Value="5,1,5,3" />
<Setter Property="Background" Value="#f9f9f9" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="BorderBrush" Value="#20000000" />
<Setter Property="Foreground" Value="#494949" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToolTip">
<Grid>
<Rectangle Margin="2,2,0,0" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}"
Fill="{TemplateBinding Background}" Opacity="0" StrokeThickness="0" />
<Border Opacity="0.95" Margin="4,2,4,5" SnapsToDevicePixels="True"
Background="{TemplateBinding Background}" BorderBrush="#cacaca" BorderThickness="1" Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}">
<ContentPresenter Margin="{TemplateBinding Padding}" HorizontalAlignment="Left" VerticalAlignment="Top" />
<Border.Effect>
<DropShadowEffect ShadowDepth="1" Direction="270" BlurRadius="4" Opacity="0.2" />
</Border.Effect>
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type ToolTip}" BasedOn="{StaticResource GitHubToolTip}" />
<!-- End ToolTip -->
<LinearGradientBrush x:Key="TextBoxBorder" EndPoint="0,20" MappingMode="Absolute" StartPoint="0,0">
<GradientStop Color="#ABADB3" Offset="0.05" />
<GradientStop Color="#E2E3EA" Offset="0.07" />
<GradientStop Color="#E3E9EF" Offset="1" />
</LinearGradientBrush>
<Style x:Key="{x:Type TextBoxBase}" BasedOn="{x:Null}" TargetType="{x:Type TextBoxBase}">
<Setter Property="Foreground" Value="{DynamicResource GHTextBrush}" />
<Setter Property="Background" Value="White" />
<Setter Property="BorderBrush" Value="{StaticResource TextBoxBorder}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Padding" Value="1" />
<Setter Property="AllowDrop" Value="true" />
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
<Setter Property="Stylus.IsFlicksEnabled" Value="False" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBoxBase}">
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Opacity" Value="0.5" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="{x:Type Hyperlink}" TargetType="{x:Type Hyperlink}">
<Setter Property="Foreground" Value="{DynamicResource GHBlueLinkButtonTextBrush}" />
<Setter Property="TextDecorations" Value="None" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Foreground" Value="{DynamicResource GHBlueLinkButtonHoverBrush}" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="{DynamicResource GHBlueLinkButtonDisabledTextBrush}" />
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="LockIconPath" TargetType="{x:Type Path}">
<Setter Property="Data" Value="F1M2,9C2,9 2,16 2,16 2,16 9,16 9,16 9,16 9,15.891 9,15.699L9,15C9,15 3,15 3,15 3,15 3,14 3,14 3,14 9,14 9,14L9,13C9,13 3,13 3,13 3,13 3,12 3,12 3,12 9,12 9,12L9,11C9,11 3,11 3,11 3,11 3,10 3,10 3,10 9,10 9,10 9,9.438 9,9 9,9 9,9 2,9 2,9z M7,3C5.895,3 5,3.895 5,5 5,6.105 5,8 5,8 5,8 9,8 9,8 9,8 9,5.707 9,5 9,3.895 8.105,3 7,3z M7,1C9.209,1 11,2.791 11,5 11,5.298 11,5.822 11,6.441L11,8 11.57,8C11.844,8 12,8 12,8 12.552,8 13,8.448 13,9 13,9 13,16 13,16 13,16.552 12.552,17 12,17 12,17 2,17 2,17 1.448,17 1,16.552 1,16 1,16 1,9 1,9 1,8.448 1.448,8 2,8 2,8 2.156,8 2.43,8L3,8 3,6.869C3,6.203 3,5.552 3,5 3,2.791 4.791,1 7,1z" />
<Setter Property="Fill" Value="#CACACA" />
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Margin" Value="12,0,0,1"/>
<Setter Property="Width" Value="16"/>
</Style>
<Style x:Key="PublicRepoIconPath" TargetType="{x:Type Path}">
<Setter Property="Data" Value="F1M2,13C2,13 2,14 2,14 2,14 1.975,15 2.969,15 3.236,15 3.594,15 4,15 4,15 4,14 4,14 4,14 7,14 7,14 7,14 7,15 7,15 9.031,15 10.969,15 10.969,15 10.969,15 12,14.963 12,14 12,13.5 12,13 12,13 8.937,13 4.075,13 2,13z M5,10C5,10 6,10 6,10 6,10 6,11 6,11 6,11 5,11 5,11 5,11 5,10 5,10z M5,8C5,8 6,8 6,8 6,8 6,9 6,9 6,9 5,9 5,9 5,9 5,8 5,8z M5,6C5,6 6,6 6,6 6,6 6,7 6,7 6,7 5,7 5,7 5,7 5,6 5,6z M5,4C5,4 6,4 6,4 6,4 6,5 6,5 6,5 5,5 5,5 5,5 5,4 5,4z M4,3C4,3 4,12 4,12 4,12 6,12 6,12 6,12 12,12 12,12 12,12 12,3 12,3 12,3 4,3 4,3z M2,2C2,2 12,2 12,2 12,2 12.969,1.77 13,3 13,3 13,12 13,12 13,12 13,15 13,15 13,15 13.044,16 12,16 10.866,16 8.917,16 7,16 7,16 7,18 7,18 7,18 5.5,16.5 5.5,16.5 5.5,16.5 4,18 4,18 4,18 4,16 4,16 3.216,16 2.521,16 2,16 1.054,16 1.003,15.151 1.001,15 1.001,15 1,15 1,15 1,15 1,7.585 1,3 1,1.982 2,2 2,2z" />
<Setter Property="Fill" Value="#CACACA" />
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Margin" Value="12,1,0,0"/>
<Setter Property="Width" Value="16"/>
</Style>
<Style x:Key="LocalRepoIconPath" TargetType="{x:Type Path}">
<Setter Property="Data" Value="F1M11.33,1.988C11.33,1.988 16.012,7 16.012,7 16.012,7 11.33,12.013 11.33,12.013 11.33,12.013 9.993,10.58 9.993,10.58 9.993,10.58 13.336,7 13.336,7 13.336,7 9.992,3.42 9.992,3.42 9.992,3.42 11.33,1.988 11.33,1.988z M6.67,1.988C6.67,1.988 8.008,3.42 8.008,3.42 8.008,3.42 4.664,7 4.664,7 4.664,7 8.008,10.58 8.008,10.58 8.008,10.58 6.67,12.012 6.67,12.012 6.67,12.012 1.988,7 1.988,7 1.988,7 6.67,1.988 6.67,1.988z" />
<Setter Property="Fill" Value="#CACACA" />
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Margin" Value="10,0,2,0"/>
<Setter Property="Width" Value="16"/>
</Style>
</ResourceDictionary>