On Fri, 12 Mar 2021 10:03:53 GMT, Ajit Ghaisas <aghai...@openjdk.org> wrote:

>> Reverting to the old way of showing the context menu but with application
>> of CSS prior to calling prefHeight(-1) / prefWidth(-1) to ensure correct
>> size measurement of the menu.
>
> Marked as reviewed by aghaisas (Reviewer).

This fixes the bug in question, although I see a slight regression in behavior 
on Windows with 125% pixel scaling (it doesn't reproduce with any other scaling 
value that I tried). With the original test case for 
[JDK-8228363](https://bugs.openjdk.java.net/browse/JDK-8228363), and `TOP` as 
the value of `side`, the initial menu is positioned slightly lower (by a few 
pixels) than it should be. See the attached image. It is correct the second and 
subsequent times the context menu is opened.

Given that this new bug only happens with 125% scaling, it seems likely that it 
is a preexisting bug, and this fix merely exposes it. Can you take a look at 
this? If it is preexisting, then we should file a follow-on bug for this.

![ContextMenu-125](https://user-images.githubusercontent.com/34689748/110947924-9991ce00-82f5-11eb-82d2-6959ef24293f.png)

-------------

PR: https://git.openjdk.java.net/jfx/pull/410

Reply via email to