eclipse / nebula

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

Cache the font of the slider / do not dispose colors #579

Closed laeubi closed 3 months ago

laeubi commented 3 months ago

Currently the font and colors are created on each call of getTextFont / get...Color and as these methods are called on each render it creates many fonts/colors and their dispose listener.

This caches the font and removes the disposal of colors as SWT no longer acquire native resources for colors. Beside that a new getFontSize method is provided so one can easily override that.

lcaron commented 3 months ago

PR Merged, thank you @laeubi