ArthurHub / ArthurHub/HTML-Renderer

Location not working for negative values, gets pushed to 0

Ouverte
#44 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
bug enhancement
Langage dominant
C#
Étoiles
1.4k
Forks
550
Merge moyen
14 j 9 h
PR mergées (30 j)
1

Description

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);
....
}

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.