Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiraj Modi2016-03-12 07:14:49 +0000
committerNiraj Modi2016-03-12 07:14:49 +0000
commite02d49aefe42ac4c77b81048299ab069ddb5c2ba (patch)
treeee78920992cfda51890cca0bf5fb394c876add83 /bundles/org.eclipse.swt/Eclipse SWT AWT
parentf50994fe9b815dddd13700087e2289575a82e8b7 (diff)
downloadeclipse.platform.swt-e02d49aefe42ac4c77b81048299ab069ddb5c2ba.tar.gz
eclipse.platform.swt-e02d49aefe42ac4c77b81048299ab069ddb5c2ba.tar.xz
eclipse.platform.swt-e02d49aefe42ac4c77b81048299ab069ddb5c2ba.zip
Bug 479614 - [Graphics] HiDPI support for eclipse platform
- Windows changes Change-Id: I9cd0004d57a2a3a2a956a71de91b10af560c08a7 Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT AWT')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT AWT/win32/org/eclipse/swt/awt/SWT_AWT.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT AWT/win32/org/eclipse/swt/awt/SWT_AWT.java b/bundles/org.eclipse.swt/Eclipse SWT AWT/win32/org/eclipse/swt/awt/SWT_AWT.java
index 66c684d799..35cc62c76b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT AWT/win32/org/eclipse/swt/awt/SWT_AWT.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT AWT/win32/org/eclipse/swt/awt/SWT_AWT.java
@@ -18,6 +18,7 @@ import java.lang.reflect.*;
/* SWT Imports */
import org.eclipse.swt.*;
+import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.win32.*;
@@ -303,7 +304,7 @@ public static Frame new_Frame (final Composite parent) {
@Override
public void run () {
if (parent.isDisposed()) return;
- final Rectangle clientArea = parent.getClientArea();
+ final Rectangle clientArea = DPIUtil.autoScaleUp(parent.getClientArea()); // To Pixels
EventQueue.invokeLater(new Runnable () {
@Override
public void run () {
@@ -353,7 +354,7 @@ public static Shell new_Shell (final Display display, final Canvas parent) {
public void run () {
if (shell.isDisposed()) return;
Dimension dim = parent.getSize ();
- shell.setSize (dim.width, dim.height);
+ shell.setSize(DPIUtil.autoScaleDown(new Point(dim.width, dim.height))); // To Points
}
});
}

Back to the top