ArthurHub / ArthurHub/HTML-Renderer

Location not working for negative values, gets pushed to 0

未关闭
#44 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug enhancement
主要语言
C#
星标
1.4k
派生
550
平均合并
14 天 9 小时
30 天内合并 PR
1

描述

Hi, I am trialling this and so far it's awesome. Just found one thing though trying to render HTML into a custom List Box and sometimes (for items at the top) painting needs to start at a location with a -Y for a partially drawn list item. I believe that I have found the problem and here is my fix, so far it seems OK (the Demo still looks all good).

In Layout cells there are some calls to Math.Max where the 2nd param is 0, it should be the existing Location value.

private void LayoutCells(RGraphics g)
{
double startx = Math.Max(_tableBox.ClientLeft + GetHorizontalSpacing(), _tableBox.Location.X);
double starty = Math.Max(_tableBox.ClientTop + GetVerticalSpacing(), _tableBox.Location.Y);
....
}

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。