Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 497068

Summary: [HiDPI][Win32] Header of expandItems does not scale correctly at high DPI
Product: [Eclipse Project] Platform Reporter: Dominik Gabriel <d.gabriel>
Component: SWTAssignee: Niraj Modi <niraj.modi>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ericwill, lshanmug, niraj.modi
Version: 4.6Flags: lshanmug: review+
Target Milestone: 4.6.1   
Hardware: PC   
OS: Windows All   
See Also: https://git.eclipse.org/r/77876
https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=0e6a5d06a69e214aeb8d6fd2929bc62f08e37dad
Whiteboard:
Bug Depends on:    
Bug Blocks: 495269    
Attachments:
Description Flags
expandItems at 225% dpi scale on W10 none

Description Dominik Gabriel CLA 2016-06-30 05:33:36 EDT
Created attachment 262811 [details]
expandItems at 225% dpi scale on W10

Many Controls got scaled correct with the neon update but the header of the expandItem doesn't scale correct yet. see the screenshot
Comment 1 Niraj Modi CLA 2016-07-22 06:52:53 EDT
(In reply to Dominik Gabriel from comment #0)
> Created attachment 262811 [details]
> expandItems at 225% dpi scale on W10
> 
> Many Controls got scaled correct with the neon update but the header of the
> expandItem doesn't scale correct yet. see the screenshot

Can reproduce the problem on Win7@225% DPI settings.
Comment 2 Niraj Modi CLA 2016-07-26 02:36:17 EDT
Reason for this problem:
When there is no custom font set for ExpandBar/ExpandItem header, then ExpandBar#getBandHeight() would return ExpandItem.CHEVRON_SIZE which is a constant value i.e. '24'. This header height would not be sufficient if the OS zoom level is more than 200% and text/icons crosses the header border.

Proposed solution:
When no custom font is set.. instead of using fixed value '24' use System's defaultFont() to calculate ExpandBar#getBandHeight()

Will share a gerrit shortly.
Comment 3 Eclipse Genie CLA 2016-07-26 02:37:08 EDT
New Gerrit change created: https://git.eclipse.org/r/77876
Comment 6 Niraj Modi CLA 2016-07-28 02:47:33 EDT
Verified fix in I-Build: I20160726-1400 and M-Build: M20160727-1700 on Win7.