-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Description
The CTabFolder trim is calculated using some magic numbers represented in points which can have adverse effect when scaled to pixels. Hence, it should be calculated in pixels and then converted into points using OfFloat variants to preserve inversibility.
Currently if we resize a CtabFolder (e.g. the project explorer tab), here's how the flow works:
- CTabFolder receives WM_SIZE callback and calls updateLayout.
- This calls CTabFolderLayout.layout.
- CTabFolderLayout.layout -> CTabFolder.getClientArea.
Inside getClientArea, there's a call to find the trim using renderer.computeTrim with zero width and height to find the padding. It uses CTabRendering as a renderer. Hence, the call: renderer.computeTrim(CTabFolderRenderer.PART_BODY, SWT.FILL, 0, 0, 0, 0); is just a hack to obtain the padding. We need a better way to find the padding instead.
Update: Inside the computeTrim method, the paddings are added as magic numbers and they didnot scale properly on fractional scaling factors in the past but, since now we have better scaling, could it be possible that we have circumvented this problem since now these values scale properly with the new implementation in DPIUtils.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status