On 03-Apr-20 12:09 AM, Sergey Bylokhov wrote:
On 4/2/20 11:06 am, Prasanta Sadhukhan wrote:
As per my understanding, the GC is correct in reset/pack steps(we pass insideComponent which is JButton to getPopup() and it's defaultTransform is same as the scale we have for the window, which in this case is 1.25), but since "graphicsConfiguration" property is not fired, so BasicHTML.updateRender is not yet called so View is not yet updated, so the preferredSpan is not correct, which is used in preferredSize calculation so when setSize is called, it is set with wrong preferredSize, so I dont think it's because of wrong GC.

If we GC is correct in reset/pack step, but the View calculate wrong size(and update it only after "graphicsConfiguration" property change) means that we calculate the size of the View using wrong GC, why?

It's not the size of View, it's the preferredSize that is wrong. This is because tip's GC is null before the tip is shown, so View's span is calculated accordingly. Only when View isupdated when "graphicsConfiguration" is fired, then Tooltip GC is updated and preferredSpan is calculated correctly.

It's to be remembered that the issue happens only when html text is shown in ToolTip. If normal text is shown , there is no issue. I guess if it's a question of wrong GC during popup reset/pack, then it will cause problem during normal text rendering also, no?

Regards
Prasanta

Reply via email to