Skip to content

Commit 11351af

Browse files
committed
ux: commit ref custom renderer
Signed-off-by: leo <[email protected]>
1 parent 27289eb commit 11351af

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Views/CommitRefsPresenter.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,18 +116,18 @@ public override void Render(DrawingContext context)
116116
var fg = Foreground;
117117
var bg = Background;
118118
var allowWrap = AllowWrap;
119-
var x = 1.0;
120-
var y = 0.0;
119+
var x = 1.5;
120+
var y = 0.5;
121121

122122
foreach (var item in _items)
123123
{
124-
if (allowWrap && x > 1.0 && x + item.Width > Bounds.Width)
124+
if (allowWrap && x > 1.5 && x + item.Width > Bounds.Width)
125125
{
126-
x = 1.0;
126+
x = 1.5;
127127
y += 20.0;
128128
}
129129

130-
var entireRect = new RoundedRect(new Rect(x, y, item.Width, 16), new CornerRadius(2));
130+
var entireRect = new RoundedRect(new Rect(x, y, item.Width, 16), new CornerRadius(4));
131131

132132
if (item.IsHead)
133133
{
@@ -147,7 +147,7 @@ public override void Render(DrawingContext context)
147147
if (bg != null)
148148
context.DrawRectangle(bg, null, entireRect);
149149

150-
var labelRect = new RoundedRect(new Rect(x + 16, y, item.Label.Width + 8, 16), new CornerRadius(0, 2, 2, 0));
150+
var labelRect = new RoundedRect(new Rect(x + 16, y, item.Label.Width + 8, 16), new CornerRadius(0, 4, 4, 0));
151151
using (context.PushOpacity(.2))
152152
context.DrawRectangle(item.Brush, null, labelRect);
153153

0 commit comments

Comments
 (0)