On 07-Dec-19 4:06 AM, Sergey Bylokhov wrote:
On 11/28/19 2:22 am, Prasanta Sadhukhan wrote:
For example take a look to the BasicButtonUI class it uses the
similar logic on top of View, but we reset the view if font, or font
transform is changed see JDK-8201552 and
BasicButtonListener.propertyChange()
BasicToolTipUI.propertyChange was already changed by 8201552 to
update the view if "scale" is changed but the problem still exists so
it means View does not know about the correct preferred size of text,
so we need the above patch to make it work.
Then probably the code which was added in 8201552 is not triggered for
some reason?
It is triggered. I have seen propertyChange() is called and
SwingUtilities.isScaledChanged() is true
How other components which may use HTML inside calculates its
preferred size? I do not remember that they additionally scale the
values returned by the View.
Maybe those components does not use preferredSize calculation as
JTooltip does.
Regards
Prasanta