Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 262161 Details for
Bug 495134
[HiDPI][Win32] Device#getDPI behaves differently between Linux and Windows with HiDPI screens
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
ScalingData.java (snippet to print DPI, monitor bounds, etc.)
ScalingData.java (text/plain), 1.23 KB, created by
Markus Keller
on 2016-06-01 09:21:46 EDT
(
hide
)
Description:
ScalingData.java (snippet to print DPI, monitor bounds, etc.)
Filename:
MIME Type:
Creator:
Markus Keller
Created:
2016-06-01 09:21:46 EDT
Size:
1.23 KB
patch
obsolete
>import org.eclipse.swt.SWT; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Monitor; >import org.eclipse.swt.widgets.Shell; > >public class ScalingData { > public static void main(String[] args) { > Display display = new Display(); > System.out.println("GDK_DPI_SCALE: " + System.getenv("GDK_DPI_SCALE")); > System.out.println("org.eclipse.swt.internal.deviceZoom: " + System.getProperty("org.eclipse.swt.internal.deviceZoom")); > System.out.println("org.eclipse.swt.internal.gtk.version: " + System.getProperty("org.eclipse.swt.internal.gtk.version")); > > System.out.println("display.getDPI(): " + display.getDPI()); > System.out.println("display.getBounds(): " + display.getBounds()); > System.out.println("display.getPrimaryMonitor().getBounds(): " + display.getPrimaryMonitor().getBounds()); > Monitor[] monitors = display.getMonitors(); > for (int i = 0; i < monitors.length; i++) { > Monitor monitor = monitors[i]; > System.out.println("display.getMonitors()[" + i + "].getBounds(): " + monitor.getBounds()); > } > Shell shell = new Shell(display, SWT.SHELL_TRIM); > shell.open(); > System.out.println("shell.getMonitor().getBounds(): " + shell.getMonitor().getBounds()); > > display.dispose(); > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 495134
: 262161 |
262167