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

Commit d1e6cf0

Browse files
committed
Style FilterTextBox for VS
1 parent e74eabc commit d1e6cf0

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

src/GitHub.UI/Assets/Controls.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
mc:Ignorable="d">
77

88
<ResourceDictionary.MergedDictionaries>
9-
<ResourceDictionary Source="Controls/FilterTextBox.xaml" />
109
<ResourceDictionary Source="Controls/GitHubLinkButton.xaml" />
1110
<ResourceDictionary Source="Controls/ScrollViewerWithShadow.xaml" />
1211
<ResourceDictionary Source="../Controls/Octicons/OcticonImage.xaml" />

src/GitHub.VisualStudio.UI/SharedDictionary.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio.UI;component/Styles/Buttons.xaml"/>
1212
<cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio.UI;component/Styles/GitHubTabControl.xaml"/>
1313
<cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio.UI;component/Styles/TextBlocks.xaml"/>
14+
<cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio.UI;component/Styles/FilterTextBox.xaml"/>
1415
<cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio.UI;component/Styles/LinkDropDown.xaml"/>
1516
<cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio.UI;component/Styles/GitHubActionLink.xaml"/>
1617
<cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio.UI;component/Styles/ItemsControls.xaml"/>

src/GitHub.UI/Assets/Controls/FilterTextBox.xaml renamed to src/GitHub.VisualStudio.UI/Styles/FilterTextBox.xaml

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

56
<Style TargetType="{x:Type ui:FilterTextBox}">
6-
<Setter Property="Background" Value="White"/>
7-
<Setter Property="BorderBrush" Value="#D1D1D1"/>
8-
<Setter Property="Foreground" Value="{DynamicResource GitHubForegroundBrush}"/>
7+
<Setter Property="Background" Value="{DynamicResource {x:Static vs:CommonControlsColors.TextBoxBackgroundBrushKey}}"/>
8+
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static vs:CommonControlsColors.TextBoxBorderBrushKey}}"/>
9+
<Setter Property="Foreground" Value="{DynamicResource {x:Static vs:CommonControlsColors.TextBoxTextBrushKey}}"/>
910
<Setter Property="BorderThickness" Value="1"/>
1011
<Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
1112
<Setter Property="HorizontalContentAlignment" Value="Left"/>
@@ -112,12 +113,12 @@
112113
<Condition Property="IsEnabled" Value="True" />
113114
</MultiTrigger.Conditions>
114115
<MultiTrigger.Setters>
115-
<Setter Property="BorderBrush" TargetName="Bd" Value="{DynamicResource GitHubTextBoxMouseOverBorderBrush}" />
116+
<Setter Property="BorderBrush" TargetName="Bd" Value="{DynamicResource {x:Static vs:CommonControlsColors.TextBoxBorderFocusedBrushKey}}" />
116117
<Setter Property="Opacity" TargetName="clearButton" Value="1" />
117118
</MultiTrigger.Setters>
118119
</MultiTrigger>
119120
<Trigger Property="IsKeyboardFocusWithin" Value="True">
120-
<Setter Property="BorderBrush" TargetName="Bd" Value="{DynamicResource GitHubAccentBrush}" />
121+
<Setter Property="BorderBrush" TargetName="Bd" Value="{DynamicResource {x:Static vs:CommonControlsColors.TextBoxBorderFocusedBrushKey}}" />
121122
</Trigger>
122123
<DataTrigger Binding="{Binding Text.Length, RelativeSource={RelativeSource Self}}" Value="0">
123124
<Setter Property="Opacity" TargetName="PromptLabel" Value="0.7" />

0 commit comments

Comments
 (0)