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

Workaround for JDK-8199592; text being truncated at certain display scaling levels #1767

Conversation

devinbileck
Copy link
Member

Using display scaling (e.g. 150% in Windows 10), text content within popups were being truncated.
A couple examples:
image

image

This is a result of a known Java bug (https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8199592) which mentions a workaround:

explicitly calling sizeToScene appears to suppress the bug at DPI levels other than 175%

I confirmed that this workaround fixes the truncation at 125% and 150% scaling, but noticed it still truncates the checkbox label at 175% (as stated in the workaround):
image

…ls (JDK-8199592)

As per the workaround mentioned in https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8199592, explicitly calling sizeToScene appears to suppress the bug at DPI levels other than 175%.
@ManfredKarrer
Copy link
Contributor

Ah cool! The checkbox issue might be because the method is called after the checkbox has been rendered. can u try to apply that as early as possible and check with breakpoints if the checkbox gets created before or ater that?

@ManfredKarrer
Copy link
Contributor

Ah just saw in the code that this is not possible. The display(); is claled after the addContent(); where the checkbox gets created. But still wondering why it then applies on the other text. Maybe its because we use AutoTooltipCheckBox? @ripcurlx Do you have any idea?

@devinbileck
Copy link
Member Author

devinbileck commented Oct 12, 2018

There may not be anything we can do. As stated in the bug report, the workaround doesn’t work at all scaling levels. Or at least not at 175%.

@ManfredKarrer
Copy link
Contributor

I will leave merge to @ripcurlx, maybe he wants to check out why the checkbox is not working. From my side we can merge that as it is and postpone further improvement for later...

@ripcurlx
Copy link
Contributor

Hi @devinbileck! I'm just back from vacation and will have a look at your PRs today. Thanks for your investigation into this issue so far!

@ripcurlx
Copy link
Contributor

@devinbileck Unfortunately I somehow wasn't able to reproduce the bug on my Window 10 VM, but that could also be an issue with my local setup. Still I'll merge the PR as the changed code shouldn't do any harm, besides fixing this display scaling issue.

@ripcurlx ripcurlx merged commit 05c47ae into bisq-network:master Oct 16, 2018
@devinbileck devinbileck deleted the labels-truncated-with-display-scaling branch October 16, 2018 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants