Skip to content
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

MacOS: Support HiDPI scaling in long filename tooltips #7669

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

eirikbakke
Copy link
Contributor

On MacOS, show long filename tooltips in e.g. the Projects pane in proper Retina resolution (2x scaling).

Before:
image

After:
image

The relevant improvement had already been made for Windows back in 2016, but seems to have been left unactivated for MacOS, probably because the author didn't have a Mac to test on. The trick is to create the BufferedImage via JComponent.createVolatileImage instead of 'new BufferedImage' (matching my own earlier experience with how HiDPI support in implemented in Swing). I simply removed the !isMac() condition.

The historical commit that introduced the related code is here: eirikbakke/netbeans-releases@707013e#diff-4bc2ee6c72afdca0c960c205bedd2a606eb0657dad93ff82c7a93fbd1d5b0dc5R524

This issue was previously tracked at https://issues.apache.org/jira/browse/NETBEANS-5729

…name tooltip (e.g. in Projects pane)

The relevant improvement had already been made for Windows back in 2016, but seems to have been left unactivated for MacOS, probably because the author didn't have a Mac to test on. The trick is to create the BufferedImage via JComponent.createVolatileImage instead of 'new BufferedImage' (matching my own earlier experience with how HiDPI support in implemented in Swing). I simply removed the !isMac() condition.

The historical commit that introduced the related code is here: eirikbakke/netbeans-releases@707013e#diff-4bc2ee6c72afdca0c960c205bedd2a606eb0657dad93ff82c7a93fbd1d5b0dc5R524

This issue was previously tracked at https://issues.apache.org/jira/browse/NETBEANS-5729
@eirikbakke eirikbakke added Platform [ci] enable platform tests (platform/*) UI User Interface os:macos labels Aug 12, 2024
@eirikbakke eirikbakke requested a review from mbien August 12, 2024 22:18
Copy link
Member

@mbien mbien left a comment

Choose a reason for hiding this comment

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

makes sense to me!

(I get the feeling you all want me to buy a HiDPI screen)

@mbien mbien added this to the NB24 milestone Aug 14, 2024
@eirikbakke
Copy link
Contributor Author

Thanks for reviewing! (Are you on Windows, MacOS, or Linux normally? I may have misremembered your setup...)

@mbien
Copy link
Member

mbien commented Aug 15, 2024

I am on linux (still X11), I can dual-boot into win 10 though if needed. (In virtualbox I have all windows versions and other distributions available for testing) No mac but this was simple enough for review.

@eirikbakke eirikbakke merged commit 42d8692 into apache:master Aug 15, 2024
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os:macos Platform [ci] enable platform tests (platform/*) UI User Interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants