Skip to content

Commit 032e676

Browse files
Merge pull request #1 from WaveHDMI/dev
Visibility Toggle for Hover.
2 parents 19e8a85 + 1369dac commit 032e676

File tree

4 files changed

+27
-13
lines changed

4 files changed

+27
-13
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ Quick Blame allows you to blame any line of code in your repo simply by clicking
99

1010
## License
1111

12-
[MIT](VSGitBlame/Resources/LICENSE)
12+
[MIT](VSGitBlame/Resources/LICENSE.txt)

VSGitBlame/CommitInfoViewFactory.cs

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ public static class CommitInfoViewFactory
2222

2323
static bool _firstMouseMoveFired = false;
2424
static bool _isDetailsVisible = false;
25+
static bool _isDetailsEnabled = false;
2526
static IAdornmentLayer _adornmentLayer;
26-
27+
2728
private static VSGitBlamePackage _package;
2829
private static CommitInfoViewOptions _options;
2930

@@ -61,17 +62,17 @@ private static void ApplySettings()
6162
if (_options.SummaryFontColor != Color.Transparent)
6263
{
6364
_summaryView.Foreground = new SolidColorBrush(System.Windows.Media.Color.FromArgb(
64-
_options.SummaryFontColor.A,
65-
_options.SummaryFontColor.R,
66-
_options.SummaryFontColor.G,
65+
_options.SummaryFontColor.A,
66+
_options.SummaryFontColor.R,
67+
_options.SummaryFontColor.G,
6768
_options.SummaryFontColor.B));
6869
}
6970
else
7071
{
7172
// Use theme detection if no specific color is set
7273
var backgroundColor = VSColorTheme.GetThemedColor(EnvironmentColors.ToolWindowBackgroundColorKey);
73-
_summaryView.Foreground = backgroundColor.GetBrightness() > 0.5 ?
74-
Brushes.DarkBlue :
74+
_summaryView.Foreground = backgroundColor.GetBrightness() > 0.5 ?
75+
Brushes.DarkBlue :
7576
Brushes.LightGray;
7677
}
7778
}
@@ -87,6 +88,7 @@ private static void ApplySettings()
8788
{
8889
// Apply background color setting
8990
_detailsViewContainer.Background = _options.GetDetailsBackgroundBrush();
91+
_isDetailsEnabled = _options.DetailsVisibility;
9092
}
9193
}
9294

@@ -156,8 +158,11 @@ static CommitInfoViewFactory()
156158
if (_isDetailsVisible)
157159
return;
158160

159-
_detailsViewContainer.Visibility = Visibility.Visible;
160-
_isDetailsVisible = true;
161+
if (_isDetailsEnabled)
162+
{
163+
_detailsViewContainer.Visibility = Visibility.Visible;
164+
_isDetailsVisible = true;
165+
}
161166
};
162167

163168
rootPanel.MouseLeave += (sender, e) =>

VSGitBlame/CommitInfoViewOptions.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
using Microsoft.VisualStudio.Shell;
2-
using System;
32
using System.ComponentModel;
4-
using System.Drawing;
53
using System.Windows;
64
using System.Windows.Media;
75
using Color = System.Drawing.Color;
@@ -26,6 +24,12 @@ public class CommitInfoViewOptions : DialogPage
2624
#endregion
2725

2826
#region Details View Settings
27+
[Category(CategoryDisplay)]
28+
[DisplayName("Details Visibility")]
29+
[Description("Enable details view")]
30+
[DefaultValue(false)]
31+
public bool DetailsVisibility { get; set; } = false;
32+
2933
[Category(CategoryDisplay)]
3034
[DisplayName("Details Font Size")]
3135
[Description("Font size for the details view")]

VSGitBlame/VSGitBlame.csproj

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,13 @@
7676
<Reference Include="WindowsBase" />
7777
</ItemGroup>
7878
<ItemGroup>
79-
<PackageReference Include="Microsoft.VisualStudio.SDK" Version="17.0.32112.339" ExcludeAssets="runtime" />
80-
<PackageReference Include="Microsoft.VSSDK.BuildTools" Version="17.12.44-preview1" />
79+
<PackageReference Include="Microsoft.VisualStudio.SDK" Version="17.14.40265" ExcludeAssets="runtime">
80+
<IncludeAssets>compile; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
81+
</PackageReference>
82+
<PackageReference Include="Microsoft.VSSDK.BuildTools" Version="17.14.2094">
83+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
84+
<PrivateAssets>all</PrivateAssets>
85+
</PackageReference>
8186
</ItemGroup>
8287
<ItemGroup>
8388
<ProjectReference Include="..\VSGitBlame.Core\VSGitBlame.Core.csproj">

0 commit comments

Comments
 (0)