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

improve/fix painting of drag-and-drop insert indicator lines on HiDPI screens #6144

Merged
merged 1 commit into from
Jul 2, 2023

Conversation

DevCharly
Copy link
Member

The drag-and-drop insert indicator lines for TreeView, OutlineView and Palette were painted using six g.drawLine() statements, which work fine for 100% screen scaling:

image

But not so good on 150% screen scaling (you can see the six single lines):

image

This PR changes painting to use a single filled shape and enables antialiasing. At 100%:

image

At 150%:

image

This PR also sets the painting color of the D&D line for the palette (was not set before before):

image

Also fixed some compiler warnings (unused imports, missing Override, ...)

@DevCharly DevCharly added the UI User Interface label Jul 1, 2023
@DevCharly DevCharly added this to the NB19 milestone Jul 1, 2023
@DevCharly DevCharly requested a review from eirikbakke July 1, 2023 15:00
@eirikbakke
Copy link
Contributor

Ah, beautiful. The old rendering has annoyed me on HiDPI screens for some years...

I'm doing a new NetBeans build now and will let you know when I have tested this and the other PR.

Copy link
Contributor

@eirikbakke eirikbakke left a comment

Choose a reason for hiding this comment

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

Tested and works in my private IDE build and NetBeans Platform application! Thank you!

Copy link
Contributor

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

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

Only tested with normal resolution and there it still looks like it should. The approach looks sane, lets get this in.

@eirikbakke
Copy link
Contributor

My test was done on 150% DPI scaling on Windows.

@DevCharly DevCharly merged commit 2edeaf9 into apache:master Jul 2, 2023
34 checks passed
@DevCharly DevCharly deleted the dnd-line-painting-fix branch July 2, 2023 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UI User Interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants