Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ Quick Blame allows you to blame any line of code in your repo simply by clicking

## License

[MIT](VSGitBlame/Resources/LICENSE)
[MIT](VSGitBlame/Resources/LICENSE.txt)
21 changes: 13 additions & 8 deletions VSGitBlame/CommitInfoViewFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ public static class CommitInfoViewFactory

static bool _firstMouseMoveFired = false;
static bool _isDetailsVisible = false;
static bool _isDetailsEnabled = false;
static IAdornmentLayer _adornmentLayer;

private static VSGitBlamePackage _package;
private static CommitInfoViewOptions _options;

Expand Down Expand Up @@ -61,17 +62,17 @@ private static void ApplySettings()
if (_options.SummaryFontColor != Color.Transparent)
{
_summaryView.Foreground = new SolidColorBrush(System.Windows.Media.Color.FromArgb(
_options.SummaryFontColor.A,
_options.SummaryFontColor.R,
_options.SummaryFontColor.G,
_options.SummaryFontColor.A,
_options.SummaryFontColor.R,
_options.SummaryFontColor.G,
_options.SummaryFontColor.B));
}
else
{
// Use theme detection if no specific color is set
var backgroundColor = VSColorTheme.GetThemedColor(EnvironmentColors.ToolWindowBackgroundColorKey);
_summaryView.Foreground = backgroundColor.GetBrightness() > 0.5 ?
Brushes.DarkBlue :
_summaryView.Foreground = backgroundColor.GetBrightness() > 0.5 ?
Brushes.DarkBlue :
Brushes.LightGray;
}
}
Expand All @@ -87,6 +88,7 @@ private static void ApplySettings()
{
// Apply background color setting
_detailsViewContainer.Background = _options.GetDetailsBackgroundBrush();
_isDetailsEnabled = _options.DetailsVisibility;
}
}

Expand Down Expand Up @@ -156,8 +158,11 @@ static CommitInfoViewFactory()
if (_isDetailsVisible)
return;

_detailsViewContainer.Visibility = Visibility.Visible;
_isDetailsVisible = true;
if (_isDetailsEnabled)
{
_detailsViewContainer.Visibility = Visibility.Visible;
_isDetailsVisible = true;
}
};

rootPanel.MouseLeave += (sender, e) =>
Expand Down
8 changes: 6 additions & 2 deletions VSGitBlame/CommitInfoViewOptions.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using Microsoft.VisualStudio.Shell;
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows;
using System.Windows.Media;
using Color = System.Drawing.Color;
Expand All @@ -26,6 +24,12 @@ public class CommitInfoViewOptions : DialogPage
#endregion

#region Details View Settings
[Category(CategoryDisplay)]
[DisplayName("Details Visibility")]
[Description("Enable details view")]
[DefaultValue(false)]
public bool DetailsVisibility { get; set; } = false;

[Category(CategoryDisplay)]
[DisplayName("Details Font Size")]
[Description("Font size for the details view")]
Expand Down
9 changes: 7 additions & 2 deletions VSGitBlame/VSGitBlame.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,13 @@
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.SDK" Version="17.0.32112.339" ExcludeAssets="runtime" />
<PackageReference Include="Microsoft.VSSDK.BuildTools" Version="17.12.44-preview1" />
<PackageReference Include="Microsoft.VisualStudio.SDK" Version="17.14.40265" ExcludeAssets="runtime">
<IncludeAssets>compile; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VSSDK.BuildTools" Version="17.14.2094">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\VSGitBlame.Core\VSGitBlame.Core.csproj">
Expand Down