Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiraj Modi2016-07-26 06:36:29 +0000
committerNiraj Modi2016-07-26 06:36:29 +0000
commit0e6a5d06a69e214aeb8d6fd2929bc62f08e37dad (patch)
tree698af2738fd6d71a32ee60224bf8351e1b41e356
parent8824d0d5dfacde49420e05024c1be3d712e17d47 (diff)
downloadeclipse.platform.swt-0e6a5d06a69e214aeb8d6fd2929bc62f08e37dad.tar.gz
eclipse.platform.swt-0e6a5d06a69e214aeb8d6fd2929bc62f08e37dad.tar.xz
eclipse.platform.swt-0e6a5d06a69e214aeb8d6fd2929bc62f08e37dad.zip
Bug 497068 - [HiDPI][Win32] Header of expandItems does not scale
correctly at high DPI Change-Id: Iecb998bb1032d5e40a7751ffed0285480102c618 Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java
index 789ff0f822..10dc4e1b8a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -313,9 +313,8 @@ Control findThemeControl () {
}
int getBandHeight () {
- if (hFont == 0) return ExpandItem.CHEVRON_SIZE;
long /*int*/ hDC = OS.GetDC (handle);
- long /*int*/ oldHFont = OS.SelectObject (hDC, hFont);
+ long /*int*/ oldHFont = OS.SelectObject (hDC, hFont == 0 ? defaultFont () : hFont);
TEXTMETRIC lptm = OS.IsUnicode ? (TEXTMETRIC)new TEXTMETRICW() : new TEXTMETRICA();
OS.GetTextMetrics (hDC, lptm);
OS.SelectObject (hDC, oldHFont);

Back to the top