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

Commit d67ce7c

Browse files
Merge branch 'master' into localizations
2 parents ece592b + bbd299e commit d67ce7c

File tree

14 files changed

+39
-24
lines changed

14 files changed

+39
-24
lines changed

src/GitHub.App/ViewModels/Dialog/Clone/RepositorySelectViewModel.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,22 +186,23 @@ async Task LoadItems(bool refresh)
186186

187187
bool FilterItem(object obj)
188188
{
189-
if (obj is IRepositoryItemViewModel item && !string.IsNullOrWhiteSpace(Filter))
189+
var trimedFilter = Filter?.Trim();
190+
if (obj is IRepositoryItemViewModel item && !string.IsNullOrEmpty(trimedFilter))
190191
{
191-
if (new UriString(Filter).IsHypertextTransferProtocol)
192+
if (new UriString(trimedFilter).IsHypertextTransferProtocol)
192193
{
193194
var urlString = item.Url.ToString();
194195
var urlStringWithGit = urlString + ".git";
195196
var urlStringWithSlash = urlString + "/";
196197
return
197-
urlString.Contains(Filter, StringComparison.OrdinalIgnoreCase) ||
198-
urlStringWithGit.Contains(Filter, StringComparison.OrdinalIgnoreCase) ||
199-
urlStringWithSlash.Contains(Filter, StringComparison.OrdinalIgnoreCase);
198+
urlString.Contains(trimedFilter, StringComparison.OrdinalIgnoreCase) ||
199+
urlStringWithGit.Contains(trimedFilter, StringComparison.OrdinalIgnoreCase) ||
200+
urlStringWithSlash.Contains(trimedFilter, StringComparison.OrdinalIgnoreCase);
200201
}
201202
else
202203
{
203204
return
204-
item.Caption.Contains(Filter, StringComparison.CurrentCultureIgnoreCase);
205+
item.Caption.Contains(trimedFilter, StringComparison.CurrentCultureIgnoreCase);
205206
}
206207
}
207208

src/GitHub.UI/Assets/Markdown.xaml renamed to src/GitHub.VisualStudio.UI/Styles/Markdown.xaml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
22
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3+
xmlns:shell="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.14.0"
34
xmlns:markdig="clr-namespace:Markdig.Wpf;assembly=Markdig.Wpf">
45
<Style TargetType="{x:Type FlowDocument}" x:Key="{x:Static markdig:Styles.DocumentStyleKey}">
56
<Setter Property="FontFamily" Value="Segoe UI"/>
@@ -12,22 +13,22 @@
1213
</Style>
1314
<Style TargetType="{x:Type Paragraph}" x:Key="{x:Static markdig:Styles.Heading1StyleKey}">
1415
<Setter Property="FontSize" Value="19" />
15-
<Setter Property="Foreground" Value="{DynamicResource VsBrush.WindowText}" />
16+
<Setter Property="Foreground" Value="{DynamicResource {x:Static shell:VsBrushes.WindowTextKey}}" />
1617
<Setter Property="FontWeight" Value="Light" />
1718
</Style>
1819
<Style TargetType="{x:Type Paragraph}" x:Key="{x:Static markdig:Styles.Heading2StyleKey}">
1920
<Setter Property="FontSize" Value="17" />
20-
<Setter Property="Foreground" Value="{DynamicResource VsBrush.WindowText}" />
21+
<Setter Property="Foreground" Value="{DynamicResource {x:Static shell:VsBrushes.WindowTextKey}}" />
2122
<Setter Property="FontWeight" Value="Light" />
2223
</Style>
2324
<Style TargetType="{x:Type Paragraph}" x:Key="{x:Static markdig:Styles.Heading3StyleKey}">
2425
<Setter Property="FontSize" Value="16" />
25-
<Setter Property="Foreground" Value="{DynamicResource VsBrush.WindowText}" />
26+
<Setter Property="Foreground" Value="{DynamicResource {x:Static shell:VsBrushes.WindowTextKey}}" />
2627
<Setter Property="FontWeight" Value="Light" />
2728
</Style>
2829
<Style TargetType="{x:Type Paragraph}" x:Key="{x:Static markdig:Styles.Heading4StyleKey}">
2930
<Setter Property="FontSize" Value="14" />
30-
<Setter Property="Foreground" Value="{DynamicResource VsBrush.WindowText}" />
31+
<Setter Property="Foreground" Value="{DynamicResource {x:Static shell:VsBrushes.WindowTextKey}}" />
3132
<Setter Property="FontWeight" Value="Light" />
3233
<Setter Property="TextDecorations" Value="Underline" />
3334
</Style>
@@ -42,14 +43,17 @@
4243
<Setter Property="Padding" Value="4"/>
4344
</Style>
4445
<Style TargetType="{x:Type Paragraph}" x:Key="{x:Static markdig:Styles.CodeBlockStyleKey}">
45-
<Setter Property="Foreground" Value="{DynamicResource VsBrush.Text}" />
46+
<Setter Property="Foreground" Value="{DynamicResource {x:Static shell:VsBrushes.WindowTextKey}}" />
4647
<Setter Property="Background" Value="{DynamicResource GitHubBranchNameBackgroundBrush}" />
4748
<Setter Property="Padding" Value="2" />
4849
<Setter Property="FontFamily" Value="Consolas, Lucida Sans Typewriter, Courier New" />
4950
</Style>
5051
<Style TargetType="{x:Type Run}" x:Key="{x:Static markdig:Styles.CodeStyleKey}">
51-
<Setter Property="Foreground" Value="{DynamicResource VsBrush.Text}" />
52+
<Setter Property="Foreground" Value="{DynamicResource {x:Static shell:VsBrushes.WindowTextKey}}" />
5253
<Setter Property="Background" Value="{DynamicResource GitHubBranchNameBackgroundBrush}" />
5354
<Setter Property="FontFamily" Value="Consolas, Lucida Sans Typewriter, Courier New" />
5455
</Style>
56+
<Style TargetType="{x:Type FlowDocumentScrollViewer}">
57+
<Setter Property="SelectionOpacity" Value="0.4" />
58+
</Style>
5559
</ResourceDictionary>

src/GitHub.VisualStudio.UI/UI/Controls/InfoPanel.xaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<ResourceDictionary>
1919
<ResourceDictionary.MergedDictionaries>
2020
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/SharedDictionary.xaml"/>
21-
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/Assets/Markdown.xaml" />
21+
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio.UI;component/Styles/Markdown.xaml" />
2222
</ResourceDictionary.MergedDictionaries>
2323
<Style x:Key="DocumentStyle" TargetType="FlowDocument">
2424
<Setter Property="FontFamily" Value="Segoe UI"/>
@@ -54,7 +54,14 @@
5454
Markdown="{TemplateBinding Message}"
5555
ScrollViewer.CanContentScroll="False"
5656
ScrollViewer.HorizontalScrollBarVisibility="Hidden"
57-
ScrollViewer.VerticalScrollBarVisibility="Hidden"/>
57+
ScrollViewer.VerticalScrollBarVisibility="Hidden">
58+
<markdig:MarkdownViewer.Resources>
59+
<!-- Don't highlight selected text-->
60+
<Style TargetType="{x:Type FlowDocumentScrollViewer}">
61+
<Setter Property="SelectionOpacity" Value="0" />
62+
</Style>
63+
</markdig:MarkdownViewer.Resources>
64+
</markdig:MarkdownViewer>
5865
</DockPanel>
5966
</Border>
6067
</ControlTemplate>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio.UI;component/SharedDictionary.xaml" />
1414
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/SharedDictionary.xaml" />
1515
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI.Reactive;component/SharedDictionary.xaml" />
16-
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/Assets/Markdown.xaml" />
16+
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio.UI;component/Styles/Markdown.xaml" />
1717
<StaticResource ResourceKey="ThemedDialogDefaultStylesKey"/>
1818
</ResourceDictionary.MergedDictionaries>
1919
</ResourceDictionary>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/SharedDictionary.xaml" />
2424
<cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI.Reactive;component/SharedDictionary.xaml" />
2525
<cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio.UI;component/SharedDictionary.xaml" />
26-
<cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/Assets/Markdown.xaml" />
26+
<cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio.UI;component/Styles/Markdown.xaml" />
2727
</ResourceDictionary.MergedDictionaries>
2828

2929
<Style TargetType="Button" BasedOn="{StaticResource GitHubVsButton}"/>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio.UI;component/SharedDictionary.xaml" />
2222
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/SharedDictionary.xaml" />
2323
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI.Reactive;component/SharedDictionary.xaml" />
24-
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/Assets/Markdown.xaml" />
24+
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio.UI;component/Styles/Markdown.xaml" />
2525
<StaticResource ResourceKey="ThemedDialogDefaultStylesKey"/>
2626
</ResourceDictionary.MergedDictionaries>
2727

src/GitHub.VisualStudio.UI/Views/GitHubPane/PullRequestAnnotationsView.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio.UI;component/SharedDictionary.xaml" />
2424
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/SharedDictionary.xaml" />
2525
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI.Reactive;component/SharedDictionary.xaml" />
26-
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/Assets/Markdown.xaml" />
26+
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio.UI;component/Styles/Markdown.xaml" />
2727
</ResourceDictionary.MergedDictionaries>
2828
</ResourceDictionary>
2929
</Control.Resources>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio.UI;component/SharedDictionary.xaml" />
4040
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/SharedDictionary.xaml" />
4141
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI.Reactive;component/SharedDictionary.xaml" />
42-
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/Assets/Markdown.xaml" />
42+
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio.UI;component/Styles/Markdown.xaml" />
4343
</ResourceDictionary.MergedDictionaries>
4444

4545
<Style x:Key="Separator" TargetType="Rectangle">

src/GitHub.VisualStudio.UI/Views/GitHubPane/PullRequestFileCommentsView.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio.UI;component/SharedDictionary.xaml" />
2424
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/SharedDictionary.xaml" />
2525
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI.Reactive;component/SharedDictionary.xaml" />
26-
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/Assets/Markdown.xaml" />
26+
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio.UI;component/Styles/Markdown.xaml" />
2727
</ResourceDictionary.MergedDictionaries>
2828
<CollectionViewSource x:Key="FileComments" Source="{Binding}">
2929
<CollectionViewSource.GroupDescriptions>

src/GitHub.VisualStudio.UI/Views/GitHubPane/PullRequestFilesView.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio.UI;component/SharedDictionary.xaml" />
2222
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/SharedDictionary.xaml" />
2323
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI.Reactive;component/SharedDictionary.xaml" />
24-
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/Assets/Markdown.xaml" />
24+
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio.UI;component/Styles/Markdown.xaml" />
2525
<StaticResource ResourceKey="ThemedDialogDefaultStylesKey"/>
2626
</ResourceDictionary.MergedDictionaries>
2727

0 commit comments

Comments
 (0)