-
Notifications
You must be signed in to change notification settings - Fork 143
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
Implementation of Text Layout to enable multi zoom level support for win32 #1244
Implementation of Text Layout to enable multi zoom level support for win32 #1244
Conversation
@HeikoKlare @fedejeanne @akoch-yatta Please have a look. |
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Font.java
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java
Outdated
Show resolved
Hide resolved
3fed80d
to
2366640
Compare
a7958bb
to
0abb65e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes are quite hard to review, so I am wondering whether we can split them up to reduce the (accidental) complexity. Would it be possible to split this up into two subsequent commits/PRs like:
- Replace the handling of
InPixel
values but still using DPIUtil's autoscale method - Replace the
autoScale
calls byscale
calls passing the actual zoom
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java
Outdated
Show resolved
Hide resolved
b64709e
to
fc50383
Compare
d8ae71c
to
8de0a67
Compare
54d9dd8
to
aadd1d9
Compare
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontMetrics.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java
Outdated
Show resolved
Hide resolved
...s/org.eclipse.swt.tests.win32/JUnit Tests/org/eclipse/swt/graphics/TextLayoutWin32Tests.java
Outdated
Show resolved
Hide resolved
...s/org.eclipse.swt.tests.win32/JUnit Tests/org/eclipse/swt/graphics/TextLayoutWin32Tests.java
Outdated
Show resolved
Hide resolved
Do you mean this one? #1236 (review) |
aadd1d9
to
586d805
Compare
Yeah sorry I deleted my comment and moved it to the image PR |
586d805
to
5ec74cb
Compare
All my comments have been addressed. This PR is ready to be tested, I'll do it in the afternoon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests are not running.
...s/org.eclipse.swt.tests.win32/JUnit Tests/org/eclipse/swt/graphics/TextLayoutWin32Tests.java
Outdated
Show resolved
Hide resolved
I tested this and I didn't find any regressions. As soon as the tests run in the suite (see #1244 (comment)) and all open comments from Heiko and Andreas have been marked as resolved, I will merge this PR. |
5ec74cb
to
3839910
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copyright header is missing.
I also restarted the build to see if the failed tests are fixed (see my response to #1244 (comment))
...s/org.eclipse.swt/Eclipse SWT Tests/win32/org/eclipse/swt/graphics/TextLayoutWin32Tests.java
Show resolved
Hide resolved
...s/org.eclipse.swt.tests.win32/JUnit Tests/org/eclipse/swt/graphics/TextLayoutWin32Tests.java
Outdated
Show resolved
Hide resolved
3839910
to
90e8456
Compare
This commit adds the support of scaling of text layout based on the zoom level of the monitor it is drawn on. It uses the native zoom which is provided by the GCData if available otherwise the zoom level set in the font (since the right font for a zoom level is computed already at the control level, so we always have the consistent zoom information). contributes to eclipse-platform#62 and eclipse-platform#127
90e8456
to
8c52ca4
Compare
This commit is a follow up to the PR eclipse-platform#1244 which improves the readability of the class TextLayout for win32. The field lineWidth is now renamed to lineWidthInPixels since the field represented the information in pixels. contributes to eclipse-platform#62 and eclipse-platform#127
This commit is a follow up to the PR eclipse-platform#1244 which improves the readability of the class TextLayout for win32. The field lineWidth is now renamed to lineWidthInPixels since the field represented the information in pixels. contributes to eclipse-platform#62 and eclipse-platform#127
Addressed issues
Requires
Note: Only the last commit in this PR is to be reviewed. Previous commit(s) belong to the prerequisite PR(s)
Description
This pull request is based on the implementations of PR #1243. This commit adds the support of scaling of text layout based on the zoom level of the monitor it is drawn on. It uses the native zoom which is provided by the GCData if available otherwise the zoom level set in the font (since the right font for a zoom level is computed already at the control level, so we always have the consistent zoom information).