Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSravan Kumar Lakkimsetti2019-07-22 08:39:07 +0000
committerNiraj Modi2019-07-23 07:02:23 +0000
commit630f371c0cc4e13a2f579468bee859bdd2b0c20f (patch)
treef5dce1909e4fcf2be6d9cbae31c25039a92a96c9
parent3f4ba4829811a53d8db59b35fed6a7d8a078aca9 (diff)
downloadeclipse.platform.swt-630f371c0cc4e13a2f579468bee859bdd2b0c20f.tar.gz
eclipse.platform.swt-630f371c0cc4e13a2f579468bee859bdd2b0c20f.tar.xz
eclipse.platform.swt-630f371c0cc4e13a2f579468bee859bdd2b0c20f.zip
Bug 496849 - [HiDPI] TreeViewer with columns and scaled image draws text
over image from first indented item - fixes initial size issue with owner draw Change-Id: Ib326e9811e5fd78063a0d9c01e44b9dabea6dbba Signed-off-by: Sravan Kumar Lakkimsetti <sravankumarl@in.ibm.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java
index 197c856f05..d67efbbcc9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java
@@ -1222,7 +1222,7 @@ public void setImage (int index, Image image) {
* add imageList.getPixbuf returns resized pixbuf.
*/
- if ((!parent.ownerDraw) && (DPIUtil.getDeviceZoom() != 100)) {
+ if ((DPIUtil.getDeviceZoom() != 100)) {
Rectangle imgSize = image.getBounds();
long scaledPixbuf = GDK.gdk_pixbuf_scale_simple(pixbuf, imgSize.width, imgSize.height, GDK.GDK_INTERP_BILINEAR);
if (scaledPixbuf !=0) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java
index 4a49ba02bb..a9fc6fc845 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java
@@ -1559,7 +1559,7 @@ public void setImage (int index, Image image) {
* the image is added to the imagelist in this call. If the image is already
* add imageList.getPixbuf returns resized pixbuf.
*/
- if ((!parent.ownerDraw) && (image != null) && (DPIUtil.getDeviceZoom() != 100)) {
+ if (DPIUtil.getDeviceZoom() != 100) {
Rectangle imgSize = image.getBounds();
long scaledPixbuf = GDK.gdk_pixbuf_scale_simple(pixbuf, imgSize.width, imgSize.height, GDK.GDK_INTERP_BILINEAR);
if (scaledPixbuf !=0) {

Back to the top