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

Commit 78cf181

Browse files
authored
Merge pull request #574 from github/don/pr-details-polish
Moar details polish
2 parents 4f2d950 + c499948 commit 78cf181

File tree

5 files changed

+16
-6
lines changed

5 files changed

+16
-6
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,6 @@
4848
<SolidColorBrush x:Key="GitHubComboBoxBorderBrush" Color="#FFCCCEDC" />
4949

5050
<SolidColorBrush x:Key="GitHubTabItemSelectedBorder" Color="#FFD0D7E4" />
51+
52+
<SolidColorBrush x:Key="GitHubDirectoryIconForeground" Color="#FFF5D367" />
5153
</ResourceDictionary>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,6 @@
4848
<SolidColorBrush x:Key="GitHubComboBoxBorderBrush" Color="#FF434346" />
4949

5050
<SolidColorBrush x:Key="GitHubTabItemSelectedBorder" Color="#FF3F3F46" />
51+
52+
<SolidColorBrush x:Key="GitHubDirectoryIconForeground" Color="#FF87C3FC" />
5153
</ResourceDictionary>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,5 @@
4141
<SolidColorBrush x:Key="GitHubVsWindowText" Color="#FF000000" />
4242
<SolidColorBrush x:Key="GitHubVsBrandedUIBorder" Color="#FF8591A2" />
4343
<SolidColorBrush x:Key="GitHubVsBrandedUIBackground" Color="#FFFFFFFF" />
44+
<SolidColorBrush x:Key="GitHubDirectoryIconForeground" Color="#FFF5D367" />
4445
</ResourceDictionary>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,6 @@
4848
<SolidColorBrush x:Key="GitHubComboBoxBorderBrush" Color="#FFCCCEDC" />
4949

5050
<SolidColorBrush x:Key="GitHubTabItemSelectedBorder" Color="#FFCCCEBD" />
51+
52+
<SolidColorBrush x:Key="GitHubDirectoryIconForeground" Color="#FFF5D367" />
5153
</ResourceDictionary>

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@
8282
<Setter Property="Margin" Value="0 4"/>
8383
</Style>
8484

85+
<Style x:Key="CheckoutErrorMessage" TargetType="TextBlock">
86+
<Setter Property="Foreground" Value="Red" />
87+
</Style>
88+
8589
<!-- Hyperlink has no Visibility property, sigh. Hack around this by making the text
8690
transparent and 1 px in size. -->
8791
<Style x:Key="HyperlinkHiddenWhenDisabled" TargetType="Hyperlink">
@@ -200,7 +204,7 @@
200204

201205
<!-- Branch checked out and needs pull -->
202206
<TextBlock TextWrapping="Wrap">
203-
<ui:OcticonImage Icon="sync" Foreground="Orange" Margin="0 0 0 -4"/>
207+
<ui:OcticonImage Icon="alert" Foreground="Orange" Margin="0 0 0 -4"/>
204208
<Run>Your local branch is behind by</Run>
205209
<Run FontWeight="Bold" Text="{Binding CommitsBehind, StringFormat={}{0} commits.}"/>
206210
<Hyperlink Command="{Binding Checkout}" Style="{StaticResource HyperlinkHiddenWhenDisabled}">Update</Hyperlink>
@@ -218,6 +222,7 @@
218222

219223
<!-- Local branch exists but is not checked out -->
220224
<TextBlock TextWrapping="Wrap">
225+
<ui:OcticonImage Icon="alert" Foreground="Orange" Margin="0 0 0 -4"/>
221226
<Run BaselineAlignment="Top">This branch is not currently checked out.</Run>
222227
<Hyperlink Command="{Binding Checkout}" Style="{StaticResource HyperlinkHiddenWhenDisabled}">Switch branch</Hyperlink>
223228
<TextBlock.Style>
@@ -266,11 +271,10 @@
266271
</TextBlock>
267272

268273
<!-- Checkout disabled message -->
269-
<TextBlock Margin="0 4" TextWrapping="Wrap">
270-
<ui:OcticonImage Icon="alert" Foreground="Orange" Margin="0 0 0 -4"/>
274+
<TextBlock Margin="0 0 0 4" TextWrapping="Wrap">
271275
<Run Text="{Binding CheckoutDisabledMessage}"/>
272276
<TextBlock.Style>
273-
<Style TargetType="TextBlock">
277+
<Style TargetType="TextBlock" BasedOn="{StaticResource CheckoutErrorMessage}">
274278
<Style.Triggers>
275279
<DataTrigger Binding="{Binding CheckoutDisabledMessage}" Value="{x:Null}">
276280
<Setter Property="Visibility" Value="Collapsed" />
@@ -421,8 +425,7 @@
421425
<HierarchicalDataTemplate DataType="{x:Type vm:PullRequestDirectoryViewModel}"
422426
ItemsSource="{Binding Children}">
423427
<StackPanel Orientation="Horizontal">
424-
<!-- TODO: Use the right icon here -->
425-
<ui:OcticonImage Icon="briefcase" Foreground="{DynamicResource GitHubVsWindowText}"/>
428+
<ui:OcticonImage Icon="file_directory" Foreground="{DynamicResource GitHubDirectoryIconForeground}" />
426429
<TextBlock Text="{Binding DirectoryName}" Margin="4 2" VerticalAlignment="Center"/>
427430
</StackPanel>
428431
</HierarchicalDataTemplate>

0 commit comments

Comments
 (0)