Skip to content

Conversation

@azuev-java
Copy link
Member

@azuev-java azuev-java commented Nov 8, 2025

The problem is that we do not correct the icon and text re-alignment that happens when we call SwingUtilities.layoutCompoundLabel

Here's the comparison of the alignment before and after the fix
Before:
before_fix
After:
after_fix


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8371508: [macos] In Aqua LaF menu items layout is incorrect in RTL orientation (Bug - P3)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/28210/head:pull/28210
$ git checkout pull/28210

Update a local copy of the PR:
$ git checkout pull/28210
$ git pull https://git.openjdk.org/jdk.git pull/28210/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 28210

View PR using the GUI difftool:
$ git pr show -t 28210

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/28210.diff

Using Webrev

Link to Webrev Comment

…ientation

Fixed the components orientation;
Added Aqua test to the existing manual case;
@bridgekeeper
Copy link

bridgekeeper bot commented Nov 8, 2025

👋 Welcome back kizune! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Nov 8, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot added the client client-libs-dev@openjdk.org label Nov 8, 2025
@openjdk
Copy link

openjdk bot commented Nov 8, 2025

@azuev-java The following label will be automatically applied to this pull request:

  • client

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 8, 2025
@mlbridge
Copy link

mlbridge bot commented Nov 8, 2025

Webrevs

@lawrence-andrew
Copy link
Contributor

Question on sub menu arrow . I see both the LTR & RTL are same. Should not be different >

@azuev-java
Copy link
Member Author

Question on sub menu arrow . I see both the LTR & RTL are same. Should not be different >

I think it should be, but it is initialized statically in AquaImageFactory. It might be a good idea to change it for RTL menu items but i think it is out of scope for this particular fix - here we only deal with the incorrect layout of the menu item components. I can create a follow-up bug to fix for the wrong arrow icon used for RTL menus to fix in the future.

/*
* @test id=aqua
* @bug 8371508
* @requires (os.family == "mac")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess now the test can be run in window and mac OS ? Any idea on Nimbus L&F in windows os ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is Aqua LnF specific fix and Aqua LnF is only available on macOS so this exact test case can only be ran on mac. Initially test was used to validate the layout for Windows and Motif LnF. I haven't tried Nimbus yet. If there are problems with Nimbus on Windows they might be addressed separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client client-libs-dev@openjdk.org rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

3 participants