Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSravan Kumar Lakkimsetti2016-02-11 11:51:54 +0000
committerSravan Kumar Lakkimsetti2016-02-22 11:00:57 +0000
commitacc3aad22de4e9ad78274eb6e8ec760f1ee4c7c2 (patch)
treefd84265b018a1a2a7b566e3a01a444719a1b3e7f /bundles/org.eclipse.swt/Eclipse SWT AWT
parent0cc28848a42b0c7116a7152ca9afae53c20146ef (diff)
downloadeclipse.platform.swt-acc3aad22de4e9ad78274eb6e8ec760f1ee4c7c2.tar.gz
eclipse.platform.swt-acc3aad22de4e9ad78274eb6e8ec760f1ee4c7c2.tar.xz
eclipse.platform.swt-acc3aad22de4e9ad78274eb6e8ec760f1ee4c7c2.zip
Bug 399786 - GC#draw*(..) needs to support
high-DPI Change-Id: Ibf39177432c1c29506d9226cabf65a6a16d39931 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.java7
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)));
}
});
}

Back to the top