-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8374506: Incorrect positioning of arrow icon in parent JMenu in Windows L&F #29375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
👋 Welcome back psadhukhan! A progress list of the required criteria for merging this PR into |
|
@prsadhuk This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 97 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
|
@TejeshR13 @DamonGuy @azuev-java please review |
aivanov-jdk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not completely against this as an interim fix…
Yet the submenu arrow now is nearly at the very edge of the menu — there has to be a margin. When the submenu opens, it now covers the arrow, but it shouldn't. At least this is how it looks in native Win32 applications.
This fix is yet another patch to fit more information into the same amount of space.
The underlying problem remains unaddressed. In the fix for JDK-8348760 in #23324, you added another column into Windows L&F menu layout, but you didn't increase the width of the menu to accommodate for the new column. Instead, you're trying to tweak coordinates of each element in the menu layout to fit more information into the same space.
I keep saying since that initial code review for #23324, for example here, and I repeat it here:
The popup menu has to become wider if both check marks / bullets and icons are rendered at the same time.
Unless you make the menu wider to accommodate the newly added column, the menu looks crammed with inconsistent margins between elements.
|
With the fix it is better than without the fix - that is for sure, but the overall layout looks strange and majority of the arrow icon is being hidden behind the submenu's popup which is wrong. I am approving it as a stopgap solution but the overall we might want to re-visit how we calculate layouts of menu items to make it look more like a OS native menus. |
aivanov-jdk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @azuev-java, it looks better this way.
|
/integrate |
|
Going to push as commit 9a10cce.
Your commit was automatically rebased without conflicts. |
I've now submitted JDK-8376828: Improve JMenuItem layout in Windows L&F. |
Arrow icon of JMenuItem in JMenu which is used to invoke the submenu overlaps with the menutext if the text is long.
Fix is made to add a gap for arrow icon rect too similar to menu text and accelerator rects
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/29375/head:pull/29375$ git checkout pull/29375Update a local copy of the PR:
$ git checkout pull/29375$ git pull https://git.openjdk.org/jdk.git pull/29375/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 29375View PR using the GUI difftool:
$ git pr show -t 29375Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/29375.diff
Using Webrev
Link to Webrev Comment