Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2020-06-23 Thread Alexander Zuev
Fix looks good. Approved. On 10-Jun-20 0:09, Sergey Bylokhov wrote: On 6/8/20 10:55 am, Alexander Zuev wrote: Hi Sergey,    I see that in show() you have removed specific workaround for Solaris. I guess this is justified but shouldn't we put some comments that will prevent backporting this

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2020-06-09 Thread Sergey Bylokhov
On 6/8/20 10:55 am, Alexander Zuev wrote: Hi Sergey,   I see that in show() you have removed specific workaround for Solaris. I guess this is justified but shouldn't we put some comments that will prevent backporting this fix to the version where Solaris support is still relevant? That code

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2020-06-08 Thread Alexander Zuev
Hi Sergey,   I see that in show() you have removed specific workaround for Solaris. I guess this is justified but shouldn't we put some comments that will prevent backporting this fix to the version where Solaris support is still relevant?   Otherwise fix looks good. /Alex

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2020-05-03 Thread Sergey Bylokhov
This fix has a long discussion, so I decided to look closely to it, here is one more proposal: Bug: https://bugs.openjdk.java.net/browse/JDK-8213535 Fix: http://cr.openjdk.java.net/~serb/8213535/webrev.00 Here are some thoughts about the size of the components based on the text: Some of

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2020-04-30 Thread Prasanta Sadhukhan
On 30-Apr-20 2:48 PM, Sergey Bylokhov wrote: On 4/29/20 8:29 pm, Prasanta Sadhukhan wrote: I could understand that we need to use some specific GC instead of null(which is the default), but a force to use GC instead of another non-null GC sounds not good, isn't it? I couldn't get what you

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2020-04-30 Thread Sergey Bylokhov
On 4/29/20 8:29 pm, Prasanta Sadhukhan wrote: I could understand that we need to use some specific GC instead of null(which is the default), but a force to use GC instead of another non-null GC sounds not good, isn't it? I couldn't get what you are trying to say...You have a problem with

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2020-04-29 Thread Prasanta Sadhukhan
Thanks Phil for your review. It was added to by IDE, anyways rectified it http://cr.openjdk.java.net/~psadhukhan/8213535/webrev.6/ Regards Prasanta On 30-Apr-20 2:08 AM, Philip Race wrote: 34 import java.awt.*; just for one class : 170 GraphicsConfiguration tipConfig =

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2020-04-29 Thread Prasanta Sadhukhan
On 30-Apr-20 8:06 AM, Sergey Bylokhov wrote: On 4/20/20 11:14 am, Prasanta Sadhukhan wrote: It seems JPanel (component created for LW popup) GC is again null and not in sync with JToolTip's GC so in addition to fix JToolTip's GC, we also need to set GC of JPanel (jn sync with "contents" or

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2020-04-29 Thread Sergey Bylokhov
On 4/20/20 11:14 am, Prasanta Sadhukhan wrote: It seems JPanel (component created for LW popup) GC is again null and not in sync with JToolTip's GC so in addition to fix JToolTip's GC, we also need to set GC of JPanel (jn sync with "contents" or tip's GC), so setSize() will be set same as

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2020-04-29 Thread Philip Race
34 import java.awt.*; just for one class : 170 GraphicsConfiguration tipConfig = this.getGraphicsConfiguration(); -phil. On 4/20/20, 11:14 AM, Prasanta Sadhukhan wrote: On 20-Apr-20 10:20 PM, Prasanta Sadhukhan wrote: On 20-Apr-20 10:16 PM, Sergey Bylokhov wrote: On

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2020-04-20 Thread Prasanta Sadhukhan
On 20-Apr-20 10:20 PM, Prasanta Sadhukhan wrote: On 20-Apr-20 10:16 PM, Sergey Bylokhov wrote: On 4/20/20 8:34 am, Prasanta Sadhukhan wrote: On 20-Apr-20 8:54 PM, Sergey Bylokhov wrote: On 4/20/20 2:40 am, Prasanta Sadhukhan wrote: http://cr.openjdk.java.net/~psadhukhan/8213535/webrev.4/

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2020-04-20 Thread Prasanta Sadhukhan
On 20-Apr-20 10:16 PM, Sergey Bylokhov wrote: On 4/20/20 8:34 am, Prasanta Sadhukhan wrote: On 20-Apr-20 8:54 PM, Sergey Bylokhov wrote: On 4/20/20 2:40 am, Prasanta Sadhukhan wrote: http://cr.openjdk.java.net/~psadhukhan/8213535/webrev.4/ used the right GC for the tip but we still need

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2020-04-20 Thread Sergey Bylokhov
On 4/20/20 8:34 am, Prasanta Sadhukhan wrote: On 20-Apr-20 8:54 PM, Sergey Bylokhov wrote: On 4/20/20 2:40 am, Prasanta Sadhukhan wrote: http://cr.openjdk.java.net/~psadhukhan/8213535/webrev.4/ used the right GC for the tip but we still need the preferredSize in the paint() Why do we need

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2020-04-20 Thread Prasanta Sadhukhan
On 20-Apr-20 8:54 PM, Sergey Bylokhov wrote: On 4/20/20 2:40 am, Prasanta Sadhukhan wrote: http://cr.openjdk.java.net/~psadhukhan/8213535/webrev.4/ used the right GC for the tip but we still need the preferredSize in the paint() Why do we need it? Do we calculate the size in the

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2020-04-20 Thread Sergey Bylokhov
On 4/20/20 2:40 am, Prasanta Sadhukhan wrote: http://cr.openjdk.java.net/~psadhukhan/8213535/webrev.4/ used the right GC for the tip but we still need the preferredSize in the paint() Why do we need it? Do we calculate the size in the ToolTipManager.showTipWindow() incorrectly? We call

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2020-04-20 Thread Prasanta Sadhukhan
On 19-Apr-20 8:52 PM, Sergey Bylokhov wrote: On 4/17/20 4:16 am, Prasanta Sadhukhan wrote: Also, the popupType will remain LW as we are only using it to create the tip but doing setPopupType() to LW after tooltip popup creation. http://cr.openjdk.java.net/~psadhukhan/8213535/webrev.3/

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2020-04-19 Thread Sergey Bylokhov
On 4/17/20 4:16 am, Prasanta Sadhukhan wrote: Also, the popupType will remain LW as we are only using it to create the tip but doing setPopupType() to LW after tooltip popup creation. http://cr.openjdk.java.net/~psadhukhan/8213535/webrev.3/ This is equivalent to using HW tooltip every time

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2020-04-17 Thread Prasanta Sadhukhan
On 15-Apr-20 5:11 PM, Sergey Bylokhov wrote: On 4/6/20 5:07 am, Prasanta Sadhukhan wrote:   tip = insideComponent.createToolTip();   tip.setTipText(toolTipText); + +    System.out.println("default gc " + gc.getDefaultTransform()); +   

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2020-04-15 Thread Sergey Bylokhov
On 4/6/20 5:07 am, Prasanta Sadhukhan wrote: tip = insideComponent.createToolTip(); tip.setTipText(toolTipText); + +    System.out.println("default gc " + gc.getDefaultTransform()); +    System.out.println("insideComponent GC " +

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2020-04-06 Thread Prasanta Sadhukhan
On 06-Apr-20 12:26 PM, Sergey Bylokhov wrote: On 4/5/20 11:08 pm, Prasanta Sadhukhan wrote: On 05-Apr-20 10:29 AM, Sergey Bylokhov wrote: On 4/2/20 8:59 pm, Prasanta Sadhukhan wrote: If we GC is correct in reset/pack step, but the View calculate wrong size(and update it only after

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2020-04-06 Thread Sergey Bylokhov
On 4/5/20 11:08 pm, Prasanta Sadhukhan wrote: On 05-Apr-20 10:29 AM, Sergey Bylokhov wrote: On 4/2/20 8:59 pm, Prasanta Sadhukhan wrote: 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

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2020-04-06 Thread Prasanta Sadhukhan
On 05-Apr-20 10:29 AM, Sergey Bylokhov wrote: On 4/2/20 8:59 pm, Prasanta Sadhukhan wrote: 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,

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2020-04-04 Thread Sergey Bylokhov
On 4/2/20 8:59 pm, Prasanta Sadhukhan wrote: 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

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2020-04-02 Thread Prasanta Sadhukhan
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

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2020-04-02 Thread Sergey Bylokhov
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

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2020-04-02 Thread Prasanta Sadhukhan
On 02-Apr-20 10:04 PM, Prasanta Sadhukhan wrote: On 02-Apr-20 9:45 PM, Sergey Bylokhov wrote: On 4/1/20 1:03 am, Prasanta Sadhukhan wrote: It is because of the same issue the size is not updated as ToolTipManager#showTipWindow() calls popupFactory.getPopup() before tip.show() and as per

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2020-04-02 Thread Prasanta Sadhukhan
On 02-Apr-20 9:45 PM, Sergey Bylokhov wrote: On 4/1/20 1:03 am, Prasanta Sadhukhan wrote: It is because of the same issue the size is not updated as ToolTipManager#showTipWindow() calls popupFactory.getPopup() before tip.show() and as per flow, getPopup() => getLightWeightPopup() =>

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2020-04-02 Thread Sergey Bylokhov
On 4/1/20 1:03 am, Prasanta Sadhukhan wrote: It is because of the same issue the size is not updated as ToolTipManager#showTipWindow() calls popupFactory.getPopup() before tip.show() and as per flow, getPopup() => getLightWeightPopup() => popup.reset() => pack() calls

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2020-04-01 Thread Prasanta Sadhukhan
It is because of the same issue the size is not updated as ToolTipManager#showTipWindow() calls popupFactory.getPopup() before tip.show() and as per flow, getPopup() => getLightWeightPopup() => popup.reset() => pack() calls component.setSize(component.getPreferredSize()) where the

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2020-03-31 Thread Sergey Bylokhov
That looks much better! The only question I have is why the size is not updated - is it intentional behaviour or we can tweak it somehow. On 3/31/20 1:13 am, Prasanta Sadhukhan wrote: View is updated by calling BasicHTML.updateRenderer when "graphicsConfiguration" property is fired when

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2020-03-31 Thread Prasanta Sadhukhan
View is updated by calling BasicHTML.updateRenderer when "graphicsConfiguration" property is fired when tooltip is shown via tip.show() in ToolTipManager. Now, we should be using the updated preferredSize calculated by View.getPreferredSpan but BasicToolTip#paint still uses the old size.

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2020-03-27 Thread Sergey Bylokhov
On 3/27/20 3:27 am, Prasanta Sadhukhan wrote: On 07-Dec-19 10:28 AM, Sergey Bylokhov wrote: On 12/6/19 7:24 pm, Prasanta Sadhukhan wrote: 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

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2020-03-27 Thread Prasanta Sadhukhan
On 07-Dec-19 10:28 AM, Sergey Bylokhov wrote: On 12/6/19 7:24 pm, Prasanta Sadhukhan wrote: 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

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2019-12-06 Thread Sergey Bylokhov
On 12/6/19 7:24 pm, Prasanta Sadhukhan wrote: 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. Even if

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2019-12-06 Thread Prasanta Sadhukhan
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

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2019-12-06 Thread Sergey Bylokhov
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

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2019-12-05 Thread Prasanta Sadhukhan
Gentle reminder On 28-Nov-19 3:52 PM, Prasanta Sadhukhan wrote: Hi Sergey, Hi Sergey, On 27-Jul-19 2:56 AM, Sergey Bylokhov wrote: Hi, Prasanta. On 01.07.2019 03:25, Prasanta Sadhukhan wrote: Currently this rectangle is created based on the size of the component, so this rectangle is

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2019-11-28 Thread Prasanta Sadhukhan
Hi Sergey, Hi Sergey, On 27-Jul-19 2:56 AM, Sergey Bylokhov wrote: Hi, Prasanta. On 01.07.2019 03:25, Prasanta Sadhukhan wrote: Currently this rectangle is created based on the size of the component, so this rectangle is smaller that the size. But it looks like after the fix the rectangle will

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2019-07-26 Thread Sergey Bylokhov
Hi, Prasanta. On 01.07.2019 03:25, Prasanta Sadhukhan wrote: Currently this rectangle is created based on the size of the component, so this rectangle is smaller that the size. But it looks like after the fix the rectangle will be bigger. Probably the bug exists in getPreferredSize() where we

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2019-07-01 Thread Prasanta Sadhukhan
On 15-Apr-19 11:36 PM, Sergey Bylokhov wrote: On 14/04/2019 22:24, Prasanta Sadhukhan wrote: Currently this rectangle is created based on the size of the component, so this rectangle is smaller that the size. But it looks like after the fix the rectangle will be bigger. Probably the bug

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2019-04-15 Thread Sergey Bylokhov
On 14/04/2019 22:24, Prasanta Sadhukhan wrote: Currently this rectangle is created based on the size of the component, so this rectangle is smaller that the size. But it looks like after the fix the rectangle will be bigger. Probably the bug exists in getPreferredSize() where we return small

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2019-04-14 Thread Prasanta Sadhukhan
Hi Sergey, On 15-Apr-19 8:37 AM, Sergey Bylokhov wrote: Just to clarify one question, are you sure that this new calculation will make the correct rectangle to draw the text? I think so. Currently this rectangle is created based on the size of the component, so this rectangle is smaller

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2019-04-14 Thread Sergey Bylokhov
Just to clarify one question, are you sure that this new calculation will make the correct rectangle to draw the text? Currently this rectangle is created based on the size of the component, so this rectangle is smaller that the size. But it looks like after the fix the rectangle will be

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2019-04-14 Thread Jayathirth Rao
Thanks for the clarification changes are fine. Regards, Jay > On 12-Apr-2019, at 5:22 PM, Prasanta Sadhukhan > wrote: > > HI Jay, > > On 12-Apr-19 3:30 PM, Prasanta Sadhukhan wrote: >> HI Jay, >> Thanks for your review. >> On 12-Apr-19 2:50 PM, Jayathirth Rao wrote: >>> Hi Prasanta, >>> >>>

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2019-04-12 Thread Prasanta Sadhukhan
HI Jay, On 12-Apr-19 3:30 PM, Prasanta Sadhukhan wrote: HI Jay, Thanks for your review. On 12-Apr-19 2:50 PM, Jayathirth Rao wrote: Hi Prasanta, I was going through the trail of changes related to this fix. In JDK-8178025 changes are made to update the BasicTooTipUI renderer when there

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2019-04-12 Thread Prasanta Sadhukhan
HI Jay, Thanks for your review. On 12-Apr-19 2:50 PM, Jayathirth Rao wrote: Hi Prasanta, I was going through the trail of changes related to this fix. In JDK-8178025 changes are made to update the BasicTooTipUI renderer when there is “graphicsConfiguration” property is changed and also we

Re: [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2019-04-12 Thread Jayathirth Rao
Hi Prasanta, I was going through the trail of changes related to this fix. In JDK-8178025 changes are made to update the BasicTooTipUI renderer when there is “graphicsConfiguration” property is changed and also we have updated GlyphPainter1 to get proper FontMetrics if there is mismatch

[13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

2019-03-29 Thread Prasanta Sadhukhan
Hi All, Please review a fix for an issue where it is seen that HTML tooltips aren't big enough to contain their contents on Windows HiDPI displays, there by the last word of the tooltip text are missing. It is an aftereffect of JDK-8178025