Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikita Nemkin2018-05-02 06:08:04 -0400
committerLars Vogel2018-05-03 08:10:37 -0400
commit3b871dbaca01b0bfa4dade0a4713684d07f25402 (patch)
tree188ed36a93a802184baf8cfaea30eca1181d799d /bundles/org.eclipse.swt/Eclipse SWT/win32
parent91f56c5ce34cec783afce7b4b3a1121b034df6dc (diff)
downloadeclipse.platform.swt-3b871dbaca01b0bfa4dade0a4713684d07f25402.tar.gz
eclipse.platform.swt-3b871dbaca01b0bfa4dade0a4713684d07f25402.tar.xz
eclipse.platform.swt-3b871dbaca01b0bfa4dade0a4713684d07f25402.zip
Bug 480586 - [Win32][HiDPI] Tree expansion triangle issues
Fix tree glyph DPI scaling for trees without image list. Change-Id: I6d052eb08d6d33fde1690ff7c0e2c6d8dd690b92 Co-authored-by: Conrad Groth <info@conrad-groth.de> Signed-off-by: Nikita Nemkin <nikita@nemkin.ru>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
index 5386a5cbe6..eac9e367a3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
@@ -1893,6 +1893,15 @@ void createHandle () {
long /*int*/ hFont = OS.GetStockObject (OS.SYSTEM_FONT);
OS.SendMessage (handle, OS.WM_SETFONT, hFont, 0);
+ /*
+ * Bug in Windows. When image list is not set, tree glyph
+ * size is tied to tree indent. Indent doesn't automatically
+ * scale with DPI resulting in distorted glyph image
+ * at higher DPI settings.
+ */
+ int indent = DPIUtil.autoScaleUpUsingNativeDPI(16);
+ OS.SendMessage(handle, OS.TVM_SETINDENT, indent, 0);
+
createdAsRTL = (style & SWT.RIGHT_TO_LEFT) != 0;
}

Back to the top