Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit ae16d09

Browse files
committed
Remove use of legacy TextBlocks.xaml
Stop using RoundedPromptTextBox.
1 parent 2130ed1 commit ae16d09

File tree

7 files changed

+9
-299
lines changed

7 files changed

+9
-299
lines changed

src/GitHub.UI/Assets/TextBlocks.xaml

Lines changed: 0 additions & 282 deletions
This file was deleted.

src/GitHub.UI/SharedDictionary.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@
44
<ResourceDictionary Source="pack://application:,,,/GitHub.UI;component/Assets/Styles.xaml" />
55
<ResourceDictionary Source="pack://application:,,,/GitHub.UI;component/Assets/Controls.xaml" />
66
<ResourceDictionary Source="pack://application:,,,/GitHub.UI;component/Assets/Buttons.xaml" />
7-
<ResourceDictionary Source="pack://application:,,,/GitHub.UI;component/Assets/TextBlocks.xaml" />
87
</ResourceDictionary.MergedDictionaries>
98
</ResourceDictionary>

src/GitHub.VisualStudio.UI/Styles/TextBlocks.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
22
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
33
xmlns:ui="clr-namespace:GitHub.UI;assembly=GitHub.UI"
4+
xmlns:vs="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.14.0"
45
xmlns:local="clr-namespace:GitHub.VisualStudio.Styles"
56
xmlns:vsui="clr-namespace:GitHub.VisualStudio.UI">
67

@@ -48,7 +49,7 @@
4849
<Setter Property="BorderBrush" TargetName="Bd" Value="{DynamicResource GitHubVsBrandedUIBorder}" />
4950
</Trigger>
5051
<Trigger Property="IsKeyboardFocusWithin" Value="True">
51-
<Setter Property="BorderBrush" TargetName="Bd" Value="{DynamicResource GitHubAccentBrush}" />
52+
<Setter Property="BorderBrush" TargetName="Bd" Value="{DynamicResource {x:Static vs:CommonControlsColors.TextBoxBorderFocusedBrushKey}}" />
5253
</Trigger>
5354
<DataTrigger Binding="{Binding Text.Length, RelativeSource={RelativeSource Self}}" Value="0">
5455
<Setter Property="Opacity" TargetName="PromptLabel" Value="0.7" />

src/GitHub.VisualStudio.UI/Styles/VsBrush.xaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<ResourceDictionary
22
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:vs="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.14.0"
45
xmlns:PresentationOptions="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"
56
xmlns:vsui="clr-namespace:GitHub.VisualStudio.UI">
67

@@ -21,6 +22,9 @@
2122
<SolidColorBrush x:Key="GitHubAnnotationMarkerWarningFill" Color="#ffc806" />
2223
<SolidColorBrush x:Key="GitHubAnnotationMarkerFailureFill" Color="#d53243" />
2324

25+
<!-- HACK: Use the same color as border of focused text box -->
26+
<SolidColorBrush x:Key="GitHubAccentBrush" Color="{DynamicResource {x:Static vs:CommonControlsColors.TextBoxBorderFocusedColorKey}}" />
27+
2428
<!-- Team Foundation Colors -->
2529
<SolidColorBrush x:Key="TFRequiredTextBoxBorderBrushKey" Color="{Binding Source={x:Static vsui:TeamFoundationColors.Instance}, Path=RequiredTextBoxBorderColor, Mode=OneWay}" />
2630
<SolidColorBrush x:Key="TFTextBoxBorderBrushKey" Color="{Binding Source={x:Static vsui:TeamFoundationColors.Instance}, Path=TextBoxBorderColor, Mode=OneWay}" />
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,16 @@
11
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
22
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3-
xmlns:ghfvs="https://github.com/github/VisualStudio"
4-
xmlns:vs="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.14.0"
5-
xmlns:local="clr-namespace:GitHub.VisualStudio.Styles">
3+
xmlns:ghfvs="https://github.com/github/VisualStudio">
64

