Skip to content

Commit fd667f3

Browse files
committed
ux: visual of subject end indicator line
Signed-off-by: leo <longshuang@msn.cn>
1 parent 2342f0f commit fd667f3

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/Views/CommitMessageToolBox.axaml.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,6 @@ public override void Render(DrawingContext context)
161161
Brushes.Gray);
162162

163163
context.DrawText(formatted, new Point(4, 2));
164-
165-
var y = PixelSnapHelpers.PixelAlign(6 + formatted.Height, pixelHeight);
166-
context.DrawLine(pen, new Point(0, y), new Point(w, y));
167164
}
168165

169166
return;
@@ -194,6 +191,15 @@ public override void Render(DrawingContext context)
194191
var y = line.GetTextLineVisualYPosition(line.TextLines[^1], VisualYPosition.LineBottom) - view.VerticalOffset + 4;
195192
y = PixelSnapHelpers.PixelAlign(y, pixelHeight);
196193
context.DrawLine(pen, new Point(0, y), new Point(w, y));
194+
195+
var subjectEndTip = new FormattedText(
196+
"SUBJECT END",
197+
CultureInfo.CurrentCulture,
198+
FlowDirection.LeftToRight,
199+
new Typeface(FontFamily, FontStyle.Italic),
200+
10,
201+
Brushes.Gray);
202+
context.DrawText(subjectEndTip, new Point(w - subjectEndTip.WidthIncludingTrailingWhitespace - 6, y + 1));
197203
return;
198204
}
199205
}

0 commit comments

Comments
 (0)