diff options
author | Sravan Kumar Lakkimsetti | 2016-03-12 07:16:42 +0000 |
---|---|---|
committer | Niraj Modi | 2016-03-12 07:16:42 +0000 |
commit | 14734beab7b7b915783fb9d21c16ed3bd253062b (patch) | |
tree | 4788c3249ce352cff9e03b930bf239559be05810 /bundles/org.eclipse.swt/Eclipse SWT AWT | |
parent | e02d49aefe42ac4c77b81048299ab069ddb5c2ba (diff) | |
download | eclipse.platform.swt-14734beab7b7b915783fb9d21c16ed3bd253062b.tar.gz eclipse.platform.swt-14734beab7b7b915783fb9d21c16ed3bd253062b.tar.xz eclipse.platform.swt-14734beab7b7b915783fb9d21c16ed3bd253062b.zip |
Bug 479614 - [Graphics] HiDPI support for eclipse platform
- GTK changes.
Change-Id: Idcc8e547f7fcca3e6c415b69e30ee6d1edf0cb6c
Signed-off-by: Sravan Kumar Lakkimsetti <sravankumarl@in.ibm.com>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT AWT')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java b/bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java index 9852f995f3..b3b0d42c97 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java +++ b/bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java @@ -19,6 +19,7 @@ import java.lang.reflect.*; /* SWT Imports */ import org.eclipse.swt.*; import org.eclipse.swt.graphics.*; +import org.eclipse.swt.graphics.Point; import org.eclipse.swt.graphics.Rectangle; import org.eclipse.swt.internal.*; import org.eclipse.swt.internal.gtk.*; @@ -249,7 +250,7 @@ public static Frame new_Frame (final Composite parent) { }); break; case SWT.Resize: - final Rectangle clientArea = parent.getClientArea(); + final Rectangle clientArea = DPIUtil.autoScaleUp(parent.getClientArea()); EventQueue.invokeLater(new Runnable () { @Override public void run () { @@ -267,7 +268,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()); EventQueue.invokeLater(new Runnable () { @Override public void run () { @@ -317,7 +318,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))); } }); } |