mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
ux: do not use graph color for commit refs (decorators) in commit details panel
This commit is contained in:
parent
07c2e9f927
commit
b44d4d26c9
4 changed files with 22 additions and 4 deletions
|
@ -10,7 +10,7 @@
|
|||
<Color x:Key="Color.Contents">#FFFAFAFA</Color>
|
||||
<Color x:Key="Color.Badge">#FFB0CEE8</Color>
|
||||
<Color x:Key="Color.BadgeFG">#FF1F1F1F</Color>
|
||||
<Color x:Key="Color.DecoratorTag">#79855f</Color>
|
||||
<Color x:Key="Color.DecoratorTag">DarkGreen</Color>
|
||||
<Color x:Key="Color.Conflict">#FF836C2E</Color>
|
||||
<Color x:Key="Color.ConflictForeground">#FFFFFFFF</Color>
|
||||
<Color x:Key="Color.Border0">#FFCFCFCF</Color>
|
||||
|
|
|
@ -102,7 +102,8 @@
|
|||
Foreground="{DynamicResource Brush.FG1}"
|
||||
FontFamily="{DynamicResource Fonts.Primary}"
|
||||
FontSize="11"
|
||||
VerticalAlignment="Center"/>
|
||||
VerticalAlignment="Center"
|
||||
UseGraphColor="False"/>
|
||||
</Border>
|
||||
|
||||
<!-- Messages -->
|
||||
|
|
|
@ -46,6 +46,15 @@ namespace SourceGit.Views
|
|||
set => SetValue(ForegroundProperty, value);
|
||||
}
|
||||
|
||||
public static readonly StyledProperty<bool> UseGraphColorProperty =
|
||||
AvaloniaProperty.Register<CommitRefsPresenter, bool>(nameof(UseGraphColor), false);
|
||||
|
||||
public bool UseGraphColor
|
||||
{
|
||||
get => GetValue(UseGraphColorProperty);
|
||||
set => SetValue(UseGraphColorProperty, value);
|
||||
}
|
||||
|
||||
public static readonly StyledProperty<IBrush> TagBackgroundProperty =
|
||||
AvaloniaProperty.Register<CommitRefsPresenter, IBrush>(nameof(TagBackground), Brushes.White);
|
||||
|
||||
|
@ -122,6 +131,7 @@ namespace SourceGit.Views
|
|||
var typeface = new Typeface(FontFamily);
|
||||
var typefaceBold = new Typeface(FontFamily, FontStyle.Normal, FontWeight.Bold);
|
||||
var fg = Foreground;
|
||||
var normalBG = UseGraphColor ? commit.Brush : Brushes.Gray;
|
||||
var tagBG = TagBackground;
|
||||
var labelSize = FontSize;
|
||||
var requiredWidth = 0.0;
|
||||
|
@ -139,7 +149,13 @@ namespace SourceGit.Views
|
|||
isHead ? labelSize + 1 : labelSize,
|
||||
fg);
|
||||
|
||||
var item = new RenderItem() { Label = label, Brush = commit.Brush, IsHead = isHead };
|
||||
var item = new RenderItem()
|
||||
{
|
||||
Label = label,
|
||||
Brush = normalBG,
|
||||
IsHead = isHead
|
||||
};
|
||||
|
||||
StreamGeometry geo;
|
||||
switch (decorator.Type)
|
||||
{
|
||||
|
|
|
@ -142,7 +142,8 @@
|
|||
Foreground="{DynamicResource Brush.FG1}"
|
||||
FontFamily="{DynamicResource Fonts.Primary}"
|
||||
FontSize="11"
|
||||
VerticalAlignment="Center"/>
|
||||
VerticalAlignment="Center"
|
||||
UseGraphColor="True"/>
|
||||
|
||||
<v:CommitSubjectPresenter Grid.Column="2"
|
||||
Classes="primary"
|
||||
|
|
Loading…
Reference in a new issue