eclipse / nebula

Nebula Project
https://eclipse.org/nebula
Eclipse Public License 2.0
84 stars 98 forks source link

RichTextPainter returns incorrect preferred size if more space is available #501

Closed fipro78 closed 1 year ago

fipro78 commented 1 year ago

If more space is available than needed for rendering the HTML, the RichTextPainter returns an incorrect preferred height. This is because at the end of paintHTML() the maximum of either bounds.height or preferredSize.y is set as preferredSize.y.

The preferredSize.y value should not be overriden with the value of the passed bounds height. Otherwise it would be for example not possible to use a MIDDLE or BOTTOM vertical alignment in NatTable cells.