| Summary: | [HiDPI] autoScale wrongly applies to Printer devices on Windows | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Philippe Detournay <theplouf> | ||||||
| Component: | SWT | Assignee: | Niraj Modi <niraj.modi> | ||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | lshanmug, markus.kell.r, niraj.modi, peter, theplouf | ||||||
| Version: | 4.6 | Flags: | lshanmug:
review+
|
||||||
| Target Milestone: | 4.6.1 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows All | ||||||||
| See Also: |
https://git.eclipse.org/r/77672 https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=d254df524a6ee0e2d474363527d42b9d5601b61a |
||||||||
| Whiteboard: | |||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 495269 | ||||||||
| Attachments: |
|
||||||||
|
Description
Philippe Detournay
Can you please attach a snippet to show the problem? Sravan, please investigate. Created attachment 263185 [details]
Reproduction
Reproduction of the problem on a Windows 10 with OS screen setting set to 150%, and having a default printer with paper size A4 (210mm x 297mm). Before getting the default display the paper size is correctly computed to 210x297, but once the default display is initialized then the paper size is 140x198.
(In reply to Philippe Detournay from comment #2) > Created attachment 263185 [details] Thanks Philippe for the test snippet, I can reproduce the problem on Win7 as well. Created attachment 263236 [details]
Updated TestSnippet
Apart from Printer#getBounds() method, problem is also seen with Printer#getClientArea() method. Refer updated TestSnippet attached.
We don't need a AutoScale Up/Down for these two methods in Printer class, will share a gerrit patch shortly to fix this.
New Gerrit change created: https://git.eclipse.org/r/77672 Gerrit change https://git.eclipse.org/r/77672 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=d254df524a6ee0e2d474363527d42b9d5601b61a Will the local change in the Printer class also affect the operations on GC's created on this Printer? I would imagine that graphical primitives sent to Printer GC's should also not be affected by the autoscaling. FYI I tested on Ubuntu 16.04 64 (GTK): the bug is not there. So this appears to be Windows-only so far. Fix back-ported to 4.6.1 via below git commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?h=R4_6_maintenance&id=b33e507cb82e62b9eb1ff33e2832ec34cd500c53 Resolving this bug. (In reply to Philippe Detournay from comment #7) > Will the local change in the Printer class also affect the operations on > GC's created on this Printer? I would imagine that graphical primitives sent > to Printer GC's should also not be affected by the autoscaling. Please see bug 498876 Verified fix in 4.7 M1 I-Build: I20160801-2000 on Win7. Verified fix in 4.6.1 M-Build: M20160803-1700 on Win7. |