mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-23 02:12:25 +08:00
enhance: stop render next inline elements when it is out of bounds
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
@@ -97,8 +97,12 @@ namespace SourceGit.Views
|
||||
return;
|
||||
|
||||
var height = Bounds.Height;
|
||||
var width = Bounds.Width;
|
||||
foreach (var inline in _inlines)
|
||||
{
|
||||
if (inline.X > width)
|
||||
return;
|
||||
|
||||
if (inline.Element is { Type: Models.InlineElementType.Code})
|
||||
{
|
||||
var rect = new Rect(inline.X, (height - inline.Text.Height - 2) * 0.5, inline.Text.WidthIncludingTrailingWhitespace + 8, inline.Text.Height + 2);
|
||||
|
||||
Reference in New Issue
Block a user