mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 20:54:59 +00:00
refactor: rename Models.CustomColorSchema
to Models.ThemeOverrides
because it do NOT contains only colors currently.
This commit is contained in:
parent
af388bad60
commit
16d9b627f0
12 changed files with 49 additions and 74 deletions
|
@ -108,30 +108,21 @@ namespace SourceGit.Models
|
|||
private set;
|
||||
} = new List<Pen>();
|
||||
|
||||
public static void SetDefaultPens()
|
||||
public static void SetDefaultPens(double thickness = 1.5)
|
||||
{
|
||||
SetPenColors(_defaultPenColors);
|
||||
SetPens(_defaultPenColors, thickness);
|
||||
}
|
||||
|
||||
public static void SetPenColors(List<Color> colors)
|
||||
public static void SetPens(List<Color> colors, double thickness)
|
||||
{
|
||||
Pens.Clear();
|
||||
|
||||
foreach (var c in colors)
|
||||
Pens.Add(new Pen(c.ToUInt32(), 2));
|
||||
Pens.Add(new Pen(c.ToUInt32(), thickness));
|
||||
|
||||
_penCount = colors.Count;
|
||||
}
|
||||
|
||||
public static void SetPenThickness(double value)
|
||||
{
|
||||
_penThickness = value;
|
||||
}
|
||||
public static double GetPenThickness()
|
||||
{
|
||||
return _penThickness;
|
||||
}
|
||||
|
||||
public static CommitGraph Parse(List<Commit> commits)
|
||||
{
|
||||
double UNIT_WIDTH = 12;
|
||||
|
@ -277,7 +268,6 @@ namespace SourceGit.Models
|
|||
return temp;
|
||||
}
|
||||
|
||||
private static double _penThickness = 1;
|
||||
private static int _penCount = 0;
|
||||
private static readonly List<Color> _defaultPenColors = [
|
||||
Colors.Orange,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue