Skip to content

Show dragged tab images at full HiDPI resolution#8310

Merged
eirikbakke merged 3 commits intoapache:masterfrom
eirikbakke:pr-dragtabdpi
Mar 13, 2025
Merged

Show dragged tab images at full HiDPI resolution#8310
eirikbakke merged 3 commits intoapache:masterfrom
eirikbakke:pr-dragtabdpi

Conversation

@eirikbakke
Copy link
Copy Markdown
Contributor

When dragging window system tabs, show the dragged tab image at full HiDPI resolution.

Before:
Screenshot 2025-03-11 at 12 24 19 AM

After:
Screenshot 2025-03-11 at 12 22 58 AM

Tested on MacOS with a Retina screen (2x scaling) and Windows 11 with 150% HiDPI scaling.

@eirikbakke eirikbakke added Platform [ci] enable platform tests (platform/*) UI User Interface labels Mar 11, 2025
@mbien mbien added this to the NB26 milestone Mar 11, 2025
Comment thread platform/core.windows/src/org/netbeans/core/windows/view/dnd/DragWindow.java Outdated
Comment thread platform/core.windows/src/org/netbeans/core/windows/view/dnd/DragWindow.java Outdated
…HiDPI resolution.

Tested on MacOS with a Retina screen (2x scaling) and Windows 11 with 150% HiDPI scaling.
…. This commit makes no changes to the logic in DragWindow other than to set useFadeEffects to false and then simplify away all the resulting dead code and unused fields. Tidy up the code in a few places, without changing the logic.
Copy link
Copy Markdown
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.

looks good (tested on linux/cinnamon). Nice cleanup.

I suppose lower powered systems like raspi could turn that feature off in the settings if the high quality rendering hints/buffer sizes cause problems. I vaguely remember that it had some stability issues a while ago, that is probably why I had it turned off in my workstation.

Replacing the JNA code with Java 7 window transparency API is something we could try in another cleanup at some point too.

@eirikbakke
Copy link
Copy Markdown
Contributor Author

Thanks for reviewing! Planning to merge without squashing since it's useful to have the "remove animation-related code" part in a separate commit.

Replacing the JNA code with Java 7 window transparency API is something we could try in another cleanup at some point too.

I can have a look at it...

@eirikbakke
Copy link
Copy Markdown
Contributor Author

@mbien I ended up adding another commit that removes the use of JNA, since it was easy to do. Tested on MacOS and Windows, both with the "Transparent drag window image" option (in Options->Appearance) both enabled and disabled.

If you have a chance to test the latest version on Linux, that would cover all the OSes... thanks for your help!

@mbien
Copy link
Copy Markdown
Member

mbien commented Mar 12, 2025

it doesn't work very well for me unfortunately (note the tab quality and the fact that the background rectangle isn't transparent)
drag1

Lets not let the JNA cleanup distract from the original goal, we can add a cleanup at a later point and also deprecate NativeWindowSystem in one go (check other usages etc).

@eirikbakke
Copy link
Copy Markdown
Contributor Author

@mbien Good catch; thanks for testing that! I have dropped the JNA removal commit then, restoring to the previous version you tried.

I added one small change in a separate commit, which is a rectangle fill operation that turns out to be needed on Windows in non-transparent mode. I've tested it again on Windows and MacOS, in light and dark mode, and with and without transparency enabled. I'll squash this last commit into the previous before merging.

…ix missing repaints when the dropEnabled indication is supposed to change.
@eirikbakke
Copy link
Copy Markdown
Contributor Author

Squashed to leave 3 commits in the end before merging.

@eirikbakke eirikbakke merged commit e24286f into apache:master Mar 13, 2025
32 checks passed
@mbien
Copy link
Copy Markdown
Member

mbien commented Mar 13, 2025

@eirikbakke please pause merges for now, see dev list.

@eirikbakke
Copy link
Copy Markdown
Contributor Author

@mbien Yes, saw that, will step away from the keyboard :-) Thank you for looking into it!

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

Labels

Platform [ci] enable platform tests (platform/*) UI User Interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants