diff options
author | Niraj Modi | 2016-07-26 06:36:29 +0000 |
---|---|---|
committer | Niraj Modi | 2016-07-27 08:25:26 +0000 |
commit | 9c797c597e669a10338246bf2f67349381927f13 (patch) | |
tree | 3cb73674d404119d11dde9d4ad83642ac4b0f480 | |
parent | b33e507cb82e62b9eb1ff33e2832ec34cd500c53 (diff) | |
download | eclipse.platform.swt-9c797c597e669a10338246bf2f67349381927f13.tar.gz eclipse.platform.swt-9c797c597e669a10338246bf2f67349381927f13.tar.xz eclipse.platform.swt-9c797c597e669a10338246bf2f67349381927f13.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.java | 5 |
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); |