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

Merged
merged 1 commit into from Oct 16, 2018

Conversation

Projects
None yet
3 participants
@devinbileck
Member

devinbileck commented Oct 11, 2018

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

Workaround for labels being truncated at certain display scaling leve…
…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

This comment has been minimized.

Member

ManfredKarrer commented Oct 11, 2018

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

This comment has been minimized.

Member

ManfredKarrer commented Oct 11, 2018

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

This comment has been minimized.

Member

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

This comment has been minimized.

Member

ManfredKarrer commented Oct 12, 2018

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

This comment has been minimized.

Member

ripcurlx commented Oct 16, 2018

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

This comment has been minimized.

Member

ripcurlx commented Oct 16, 2018

@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

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@devinbileck devinbileck deleted the devinbileck:labels-truncated-with-display-scaling branch Oct 16, 2018

@devinbileck devinbileck referenced this pull request Oct 30, 2018

Closed

For October 2018 #147

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