75
<ResourceDictionary.MergedDictionaries>
86
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI.Reactive;component/SharedDictionary.xaml" />
97
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio.UI;component/SharedDictionary.xaml" />
108
<StaticResource ResourceKey="ThemedDialogDefaultStylesKey"/>
11-
<ResourceDictionary Source="pack://application:,,,/GitHub.VisualStudio.UI;component/Styles/TextBlocks.xaml" />
129
</ResourceDictionary.MergedDictionaries>
1310
<Style TargetType="{x:Type ghfvs:PromptTextBox}" BasedOn="{StaticResource GitHubVsPromptTextBox}" />
1411
<Style TargetType="{x:Type ghfvs:SecurePasswordBox}" BasedOn="{StaticResource GitHubVsPromptTextBox}" />
1512
<Style TargetType="{x:Type TextBlock}" x:Key="GitHubH1TextBlock" BasedOn="{StaticResource TextBlockEnvironment200PercentFontSizeStyleKey}" />
1613
<Style TargetType="{x:Type TextBlock}" x:Key="GitHubDescriptionTextBlock" BasedOn="{StaticResource TextBlockEnvironment111PercentFontSizeStyleKey}" />
1714
<Style TargetType="{x:Type ghfvs:FilteredComboBox}" BasedOn="{StaticResource {x:Type ComboBox}}" />
1815
<Style TargetType="{x:Type ghfvs:GitHubComboBox}" BasedOn="{StaticResource {x:Type ComboBox}}" />
19-
20-
<!-- HACK: Keep the focused text box border consistent -->
21-
<SolidColorBrush x:Key="GitHubAccentBrush" Color="{DynamicResource {x:Static vs:CommonControlsColors.TextBoxBorderFocusedColorKey}}" />
2216
</ResourceDictionary>

src/GitHub.VisualStudio.UI/Views/Documents/IssueishCommentView.xaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,9 @@
142142
Loaded="body_Loaded"
143143
SpellCheck.IsEnabled="True">
144144
<ui:PromptTextBox.Style>
145-
<Style TargetType="ui:PromptTextBox" BasedOn="{StaticResource RoundedPromptTextBox}">
146-
<Setter Property="Foreground" Value="{DynamicResource GitHubVsToolWindowText}" />
147-
<Setter Property="Background" Value="{DynamicResource VsBrush.SearchBoxBackground}" />
145+
<Style TargetType="ui:PromptTextBox" BasedOn="{StaticResource GitHubVsPromptTextBox}">
148146
<Setter Property="Height" Value="28"/>
149147
<Setter Property="PromptText" Value="Reply..."/>
150-
<Setter Property="BorderBrush" Value="{DynamicResource GitHubVsBrandedUIBorder}" />
151148

152149
<Style.Triggers>
153150
<DataTrigger Binding="{Binding EditState}" Value="Editing">

src/GitHub.VisualStudio.UI/Views/PullRequestReviewCommentView.xaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,9 @@
175175
Loaded="body_Loaded"
176176
SpellCheck.IsEnabled="True">
177177
<ui:PromptTextBox.Style>
178-
<Style TargetType="ui:PromptTextBox" BasedOn="{StaticResource RoundedPromptTextBox}">
179-
<Setter Property="Foreground" Value="{DynamicResource GitHubVsToolWindowText}" />
180-
<Setter Property="Background" Value="{DynamicResource VsBrush.SearchBoxBackground}" />
178+
<Style TargetType="ui:PromptTextBox" BasedOn="{StaticResource GitHubVsPromptTextBox}">
181179
<Setter Property="Height" Value="28"/>
182180
<Setter Property="PromptText" Value="Reply..."/>
183-
<Setter Property="BorderBrush" Value="{DynamicResource GitHubVsBrandedUIBorder}" />
184181

185182
<Style.Triggers>
186183
<DataTrigger Binding="{Binding EditState}" Value="Editing">

0 commit comments

Comments
 (0)