From 858ad49cd7f4367673ae09124ded15eb9e8adb91 Mon Sep 17 00:00:00 2001 From: Don Okuda Date: Fri, 14 Jul 2017 10:17:03 -0700 Subject: [PATCH 01/53] Start updating the comment glyph --- .../Tags/AddInlineCommentGlyph.xaml | 7 +++-- .../Tags/ShowInlineCommentGlyph.xaml | 28 +++++++++++++++++-- .../Views/GlyphMarginGrid.xaml | 7 +++-- 3 files changed, 36 insertions(+), 6 deletions(-) diff --git a/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml b/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml index 5eb0f88847..3d1a18a0be 100644 --- a/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml +++ b/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml @@ -5,7 +5,10 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d"> - + + + + + diff --git a/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml b/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml index 728cb8d2d7..7b26e1df86 100644 --- a/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml +++ b/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml @@ -4,8 +4,32 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d"> + - + + + + diff --git a/src/GitHub.InlineReviews/Views/GlyphMarginGrid.xaml b/src/GitHub.InlineReviews/Views/GlyphMarginGrid.xaml index a8019ef119..53f44c2602 100644 --- a/src/GitHub.InlineReviews/Views/GlyphMarginGrid.xaml +++ b/src/GitHub.InlineReviews/Views/GlyphMarginGrid.xaml @@ -8,7 +8,8 @@ d:DesignHeight="100" Width="17"> - + White + - + + From a4ddc600766116906af9227f62c5297f5361e79a Mon Sep 17 00:00:00 2001 From: Don Okuda Date: Fri, 14 Jul 2017 13:51:12 -0700 Subject: [PATCH 02/53] Good enough to be centered --- .../Tags/AddInlineCommentGlyph.xaml | 6 ++-- .../Tags/ShowInlineCommentGlyph.xaml | 30 ++++--------------- 2 files changed, 8 insertions(+), 28 deletions(-) diff --git a/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml b/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml index 3d1a18a0be..8b22c93685 100644 --- a/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml +++ b/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml @@ -6,9 +6,9 @@ mc:Ignorable="d"> - - - + + + diff --git a/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml b/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml index 7b26e1df86..a1a507645c 100644 --- a/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml +++ b/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml @@ -4,32 +4,12 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d"> - - + - - + + From 1484429f09c3be2dafa63c30f55014c72af08722 Mon Sep 17 00:00:00 2001 From: Don Okuda Date: Fri, 14 Jul 2017 14:01:25 -0700 Subject: [PATCH 03/53] Set dimensions on canvas and something about line endings --- src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml b/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml index a1a507645c..5cdd34f677 100644 --- a/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml +++ b/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml @@ -5,10 +5,10 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d"> - - + - From 84e16622fad45ad929c78c64a353e4cb74573977 Mon Sep 17 00:00:00 2001 From: Don Okuda Date: Mon, 17 Jul 2017 21:57:31 -0700 Subject: [PATCH 04/53] Update CommentView styles --- src/GitHub.InlineReviews/Views/CommentView.xaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/GitHub.InlineReviews/Views/CommentView.xaml b/src/GitHub.InlineReviews/Views/CommentView.xaml index 811f7e26bf..d0f48c8beb 100644 --- a/src/GitHub.InlineReviews/Views/CommentView.xaml +++ b/src/GitHub.InlineReviews/Views/CommentView.xaml @@ -74,15 +74,16 @@ Account="{Binding User}"/> - + - - + + - + From 6353aa419aad9990cf3f86ac21aec2486eb13cf1 Mon Sep 17 00:00:00 2001 From: Don Okuda Date: Mon, 17 Jul 2017 23:09:18 -0700 Subject: [PATCH 05/53] Theme peek window toolbar --- .../Views/InlineCommentPeekView.xaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml b/src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml index a8de063a29..bb8b738f5d 100644 --- a/src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml +++ b/src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml @@ -19,11 +19,16 @@ @@ -51,8 +56,8 @@ + Background="{DynamicResource GitHubVsBrandedUIBackground}" + BorderBrush="{DynamicResource GitHubVsBrandedUIBorder}"> - + + Background="{DynamicResource GitHubVsToolWindowBackground}"> From 25b33432926a94e70d92dae3a029a6b5f29baa3b Mon Sep 17 00:00:00 2001 From: Don Okuda Date: Tue, 18 Jul 2017 10:54:38 -0700 Subject: [PATCH 07/53] Theme the comment reply textbox --- src/GitHub.InlineReviews/Views/CommentView.xaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/GitHub.InlineReviews/Views/CommentView.xaml b/src/GitHub.InlineReviews/Views/CommentView.xaml index d0f48c8beb..aa0d9d016e 100644 --- a/src/GitHub.InlineReviews/Views/CommentView.xaml +++ b/src/GitHub.InlineReviews/Views/CommentView.xaml @@ -137,6 +137,8 @@ GotFocus="ReplyPlaceholder_GotFocus"> + From ca08c3f6104348382c8f39a88da0a8f9061db3c4 Mon Sep 17 00:00:00 2001 From: Don Okuda Date: Tue, 18 Jul 2017 11:56:26 -0700 Subject: [PATCH 08/53] Theme the reply box border --- src/GitHub.InlineReviews/Views/CommentView.xaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/GitHub.InlineReviews/Views/CommentView.xaml b/src/GitHub.InlineReviews/Views/CommentView.xaml index aa0d9d016e..986754b1f4 100644 --- a/src/GitHub.InlineReviews/Views/CommentView.xaml +++ b/src/GitHub.InlineReviews/Views/CommentView.xaml @@ -141,6 +141,8 @@ + + From 7ec6d8df7c2c1e50b55acc5f2fe1e1c821442a29 Mon Sep 17 00:00:00 2001 From: Don Okuda Date: Tue, 18 Jul 2017 13:52:42 -0700 Subject: [PATCH 09/53] Adjust margins for button area in comment section --- src/GitHub.InlineReviews/Views/CommentView.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GitHub.InlineReviews/Views/CommentView.xaml b/src/GitHub.InlineReviews/Views/CommentView.xaml index 986754b1f4..62a953adc6 100644 --- a/src/GitHub.InlineReviews/Views/CommentView.xaml +++ b/src/GitHub.InlineReviews/Views/CommentView.xaml @@ -178,7 +178,7 @@ From a81fff4d0a706227eafdf55e50138697a08cafc5 Mon Sep 17 00:00:00 2001 From: Don Okuda Date: Wed, 19 Jul 2017 09:53:15 -0700 Subject: [PATCH 10/53] Oh just fixing what I broke nothing to see here --- src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml b/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml index 5cdd34f677..4de425a43a 100644 --- a/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml +++ b/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml @@ -3,7 +3,13 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - mc:Ignorable="d"> + mc:Ignorable="d" + ToolTipService.ShowDuration="600000" ToolTipService.HasDropShadow="True"> + + + + + Date: Wed, 19 Jul 2017 11:38:51 -0700 Subject: [PATCH 11/53] Update colors for Comment glyphs --- .../Tags/AddInlineCommentGlyph.xaml | 15 ++++++----- .../Tags/ShowInlineCommentGlyph.xaml | 26 ++++++++++++++++--- 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml b/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml index 9460ab42a2..2ab2392e58 100644 --- a/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml +++ b/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml @@ -6,15 +6,16 @@ mc:Ignorable="d"> - - - + + + + - + @@ -22,15 +23,15 @@ diff --git a/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml b/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml index 83391eb7f4..9cdbd85b4a 100644 --- a/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml +++ b/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml @@ -7,8 +7,10 @@ ToolTipService.ShowDuration="600000" ToolTipService.HasDropShadow="True"> - - + + + + @@ -18,10 +20,28 @@ - + + + + From 290f804bca2fb2cadd8d42bca892c423be315f65 Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Thu, 20 Jul 2017 11:51:44 +0100 Subject: [PATCH 12/53] Basic theming for TooltipCommentThreadView --- .../Tags/ShowInlineCommentGlyph.xaml | 4 ++-- .../Views/TooltipCommentThreadView.xaml | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml b/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml index 5300f6d6ff..a06fd5a964 100644 --- a/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml +++ b/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml @@ -4,9 +4,9 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" - ToolTipService.ShowDuration="600000" ToolTipService.HasDropShadow="True"> + ToolTipService.ShowDuration="600000"> - + + + + + + + + + + + From c2aee39b0722dfbbed73db08dcf727c95ee98652 Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Thu, 20 Jul 2017 12:50:53 +0100 Subject: [PATCH 13/53] Avoid squiggles by adding DesignTimeResources.xaml This file can contain design time values for any resources that are defined at run time. --- src/GitHub.InlineReviews/GitHub.InlineReviews.csproj | 5 +++++ .../Properties/DesignTimeResources.xaml | 9 +++++++++ 2 files changed, 14 insertions(+) create mode 100644 src/GitHub.InlineReviews/Properties/DesignTimeResources.xaml diff --git a/src/GitHub.InlineReviews/GitHub.InlineReviews.csproj b/src/GitHub.InlineReviews/GitHub.InlineReviews.csproj index 24986dc265..4f472d2fb8 100644 --- a/src/GitHub.InlineReviews/GitHub.InlineReviews.csproj +++ b/src/GitHub.InlineReviews/GitHub.InlineReviews.csproj @@ -399,6 +399,11 @@ + + MSBuild:Compile + Designer + true + MSBuild:Compile Designer diff --git a/src/GitHub.InlineReviews/Properties/DesignTimeResources.xaml b/src/GitHub.InlineReviews/Properties/DesignTimeResources.xaml new file mode 100644 index 0000000000..4e3e377a53 --- /dev/null +++ b/src/GitHub.InlineReviews/Properties/DesignTimeResources.xaml @@ -0,0 +1,9 @@ + + + + + + + From 209a44d7d26360d3ae0b45d349de445b66a71cb5 Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Thu, 20 Jul 2017 13:05:54 +0100 Subject: [PATCH 14/53] Theme glyph background color using DiffChangeType It no longer sets the background color explicitly in the glyph factory. --- .../Tags/AddInlineCommentGlyph.xaml | 44 +++++++++---------- .../Tags/InlineCommentGlyphFactory.cs | 4 +- .../Tags/ShowInlineCommentGlyph.xaml | 32 ++++++++++---- 3 files changed, 46 insertions(+), 34 deletions(-) diff --git a/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml b/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml index 7590d253e3..aaf072d99d 100644 --- a/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml +++ b/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml @@ -4,33 +4,29 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d"> - - - - - - - - - - + - - - - - - + + + diff --git a/src/GitHub.InlineReviews/Tags/InlineCommentGlyphFactory.cs b/src/GitHub.InlineReviews/Tags/InlineCommentGlyphFactory.cs index f71fdbe441..26154ad312 100644 --- a/src/GitHub.InlineReviews/Tags/InlineCommentGlyphFactory.cs +++ b/src/GitHub.InlineReviews/Tags/InlineCommentGlyphFactory.cs @@ -76,7 +76,9 @@ public UIElement GenerateGlyph(IWpfTextViewLine line, InlineCommentTag tag) if (OpenThreadView(tag)) e.Handled = true; }; - glyph.Resources["DiffChangeBackground"] = brushesManager.GetBackground(tag.DiffChangeType); + glyph.Resources["DiffChangeBackground.Add"] = brushesManager.GetBackground(DiffChangeType.Add); + glyph.Resources["DiffChangeBackground.Delete"] = brushesManager.GetBackground(DiffChangeType.Delete); + glyph.Resources["DiffChangeBackground.None"] = brushesManager.GetBackground(DiffChangeType.None); return glyph; } diff --git a/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml b/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml index a4bc1c6276..08ad615cb8 100644 --- a/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml +++ b/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml @@ -6,19 +6,33 @@ mc:Ignorable="d" ToolTipService.ShowDuration="600000"> - - - - + + + + + + Data="M13 2H1c-0.55 0-1 0.45-1 1v8c0 0.55 0.45 1 1 1h2v3.5l3.5-3.5h6.5c0.55 0 1-0.45 1-1V3c0-0.55-0.45-1-1-1z m0 9H6L4 13V11H1V3h12v8z"/> + + + + + From e61e38e3bea0d4f88aed6992382c18667596c3c4 Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Thu, 20 Jul 2017 14:13:12 +0100 Subject: [PATCH 15/53] Pass background colors to glyphs via a ResourceDictionary This will be refreshed when the theme changes. --- .../GitHub.InlineReviews.csproj | 1 + .../Tags/BrushesManager.cs | 49 +++++++++++++++++++ .../Tags/InlineCommentGlyphFactory.cs | 42 +--------------- 3 files changed, 52 insertions(+), 40 deletions(-) create mode 100644 src/GitHub.InlineReviews/Tags/BrushesManager.cs diff --git a/src/GitHub.InlineReviews/GitHub.InlineReviews.csproj b/src/GitHub.InlineReviews/GitHub.InlineReviews.csproj index 4f472d2fb8..141e285e7e 100644 --- a/src/GitHub.InlineReviews/GitHub.InlineReviews.csproj +++ b/src/GitHub.InlineReviews/GitHub.InlineReviews.csproj @@ -82,6 +82,7 @@ + diff --git a/src/GitHub.InlineReviews/Tags/BrushesManager.cs b/src/GitHub.InlineReviews/Tags/BrushesManager.cs new file mode 100644 index 0000000000..bba1d8e8bf --- /dev/null +++ b/src/GitHub.InlineReviews/Tags/BrushesManager.cs @@ -0,0 +1,49 @@ +using System; +using System.Windows; +using System.Windows.Media; +using Microsoft.VisualStudio.Text.Classification; + +namespace GitHub.InlineReviews.Tags +{ + class BrushesManager + { + const string AddPropertiesKey = "deltadiff.add.word"; + const string DeletePropertiesKey = "deltadiff.remove.word"; + const string NonePropertiesKey = "Indicator Margin"; + + readonly ResourceDictionary addProperties; + readonly ResourceDictionary deleteProperties; + readonly ResourceDictionary noneProperties; + + internal BrushesManager(IEditorFormatMap editorFormatMap) + { + addProperties = editorFormatMap.GetProperties(AddPropertiesKey); + deleteProperties = editorFormatMap.GetProperties(DeletePropertiesKey); + noneProperties = editorFormatMap.GetProperties(NonePropertiesKey); + + Resources = new ResourceDictionary(); + UpdateResources(); + + editorFormatMap.FormatMappingChanged += OnFormatMappingChanged; + } + + void OnFormatMappingChanged(object sender, FormatItemsEventArgs e) + { + UpdateResources(); + } + + void UpdateResources() + { + Resources["DiffChangeBackground.Add"] = GetBackground(addProperties); + Resources["DiffChangeBackground.Delete"] = GetBackground(deleteProperties); + Resources["DiffChangeBackground.None"] = GetBackground(noneProperties); + } + + static Brush GetBackground(ResourceDictionary dictionary) + { + return dictionary["Background"] as Brush; + } + + internal ResourceDictionary Resources { get; } + } +} diff --git a/src/GitHub.InlineReviews/Tags/InlineCommentGlyphFactory.cs b/src/GitHub.InlineReviews/Tags/InlineCommentGlyphFactory.cs index 26154ad312..04183658fa 100644 --- a/src/GitHub.InlineReviews/Tags/InlineCommentGlyphFactory.cs +++ b/src/GitHub.InlineReviews/Tags/InlineCommentGlyphFactory.cs @@ -29,43 +29,6 @@ public InlineCommentGlyphFactory( brushesManager = new BrushesManager(editorFormatMap); } - class BrushesManager - { - const string AddPropertiesKey = "deltadiff.add.word"; - const string DeletePropertiesKey = "deltadiff.remove.word"; - const string NonePropertiesKey = "Indicator Margin"; - - readonly ResourceDictionary addProperties; - readonly ResourceDictionary deleteProperties; - readonly ResourceDictionary noneProperties; - - internal BrushesManager(IEditorFormatMap editorFormatMap) - { - addProperties = editorFormatMap.GetProperties(AddPropertiesKey); - deleteProperties = editorFormatMap.GetProperties(DeletePropertiesKey); - noneProperties = editorFormatMap.GetProperties(NonePropertiesKey); - } - - internal Brush GetBackground(DiffChangeType diffChangeType) - { - switch (diffChangeType) - { - case DiffChangeType.Add: - return GetBackground(addProperties); - case DiffChangeType.Delete: - return GetBackground(deleteProperties); - case DiffChangeType.None: - default: - return GetBackground(noneProperties); - } - } - - static Brush GetBackground(ResourceDictionary dictionary) - { - return dictionary["Background"] as Brush; - } - } - public UIElement GenerateGlyph(IWpfTextViewLine line, InlineCommentTag tag) { var glyph = CreateGlyph(tag); @@ -76,9 +39,8 @@ public UIElement GenerateGlyph(IWpfTextViewLine line, InlineCommentTag tag) if (OpenThreadView(tag)) e.Handled = true; }; - glyph.Resources["DiffChangeBackground.Add"] = brushesManager.GetBackground(DiffChangeType.Add); - glyph.Resources["DiffChangeBackground.Delete"] = brushesManager.GetBackground(DiffChangeType.Delete); - glyph.Resources["DiffChangeBackground.None"] = brushesManager.GetBackground(DiffChangeType.None); + glyph.Resources.MergedDictionaries.Add(brushesManager.Resources); + return glyph; } From 3b70c76a08921bd9c7672219826864ab8124054c Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Thu, 20 Jul 2017 14:53:49 +0100 Subject: [PATCH 16/53] Make SharedDictionary.xaml resources available to glyphs The following application resources will be available: pack://application:,,,/GitHub.UI;component/SharedDictionary.xaml pack://application:,,,/GitHub.UI.Reactive;component/SharedDictionary.xaml pack://application:,,,/GitHub.VisualStudio.UI;component/SharedDictionary.xaml --- .../Tags/BrushesManager.cs | 27 +++++++++++++------ .../Tags/InlineCommentGlyphFactory.cs | 2 +- .../Tags/ShowInlineCommentGlyph.xaml | 5 +++- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/src/GitHub.InlineReviews/Tags/BrushesManager.cs b/src/GitHub.InlineReviews/Tags/BrushesManager.cs index bba1d8e8bf..579623ecc0 100644 --- a/src/GitHub.InlineReviews/Tags/BrushesManager.cs +++ b/src/GitHub.InlineReviews/Tags/BrushesManager.cs @@ -2,6 +2,7 @@ using System.Windows; using System.Windows.Media; using Microsoft.VisualStudio.Text.Classification; +using GitHub.UI.Helpers; namespace GitHub.InlineReviews.Tags { @@ -21,22 +22,32 @@ internal BrushesManager(IEditorFormatMap editorFormatMap) deleteProperties = editorFormatMap.GetProperties(DeletePropertiesKey); noneProperties = editorFormatMap.GetProperties(NonePropertiesKey); - Resources = new ResourceDictionary(); - UpdateResources(); + DynamicResources = new ResourceDictionary(); + MergeResources(DynamicResources, "pack://application:,,,/GitHub.VisualStudio.UI;component/SharedDictionary.xaml"); + MergeResources(DynamicResources, "pack://application:,,,/GitHub.UI;component/SharedDictionary.xaml"); + MergeResources(DynamicResources, "pack://application:,,,/GitHub.UI.Reactive;component/SharedDictionary.xaml"); + UpdateResources(DynamicResources); editorFormatMap.FormatMappingChanged += OnFormatMappingChanged; } void OnFormatMappingChanged(object sender, FormatItemsEventArgs e) { - UpdateResources(); + UpdateResources(DynamicResources); } - void UpdateResources() + void UpdateResources(ResourceDictionary resources) { - Resources["DiffChangeBackground.Add"] = GetBackground(addProperties); - Resources["DiffChangeBackground.Delete"] = GetBackground(deleteProperties); - Resources["DiffChangeBackground.None"] = GetBackground(noneProperties); + resources["DiffChangeBackground.Add"] = GetBackground(addProperties); + resources["DiffChangeBackground.Delete"] = GetBackground(deleteProperties); + resources["DiffChangeBackground.None"] = GetBackground(noneProperties); + } + + static void MergeResources(ResourceDictionary resources, string url) + { + var sharedResources = new SharedDictionaryManager(); + sharedResources.Source = new Uri(url); + resources.MergedDictionaries.Add(sharedResources); } static Brush GetBackground(ResourceDictionary dictionary) @@ -44,6 +55,6 @@ static Brush GetBackground(ResourceDictionary dictionary) return dictionary["Background"] as Brush; } - internal ResourceDictionary Resources { get; } + internal ResourceDictionary DynamicResources { get; } } } diff --git a/src/GitHub.InlineReviews/Tags/InlineCommentGlyphFactory.cs b/src/GitHub.InlineReviews/Tags/InlineCommentGlyphFactory.cs index 04183658fa..ed68a40a28 100644 --- a/src/GitHub.InlineReviews/Tags/InlineCommentGlyphFactory.cs +++ b/src/GitHub.InlineReviews/Tags/InlineCommentGlyphFactory.cs @@ -39,7 +39,7 @@ public UIElement GenerateGlyph(IWpfTextViewLine line, InlineCommentTag tag) if (OpenThreadView(tag)) e.Handled = true; }; - glyph.Resources.MergedDictionaries.Add(brushesManager.Resources); + glyph.Resources.MergedDictionaries.Add(brushesManager.DynamicResources); return glyph; } diff --git a/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml b/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml index 08ad615cb8..3dcc0ce98a 100644 --- a/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml +++ b/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml @@ -32,7 +32,10 @@ - + From 9544e214a8254ff8b3d0d49b02f94c337d020bb9 Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Thu, 20 Jul 2017 15:28:21 +0100 Subject: [PATCH 17/53] Add SharedDictionarys to DesignTimeResources.xaml --- .../Properties/DesignTimeResources.xaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/GitHub.InlineReviews/Properties/DesignTimeResources.xaml b/src/GitHub.InlineReviews/Properties/DesignTimeResources.xaml index 4e3e377a53..294ad5e1d7 100644 --- a/src/GitHub.InlineReviews/Properties/DesignTimeResources.xaml +++ b/src/GitHub.InlineReviews/Properties/DesignTimeResources.xaml @@ -1,4 +1,5 @@  @@ -6,4 +7,9 @@ + + + + + From 94f2d8d67dd3599730ac38d56e36d5f1e0f2965f Mon Sep 17 00:00:00 2001 From: Don Okuda Date: Thu, 20 Jul 2017 16:44:18 -0700 Subject: [PATCH 18/53] Something about background colors --- src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml | 2 +- src/GitHub.InlineReviews/Views/GlyphMarginGrid.xaml | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml b/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml index 2ab2392e58..3fb93799bc 100644 --- a/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml +++ b/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml @@ -6,7 +6,7 @@ mc:Ignorable="d"> - + diff --git a/src/GitHub.InlineReviews/Views/GlyphMarginGrid.xaml b/src/GitHub.InlineReviews/Views/GlyphMarginGrid.xaml index 53f44c2602..650ea702c5 100644 --- a/src/GitHub.InlineReviews/Views/GlyphMarginGrid.xaml +++ b/src/GitHub.InlineReviews/Views/GlyphMarginGrid.xaml @@ -5,11 +5,10 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:GitHub.InlineReviews.Views" mc:Ignorable="d" + Background="{DynamicResource VsBrush.Window}" d:DesignHeight="100" Width="17"> - + + --> - + From 38130b29e67bce6540b223f5d9262dbd1988b92b Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Fri, 21 Jul 2017 12:01:13 +0100 Subject: [PATCH 19/53] Do glyph DiffChangeType styling via Theme*.xaml Removed need for `BrushesManager`. --- .../GitHub.InlineReviews.csproj | 1 - .../InlineCommentMarginProvider.cs | 4 +- .../Properties/DesignTimeResources.xaml | 10 ---- .../Tags/AddInlineCommentGlyph.xaml | 18 +++++- .../Tags/BrushesManager.cs | 60 ------------------- .../Tags/InlineCommentGlyphFactory.cs | 8 +-- .../Tags/ShowInlineCommentGlyph.xaml | 18 +++++- .../Views/GlyphMarginGrid.xaml | 11 ++++ .../Styles/ThemeBlue.xaml | 8 +++ .../Styles/ThemeDark.xaml | 8 +++ .../Styles/ThemeLight.xaml | 8 +++ 11 files changed, 68 insertions(+), 86 deletions(-) delete mode 100644 src/GitHub.InlineReviews/Tags/BrushesManager.cs diff --git a/src/GitHub.InlineReviews/GitHub.InlineReviews.csproj b/src/GitHub.InlineReviews/GitHub.InlineReviews.csproj index 141e285e7e..4f472d2fb8 100644 --- a/src/GitHub.InlineReviews/GitHub.InlineReviews.csproj +++ b/src/GitHub.InlineReviews/GitHub.InlineReviews.csproj @@ -82,7 +82,6 @@ - diff --git a/src/GitHub.InlineReviews/InlineCommentMarginProvider.cs b/src/GitHub.InlineReviews/InlineCommentMarginProvider.cs index ac161bcf0b..44fed39323 100644 --- a/src/GitHub.InlineReviews/InlineCommentMarginProvider.cs +++ b/src/GitHub.InlineReviews/InlineCommentMarginProvider.cs @@ -47,10 +47,10 @@ public InlineCommentMarginProvider( public IWpfTextViewMargin CreateMargin(IWpfTextViewHost wpfTextViewHost, IWpfTextViewMargin parent) { var textView = wpfTextViewHost.TextView; - var editorFormatMap = editorFormatMapService.GetEditorFormatMap(textView); - var glyphFactory = new InlineCommentGlyphFactory(peekService, textView, editorFormatMap); + var glyphFactory = new InlineCommentGlyphFactory(peekService, textView); Func gridFactory = () => new GlyphMarginGrid(); + var editorFormatMap = editorFormatMapService.GetEditorFormatMap(textView); return CreateMargin(glyphFactory, gridFactory, wpfTextViewHost, parent, editorFormatMap); } diff --git a/src/GitHub.InlineReviews/Properties/DesignTimeResources.xaml b/src/GitHub.InlineReviews/Properties/DesignTimeResources.xaml index 294ad5e1d7..b865cdc8a0 100644 --- a/src/GitHub.InlineReviews/Properties/DesignTimeResources.xaml +++ b/src/GitHub.InlineReviews/Properties/DesignTimeResources.xaml @@ -1,15 +1,5 @@  - - - - - - - - - diff --git a/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml b/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml index aaf072d99d..5c5842042f 100644 --- a/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml +++ b/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml @@ -2,22 +2,34 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:cache="clr-namespace:GitHub.UI.Helpers;assembly=GitHub.UI" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d"> + + + + + + + + + + + diff --git a/src/GitHub.InlineReviews/Tags/BrushesManager.cs b/src/GitHub.InlineReviews/Tags/BrushesManager.cs deleted file mode 100644 index 579623ecc0..0000000000 --- a/src/GitHub.InlineReviews/Tags/BrushesManager.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Media; -using Microsoft.VisualStudio.Text.Classification; -using GitHub.UI.Helpers; - -namespace GitHub.InlineReviews.Tags -{ - class BrushesManager - { - const string AddPropertiesKey = "deltadiff.add.word"; - const string DeletePropertiesKey = "deltadiff.remove.word"; - const string NonePropertiesKey = "Indicator Margin"; - - readonly ResourceDictionary addProperties; - readonly ResourceDictionary deleteProperties; - readonly ResourceDictionary noneProperties; - - internal BrushesManager(IEditorFormatMap editorFormatMap) - { - addProperties = editorFormatMap.GetProperties(AddPropertiesKey); - deleteProperties = editorFormatMap.GetProperties(DeletePropertiesKey); - noneProperties = editorFormatMap.GetProperties(NonePropertiesKey); - - DynamicResources = new ResourceDictionary(); - MergeResources(DynamicResources, "pack://application:,,,/GitHub.VisualStudio.UI;component/SharedDictionary.xaml"); - MergeResources(DynamicResources, "pack://application:,,,/GitHub.UI;component/SharedDictionary.xaml"); - MergeResources(DynamicResources, "pack://application:,,,/GitHub.UI.Reactive;component/SharedDictionary.xaml"); - UpdateResources(DynamicResources); - - editorFormatMap.FormatMappingChanged += OnFormatMappingChanged; - } - - void OnFormatMappingChanged(object sender, FormatItemsEventArgs e) - { - UpdateResources(DynamicResources); - } - - void UpdateResources(ResourceDictionary resources) - { - resources["DiffChangeBackground.Add"] = GetBackground(addProperties); - resources["DiffChangeBackground.Delete"] = GetBackground(deleteProperties); - resources["DiffChangeBackground.None"] = GetBackground(noneProperties); - } - - static void MergeResources(ResourceDictionary resources, string url) - { - var sharedResources = new SharedDictionaryManager(); - sharedResources.Source = new Uri(url); - resources.MergedDictionaries.Add(sharedResources); - } - - static Brush GetBackground(ResourceDictionary dictionary) - { - return dictionary["Background"] as Brush; - } - - internal ResourceDictionary DynamicResources { get; } - } -} diff --git a/src/GitHub.InlineReviews/Tags/InlineCommentGlyphFactory.cs b/src/GitHub.InlineReviews/Tags/InlineCommentGlyphFactory.cs index ed68a40a28..064abec29b 100644 --- a/src/GitHub.InlineReviews/Tags/InlineCommentGlyphFactory.cs +++ b/src/GitHub.InlineReviews/Tags/InlineCommentGlyphFactory.cs @@ -16,17 +16,13 @@ class InlineCommentGlyphFactory : IGlyphFactory { readonly IInlineCommentPeekService peekService; readonly ITextView textView; - readonly BrushesManager brushesManager; public InlineCommentGlyphFactory( IInlineCommentPeekService peekService, - ITextView textView, - IEditorFormatMap editorFormatMap) + ITextView textView) { this.peekService = peekService; this.textView = textView; - - brushesManager = new BrushesManager(editorFormatMap); } public UIElement GenerateGlyph(IWpfTextViewLine line, InlineCommentTag tag) @@ -39,8 +35,6 @@ public UIElement GenerateGlyph(IWpfTextViewLine line, InlineCommentTag tag) if (OpenThreadView(tag)) e.Handled = true; }; - glyph.Resources.MergedDictionaries.Add(brushesManager.DynamicResources); - return glyph; } diff --git a/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml b/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml index 3dcc0ce98a..58ce104815 100644 --- a/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml +++ b/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml @@ -3,22 +3,34 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:cache="clr-namespace:GitHub.UI.Helpers;assembly=GitHub.UI" mc:Ignorable="d" ToolTipService.ShowDuration="600000"> + + + + + + + + + + + diff --git a/src/GitHub.InlineReviews/Views/GlyphMarginGrid.xaml b/src/GitHub.InlineReviews/Views/GlyphMarginGrid.xaml index a8019ef119..0341976a3e 100644 --- a/src/GitHub.InlineReviews/Views/GlyphMarginGrid.xaml +++ b/src/GitHub.InlineReviews/Views/GlyphMarginGrid.xaml @@ -4,9 +4,20 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:GitHub.InlineReviews.Views" + xmlns:cache="clr-namespace:GitHub.UI.Helpers;assembly=GitHub.UI" mc:Ignorable="d" d:DesignHeight="100" Width="17"> + + + + + + + + + + diff --git a/src/GitHub.VisualStudio.UI/Styles/ThemeBlue.xaml b/src/GitHub.VisualStudio.UI/Styles/ThemeBlue.xaml index ef6c1d5c1c..ceddbdee41 100644 --- a/src/GitHub.VisualStudio.UI/Styles/ThemeBlue.xaml +++ b/src/GitHub.VisualStudio.UI/Styles/ThemeBlue.xaml @@ -55,4 +55,12 @@ + + + + + + + + \ No newline at end of file diff --git a/src/GitHub.VisualStudio.UI/Styles/ThemeDark.xaml b/src/GitHub.VisualStudio.UI/Styles/ThemeDark.xaml index db8db5a8fa..e62c3a9824 100644 --- a/src/GitHub.VisualStudio.UI/Styles/ThemeDark.xaml +++ b/src/GitHub.VisualStudio.UI/Styles/ThemeDark.xaml @@ -55,4 +55,12 @@ + + + + + + + + \ No newline at end of file diff --git a/src/GitHub.VisualStudio.UI/Styles/ThemeLight.xaml b/src/GitHub.VisualStudio.UI/Styles/ThemeLight.xaml index 586ebe6629..255dda9f43 100644 --- a/src/GitHub.VisualStudio.UI/Styles/ThemeLight.xaml +++ b/src/GitHub.VisualStudio.UI/Styles/ThemeLight.xaml @@ -55,4 +55,12 @@ + + + + + + + + \ No newline at end of file From 3ef16c22ae9db2ea03f0884db96bbf2955c08f55 Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Fri, 21 Jul 2017 12:02:19 +0100 Subject: [PATCH 20/53] Use GitHubVsBrandedUIBorder resource for separator color --- src/GitHub.InlineReviews/Views/TooltipCommentThreadView.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GitHub.InlineReviews/Views/TooltipCommentThreadView.xaml b/src/GitHub.InlineReviews/Views/TooltipCommentThreadView.xaml index 0ce223c632..49c94bc117 100644 --- a/src/GitHub.InlineReviews/Views/TooltipCommentThreadView.xaml +++ b/src/GitHub.InlineReviews/Views/TooltipCommentThreadView.xaml @@ -40,7 +40,7 @@ - + From 4941dbd909cbe7d181cf82c557b6c436779749cc Mon Sep 17 00:00:00 2001 From: Don Okuda Date: Fri, 21 Jul 2017 09:16:38 -0700 Subject: [PATCH 21/53] Prefer WindowText for timestamp color (and set opacity instead) --- src/GitHub.InlineReviews/Views/CommentView.xaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/GitHub.InlineReviews/Views/CommentView.xaml b/src/GitHub.InlineReviews/Views/CommentView.xaml index 8456a0aaf2..679a4aec70 100644 --- a/src/GitHub.InlineReviews/Views/CommentView.xaml +++ b/src/GitHub.InlineReviews/Views/CommentView.xaml @@ -80,7 +80,8 @@ From 17c0443a0d3379c987e7b1e07d4b80096d1cc254 Mon Sep 17 00:00:00 2001 From: Don Okuda Date: Fri, 21 Jul 2017 10:22:19 -0700 Subject: [PATCH 22/53] Bring back the fill colors --- src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml | 8 ++++---- src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml | 6 +++--- src/GitHub.VisualStudio.UI/Styles/ThemeBlue.xaml | 5 ++++- src/GitHub.VisualStudio.UI/Styles/ThemeDark.xaml | 3 +++ src/GitHub.VisualStudio.UI/Styles/ThemeLight.xaml | 3 +++ 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml b/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml index f1a26e79de..9b2c0a1660 100644 --- a/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml +++ b/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml @@ -35,7 +35,7 @@ - + @@ -46,15 +46,15 @@ diff --git a/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml b/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml index 28cafe7aca..dbd39b342e 100644 --- a/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml +++ b/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml @@ -48,15 +48,15 @@ diff --git a/src/GitHub.VisualStudio.UI/Styles/ThemeBlue.xaml b/src/GitHub.VisualStudio.UI/Styles/ThemeBlue.xaml index ceddbdee41..ceebe55b5f 100644 --- a/src/GitHub.VisualStudio.UI/Styles/ThemeBlue.xaml +++ b/src/GitHub.VisualStudio.UI/Styles/ThemeBlue.xaml @@ -62,5 +62,8 @@ - + + + + \ No newline at end of file diff --git a/src/GitHub.VisualStudio.UI/Styles/ThemeDark.xaml b/src/GitHub.VisualStudio.UI/Styles/ThemeDark.xaml index e62c3a9824..0984e61145 100644 --- a/src/GitHub.VisualStudio.UI/Styles/ThemeDark.xaml +++ b/src/GitHub.VisualStudio.UI/Styles/ThemeDark.xaml @@ -63,4 +63,7 @@ + + + \ No newline at end of file diff --git a/src/GitHub.VisualStudio.UI/Styles/ThemeLight.xaml b/src/GitHub.VisualStudio.UI/Styles/ThemeLight.xaml index 255dda9f43..f1649087ab 100644 --- a/src/GitHub.VisualStudio.UI/Styles/ThemeLight.xaml +++ b/src/GitHub.VisualStudio.UI/Styles/ThemeLight.xaml @@ -63,4 +63,7 @@ + + + \ No newline at end of file From 6e1750f3334ea5bafa897ec9fe5b5f5d1bf38d1f Mon Sep 17 00:00:00 2001 From: Don Okuda Date: Fri, 21 Jul 2017 14:10:18 -0700 Subject: [PATCH 23/53] Try out some new gutter colors --- src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml | 1 + src/GitHub.InlineReviews/Views/GlyphMarginGrid.xaml | 2 +- src/GitHub.VisualStudio.UI/Styles/ThemeBlue.xaml | 4 +++- src/GitHub.VisualStudio.UI/Styles/ThemeDark.xaml | 2 ++ src/GitHub.VisualStudio.UI/Styles/ThemeLight.xaml | 4 +++- 5 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml b/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml index 9b2c0a1660..234d72d4ce 100644 --- a/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml +++ b/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml @@ -36,6 +36,7 @@ + diff --git a/src/GitHub.InlineReviews/Views/GlyphMarginGrid.xaml b/src/GitHub.InlineReviews/Views/GlyphMarginGrid.xaml index 476b18a912..e7e7acefc1 100644 --- a/src/GitHub.InlineReviews/Views/GlyphMarginGrid.xaml +++ b/src/GitHub.InlineReviews/Views/GlyphMarginGrid.xaml @@ -6,7 +6,7 @@ xmlns:local="clr-namespace:GitHub.InlineReviews.Views" xmlns:cache="clr-namespace:GitHub.UI.Helpers;assembly=GitHub.UI" mc:Ignorable="d" - Background="{DynamicResource VsBrush.Window}" + Background="{DynamicResource VsBrush.Window}" d:DesignHeight="100" Width="17"> diff --git a/src/GitHub.VisualStudio.UI/Styles/ThemeBlue.xaml b/src/GitHub.VisualStudio.UI/Styles/ThemeBlue.xaml index ceebe55b5f..52865c6ef4 100644 --- a/src/GitHub.VisualStudio.UI/Styles/ThemeBlue.xaml +++ b/src/GitHub.VisualStudio.UI/Styles/ThemeBlue.xaml @@ -61,7 +61,9 @@ - + + + diff --git a/src/GitHub.VisualStudio.UI/Styles/ThemeDark.xaml b/src/GitHub.VisualStudio.UI/Styles/ThemeDark.xaml index 0984e61145..ba35468cdd 100644 --- a/src/GitHub.VisualStudio.UI/Styles/ThemeDark.xaml +++ b/src/GitHub.VisualStudio.UI/Styles/ThemeDark.xaml @@ -62,6 +62,8 @@ + + diff --git a/src/GitHub.VisualStudio.UI/Styles/ThemeLight.xaml b/src/GitHub.VisualStudio.UI/Styles/ThemeLight.xaml index f1649087ab..164f08b1e7 100644 --- a/src/GitHub.VisualStudio.UI/Styles/ThemeLight.xaml +++ b/src/GitHub.VisualStudio.UI/Styles/ThemeLight.xaml @@ -61,7 +61,9 @@ - + + + From 8aee33daecb6cf9930b905b6462f94abea9386e6 Mon Sep 17 00:00:00 2001 From: Don Okuda Date: Fri, 21 Jul 2017 14:48:41 -0700 Subject: [PATCH 24/53] Use a bluer color in light theme for none changed diff type --- src/GitHub.VisualStudio.UI/Styles/ThemeLight.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GitHub.VisualStudio.UI/Styles/ThemeLight.xaml b/src/GitHub.VisualStudio.UI/Styles/ThemeLight.xaml index 164f08b1e7..04c0777c10 100644 --- a/src/GitHub.VisualStudio.UI/Styles/ThemeLight.xaml +++ b/src/GitHub.VisualStudio.UI/Styles/ThemeLight.xaml @@ -61,7 +61,7 @@ - + From 5ed1e9969fd1d449c10a061ae5bfe30c599ad656 Mon Sep 17 00:00:00 2001 From: Don Okuda Date: Fri, 21 Jul 2017 15:19:02 -0700 Subject: [PATCH 25/53] Actually, something more purple --- src/GitHub.VisualStudio.UI/Styles/ThemeLight.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GitHub.VisualStudio.UI/Styles/ThemeLight.xaml b/src/GitHub.VisualStudio.UI/Styles/ThemeLight.xaml index 04c0777c10..1db41122d7 100644 --- a/src/GitHub.VisualStudio.UI/Styles/ThemeLight.xaml +++ b/src/GitHub.VisualStudio.UI/Styles/ThemeLight.xaml @@ -61,7 +61,7 @@ - + From 1bb641cc5d7d1a3978b4c25b816b31f75eb157e5 Mon Sep 17 00:00:00 2001 From: Don Okuda Date: Fri, 21 Jul 2017 16:38:15 -0700 Subject: [PATCH 26/53] Remove commented xaml --- .../Views/GlyphMarginGrid.xaml | 61 ------------------- 1 file changed, 61 deletions(-) diff --git a/src/GitHub.InlineReviews/Views/GlyphMarginGrid.xaml b/src/GitHub.InlineReviews/Views/GlyphMarginGrid.xaml index e7e7acefc1..a371b04285 100644 --- a/src/GitHub.InlineReviews/Views/GlyphMarginGrid.xaml +++ b/src/GitHub.InlineReviews/Views/GlyphMarginGrid.xaml @@ -18,66 +18,5 @@ - - - - - From aeedb1e1afe8aa1c9f02ca0970792f018f34cc0c Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Mon, 24 Jul 2017 12:04:32 +0100 Subject: [PATCH 27/53] Rationalize the use of SharedDictionaryManager Avoid defining for each glyph (just so resources show in designer). --- .../Properties/DesignTimeResources.xaml | 4 ++++ .../Tags/AddInlineCommentGlyph.xaml | 12 +----------- .../Tags/ShowInlineCommentGlyph.xaml | 12 +----------- src/GitHub.InlineReviews/Views/GlyphMarginGrid.xaml | 2 -- 4 files changed, 6 insertions(+), 24 deletions(-) diff --git a/src/GitHub.InlineReviews/Properties/DesignTimeResources.xaml b/src/GitHub.InlineReviews/Properties/DesignTimeResources.xaml index b865cdc8a0..9eb52007ce 100644 --- a/src/GitHub.InlineReviews/Properties/DesignTimeResources.xaml +++ b/src/GitHub.InlineReviews/Properties/DesignTimeResources.xaml @@ -2,4 +2,8 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> + + + + diff --git a/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml b/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml index 234d72d4ce..bed98fbc9b 100644 --- a/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml +++ b/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml @@ -6,17 +6,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d"> - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + - + + + From d9774c6bec25048218c60f3cb8b83bbb61a8530c Mon Sep 17 00:00:00 2001 From: Don Okuda Date: Wed, 2 Aug 2017 20:32:15 -0700 Subject: [PATCH 36/53] Remove avatar in reply section --- src/GitHub.InlineReviews/Views/CommentView.xaml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/GitHub.InlineReviews/Views/CommentView.xaml b/src/GitHub.InlineReviews/Views/CommentView.xaml index 84cef32f38..4c047da119 100644 --- a/src/GitHub.InlineReviews/Views/CommentView.xaml +++ b/src/GitHub.InlineReviews/Views/CommentView.xaml @@ -104,13 +104,6 @@ - - Date: Wed, 2 Aug 2017 22:06:38 -0700 Subject: [PATCH 37/53] Use VS color for the peekview command bar --- src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml b/src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml index a1c8c6cd79..c1cd9efb8f 100644 --- a/src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml +++ b/src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml @@ -56,7 +56,7 @@ From 75b353190062e8f5d2a157bc2415f060794415e8 Mon Sep 17 00:00:00 2001 From: Don Okuda Date: Fri, 4 Aug 2017 10:02:00 -0700 Subject: [PATCH 38/53] Update icon fills --- .../Views/InlineCommentPeekView.xaml | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml b/src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml index c1cd9efb8f..79d3b83313 100644 --- a/src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml +++ b/src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml @@ -65,9 +65,13 @@ Previous Comment - + + + + + + + From 57c044c5211fdae68b2e961c27214745cc212702 Mon Sep 17 00:00:00 2001 From: Don Okuda Date: Fri, 4 Aug 2017 10:16:41 -0700 Subject: [PATCH 39/53] Fix icon alignments --- src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml b/src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml index 79d3b83313..abd62f6b3f 100644 --- a/src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml +++ b/src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml @@ -68,9 +68,9 @@ - - - + + + From 9c121bed0c7025389861cbe907d4708fb85d619b Mon Sep 17 00:00:00 2001 From: Don Okuda Date: Fri, 4 Aug 2017 10:42:09 -0700 Subject: [PATCH 40/53] Fix hover styles --- .../Views/InlineCommentPeekView.xaml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml b/src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml index abd62f6b3f..0800f0a3af 100644 --- a/src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml +++ b/src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml @@ -18,8 +18,16 @@ From b0af9ba0815baa8749435b844ffada4b313f1c76 Mon Sep 17 00:00:00 2001 From: Andreia Gaita Date: Fri, 4 Aug 2017 21:13:14 +0200 Subject: [PATCH 41/53] Fix merge --- src/GitHub.InlineReviews/GitHub.InlineReviews.csproj | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/GitHub.InlineReviews/GitHub.InlineReviews.csproj b/src/GitHub.InlineReviews/GitHub.InlineReviews.csproj index 354504ebda..c2bc2081d2 100644 --- a/src/GitHub.InlineReviews/GitHub.InlineReviews.csproj +++ b/src/GitHub.InlineReviews/GitHub.InlineReviews.csproj @@ -390,10 +390,6 @@ Designer true - - MSBuild:Compile - Designer - Designer MSBuild:Compile From f14b71673c5a70a606b5b6e5adaebd04c8b3bf53 Mon Sep 17 00:00:00 2001 From: Don Okuda Date: Fri, 4 Aug 2017 12:50:12 -0700 Subject: [PATCH 42/53] Use windowtext key for markdown viewer --- src/GitHub.InlineReviews/Views/CommentView.xaml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/GitHub.InlineReviews/Views/CommentView.xaml b/src/GitHub.InlineReviews/Views/CommentView.xaml index f50b7f08c4..6183052e3b 100644 --- a/src/GitHub.InlineReviews/Views/CommentView.xaml +++ b/src/GitHub.InlineReviews/Views/CommentView.xaml @@ -60,6 +60,7 @@ From 589d986fe7bea23ca2407130dcb6ca64954adabe Mon Sep 17 00:00:00 2001 From: Don Okuda Date: Fri, 4 Aug 2017 19:15:44 -0700 Subject: [PATCH 43/53] Add a separator between the comment field --- src/GitHub.InlineReviews/Views/CommentView.xaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/GitHub.InlineReviews/Views/CommentView.xaml b/src/GitHub.InlineReviews/Views/CommentView.xaml index 6183052e3b..ac257e548f 100644 --- a/src/GitHub.InlineReviews/Views/CommentView.xaml +++ b/src/GitHub.InlineReviews/Views/CommentView.xaml @@ -12,7 +12,7 @@ xmlns:views="clr-namespace:GitHub.InlineReviews.Views" mc:Ignorable="d" d:DesignWidth="300"> - + You can use a `CompositeDisposable` type here, it's designed to handle disposables in an optimal way (you can just call `Dispose()` on it and it will handle disposing everything it holds). @@ -86,13 +86,18 @@ + + + - @@ -143,7 +148,7 @@ Date: Mon, 7 Aug 2017 09:55:33 -0700 Subject: [PATCH 44/53] Add GitHubPeekViewBackground brush --- src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml | 2 +- src/GitHub.VisualStudio.UI/Styles/ThemeBlue.xaml | 2 ++ src/GitHub.VisualStudio.UI/Styles/ThemeDark.xaml | 2 ++ src/GitHub.VisualStudio.UI/Styles/ThemeLight.xaml | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml b/src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml index 524680eb31..c27c40447b 100644 --- a/src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml +++ b/src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml @@ -102,7 +102,7 @@ + Background="{DynamicResource GitHubPeekViewBackground}"> diff --git a/src/GitHub.VisualStudio.UI/Styles/ThemeBlue.xaml b/src/GitHub.VisualStudio.UI/Styles/ThemeBlue.xaml index 9e73609f83..29a6d14c95 100644 --- a/src/GitHub.VisualStudio.UI/Styles/ThemeBlue.xaml +++ b/src/GitHub.VisualStudio.UI/Styles/ThemeBlue.xaml @@ -63,4 +63,6 @@ + + \ No newline at end of file diff --git a/src/GitHub.VisualStudio.UI/Styles/ThemeDark.xaml b/src/GitHub.VisualStudio.UI/Styles/ThemeDark.xaml index 6a82dd1a82..254fb0124b 100644 --- a/src/GitHub.VisualStudio.UI/Styles/ThemeDark.xaml +++ b/src/GitHub.VisualStudio.UI/Styles/ThemeDark.xaml @@ -63,4 +63,6 @@ + + \ No newline at end of file diff --git a/src/GitHub.VisualStudio.UI/Styles/ThemeLight.xaml b/src/GitHub.VisualStudio.UI/Styles/ThemeLight.xaml index 700b363540..8392a003fd 100644 --- a/src/GitHub.VisualStudio.UI/Styles/ThemeLight.xaml +++ b/src/GitHub.VisualStudio.UI/Styles/ThemeLight.xaml @@ -63,4 +63,6 @@ + + \ No newline at end of file From 3a1e4e0191297a8132d7f30bef59c996f51e53e4 Mon Sep 17 00:00:00 2001 From: Don Okuda Date: Mon, 7 Aug 2017 10:04:51 -0700 Subject: [PATCH 45/53] Update PromptTextBox background color --- src/GitHub.InlineReviews/Views/CommentView.xaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GitHub.InlineReviews/Views/CommentView.xaml b/src/GitHub.InlineReviews/Views/CommentView.xaml index ac257e548f..24d4f69327 100644 --- a/src/GitHub.InlineReviews/Views/CommentView.xaml +++ b/src/GitHub.InlineReviews/Views/CommentView.xaml @@ -93,7 +93,7 @@ + Background="{DynamicResource GitHubButtonBorderBrush}"/> - + - + diff --git a/src/GitHub.VisualStudio.UI/Styles/VsBrush.xaml b/src/GitHub.VisualStudio.UI/Styles/VsBrush.xaml index d46a310e92..1e965a6910 100644 --- a/src/GitHub.VisualStudio.UI/Styles/VsBrush.xaml +++ b/src/GitHub.VisualStudio.UI/Styles/VsBrush.xaml @@ -15,6 +15,8 @@ + + From aebb7a731a9122b8cef996dc1934be4d99196960 Mon Sep 17 00:00:00 2001 From: Don Okuda Date: Mon, 7 Aug 2017 15:55:45 -0700 Subject: [PATCH 47/53] Update styles for codeblocks --- src/GitHub.UI/Assets/Markdown.xaml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/GitHub.UI/Assets/Markdown.xaml b/src/GitHub.UI/Assets/Markdown.xaml index b814419ed3..ae1d329900 100644 --- a/src/GitHub.UI/Assets/Markdown.xaml +++ b/src/GitHub.UI/Assets/Markdown.xaml @@ -12,22 +12,22 @@ @@ -41,4 +41,15 @@ + + From 744a91027616a1788d2183f1bfbc5195502064a5 Mon Sep 17 00:00:00 2001 From: Don Okuda Date: Tue, 8 Aug 2017 09:36:48 -0700 Subject: [PATCH 48/53] Remove unneeded triggers --- .../Tags/AddInlineCommentGlyph.xaml | 20 +------------------ .../Tags/ShowInlineCommentGlyph.xaml | 15 +------------- 2 files changed, 2 insertions(+), 33 deletions(-) diff --git a/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml b/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml index 13bfaee433..ac87f5fd97 100644 --- a/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml +++ b/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml @@ -29,27 +29,9 @@ - + - - - - diff --git a/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml b/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml index 0fea84d83a..a70c0cbdb9 100644 --- a/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml +++ b/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml @@ -32,22 +32,9 @@ Data="M1,0 C0.45,0 0,0.45 0,1 L0,9 C0,9.55 0.45,10 1,10 L3,10 L3,13.5 L6.5,10 L13,10 C13.55,10 14,9.55 14,9 L14,1 C14,0.45 13.55,0 13,0 L1,0 Z" /> - From bff81de362bdf1d4f81bbd352250eb015e6d801a Mon Sep 17 00:00:00 2001 From: Don Okuda Date: Tue, 8 Aug 2017 09:37:36 -0700 Subject: [PATCH 49/53] Remove unused colors --- src/GitHub.VisualStudio.UI/Styles/ThemeBlue.xaml | 2 -- src/GitHub.VisualStudio.UI/Styles/ThemeDark.xaml | 2 -- src/GitHub.VisualStudio.UI/Styles/ThemeLight.xaml | 2 -- 3 files changed, 6 deletions(-) diff --git a/src/GitHub.VisualStudio.UI/Styles/ThemeBlue.xaml b/src/GitHub.VisualStudio.UI/Styles/ThemeBlue.xaml index 29a6d14c95..281e058482 100644 --- a/src/GitHub.VisualStudio.UI/Styles/ThemeBlue.xaml +++ b/src/GitHub.VisualStudio.UI/Styles/ThemeBlue.xaml @@ -60,8 +60,6 @@ - - diff --git a/src/GitHub.VisualStudio.UI/Styles/ThemeDark.xaml b/src/GitHub.VisualStudio.UI/Styles/ThemeDark.xaml index 254fb0124b..52ec1f78da 100644 --- a/src/GitHub.VisualStudio.UI/Styles/ThemeDark.xaml +++ b/src/GitHub.VisualStudio.UI/Styles/ThemeDark.xaml @@ -60,8 +60,6 @@ - - diff --git a/src/GitHub.VisualStudio.UI/Styles/ThemeLight.xaml b/src/GitHub.VisualStudio.UI/Styles/ThemeLight.xaml index 8392a003fd..79610a3f9f 100644 --- a/src/GitHub.VisualStudio.UI/Styles/ThemeLight.xaml +++ b/src/GitHub.VisualStudio.UI/Styles/ThemeLight.xaml @@ -60,8 +60,6 @@ - - From fd862e87453fa879724cd15ccf8a2aa4a2745276 Mon Sep 17 00:00:00 2001 From: Don Okuda Date: Tue, 8 Aug 2017 09:58:14 -0700 Subject: [PATCH 50/53] Add a little more top margin for comments --- src/GitHub.InlineReviews/Views/CommentView.xaml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/GitHub.InlineReviews/Views/CommentView.xaml b/src/GitHub.InlineReviews/Views/CommentView.xaml index 24d4f69327..d206759251 100644 --- a/src/GitHub.InlineReviews/Views/CommentView.xaml +++ b/src/GitHub.InlineReviews/Views/CommentView.xaml @@ -60,6 +60,7 @@ From 2ba07ba9c14b07109c561b7ace76b7da66fceaab Mon Sep 17 00:00:00 2001 From: Don Okuda Date: Tue, 8 Aug 2017 09:58:30 -0700 Subject: [PATCH 51/53] Finesse some margin glyph stuff --- .../Tags/AddInlineCommentGlyph.xaml | 21 +--------------- .../Tags/ShowInlineCommentGlyph.xaml | 24 +++---------------- 2 files changed, 4 insertions(+), 41 deletions(-) diff --git a/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml b/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml index ac87f5fd97..bc2a7cff7b 100644 --- a/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml +++ b/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml @@ -6,28 +6,9 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d"> - - - - - - + diff --git a/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml b/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml index a70c0cbdb9..7006ab5ce8 100644 --- a/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml +++ b/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml @@ -6,27 +6,9 @@ xmlns:cache="clr-namespace:GitHub.UI.Helpers;assembly=GitHub.UI" mc:Ignorable="d"> - - - - - - - + + + From 025ee717f66c2213419b04fc764a58193803dee1 Mon Sep 17 00:00:00 2001 From: Don Okuda Date: Tue, 8 Aug 2017 10:05:57 -0700 Subject: [PATCH 52/53] Remove unneeded background declaration --- src/GitHub.InlineReviews/Views/GlyphMarginGrid.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GitHub.InlineReviews/Views/GlyphMarginGrid.xaml b/src/GitHub.InlineReviews/Views/GlyphMarginGrid.xaml index 5c8097f256..3a0f7e49d2 100644 --- a/src/GitHub.InlineReviews/Views/GlyphMarginGrid.xaml +++ b/src/GitHub.InlineReviews/Views/GlyphMarginGrid.xaml @@ -16,5 +16,5 @@ - + From abd2d0b0173b467bed0e7cbd5332834857df1e02 Mon Sep 17 00:00:00 2001 From: Don Okuda Date: Tue, 8 Aug 2017 10:12:16 -0700 Subject: [PATCH 53/53] Remove all the unneccesary borders in the margin --- src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml | 1 - src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml | 3 +-- src/GitHub.InlineReviews/Views/GlyphMarginGrid.xaml | 2 -- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml b/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml index bc2a7cff7b..f902890dbc 100644 --- a/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml +++ b/src/GitHub.InlineReviews/Tags/AddInlineCommentGlyph.xaml @@ -7,7 +7,6 @@ mc:Ignorable="d"> - diff --git a/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml b/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml index 7006ab5ce8..4f46df4051 100644 --- a/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml +++ b/src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml @@ -7,8 +7,7 @@ mc:Ignorable="d"> - - + diff --git a/src/GitHub.InlineReviews/Views/GlyphMarginGrid.xaml b/src/GitHub.InlineReviews/Views/GlyphMarginGrid.xaml index 3a0f7e49d2..bfefadf3a2 100644 --- a/src/GitHub.InlineReviews/Views/GlyphMarginGrid.xaml +++ b/src/GitHub.InlineReviews/Views/GlyphMarginGrid.xaml @@ -15,6 +15,4 @@ - -