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

Commit 26a7442

Browse files
committed
Use VS text style resources for font sizes
https://msdn.microsoft.com/en-us/library/mt162316.aspx
1 parent aaf6028 commit 26a7442

File tree

5 files changed

+4
-15
lines changed

5 files changed

+4
-15
lines changed

src/GitHub.VisualStudio/GitHub.VisualStudio.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -397,10 +397,6 @@
397397
<Page Include="SharedDictionary.xaml">
398398
<Generator>MSBuild:Compile</Generator>
399399
</Page>
400-
<Page Include="Styles\Typography.xaml">
401-
<SubType>Designer</SubType>
402-
<Generator>MSBuild:Compile</Generator>
403-
</Page>
404400
<Page Include="Styles\VsBrush.xaml">
405401
<Generator>MSBuild:Compile</Generator>
406402
<SubType>Designer</SubType>

src/GitHub.VisualStudio/SharedDictionary.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
<cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio;component/Styles/Buttons.xaml" />
1313
<cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio;component/Styles/GitHubTabControl.xaml" />
1414
<cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio;component/Styles/TextBlocks.xaml" />
15-
<cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio;component/Styles/Typography.xaml" />
1615
</ResourceDictionary.MergedDictionaries>
1716

1817
<Style x:Key="VSStyledButton" BasedOn="{StaticResource VsButtonStyleKey}" TargetType="{x:Type Button}" />

src/GitHub.VisualStudio/Styles/Typography.xaml

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

src/GitHub.VisualStudio/UI/Views/Controls/PullRequestListItem.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
xmlns:local="clr-namespace:GitHub.VisualStudio.UI.Views"
66
xmlns:models="clr-namespace:GitHub.Models;assembly=GitHub.Exports"
77
xmlns:viewmodels="clr-namespace:GitHub.ViewModels;assembly=GitHub.Exports.Reactive"
8+
xmlns:vsui="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.14.0"
89
xmlns:ui="clr-namespace:GitHub.UI;assembly=GitHub.UI">
910

1011
<ResourceDictionary.MergedDictionaries>
@@ -54,10 +55,9 @@
5455
Grid.Column="1"
5556
HorizontalAlignment="Left"
5657
VerticalAlignment="Top"
57-
FontFamily="Segoe UI"
58-
FontSize="{DynamicResource GitHubVsListTitleFontSize}"
5958
Foreground="{DynamicResource GitHubVsToolWindowText}"
6059
Margin="0,-3,5,0"
60+
Style="{DynamicResource {x:Static vsui:VsResourceKeys.TextBlockEnvironment122PercentFontSizeStyleKey}}"
6161
Text="{Binding Title}"
6262
ToolTip="{Binding Title}"
6363
TextTrimming="CharacterEllipsis" />

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
xmlns:local="clr-namespace:GitHub.VisualStudio.UI.Views"
88
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
99
xmlns:sampleData="clr-namespace:GitHub.SampleData;assembly=GitHub.App"
10+
xmlns:vsui="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.14.0"
1011
xmlns:ui="clr-namespace:GitHub.UI;assembly=GitHub.UI"
1112
Background="{DynamicResource GitHubVsToolWindowBackground}"
1213
DataContext="{Binding ViewModel}"
@@ -341,7 +342,7 @@
341342
ToolTip="I am an example commit message"
342343
VerticalAlignment="Top"
343344
Foreground="{DynamicResource GitHubVsToolWindowText}"
344-
FontSize="{StaticResource GitHubVsListItemTitleFontSize}"
345+
Style="{DynamicResource {x:Static vsui:VsResourceKeys.TextBlockEnvironment122PercentFontSizeStyleKey}}"
345346
Margin="10,-3,5,0"
346347
Grid.Column="1"
347348
Grid.Row="0" />

0 commit comments

Comments
 (0)