mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 20:54:59 +00: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:
parent
8c4362a98d
commit
1d16925e74
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue