Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 383305
Collapse All | Expand All

(-)a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderRenderer.java (-2 / +5 lines)
Lines 7-12 Link Here
7
 *
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 *     Tristan Hume - <trishume@gmail.com> - Fix for Bug 383305 - [10.8]Font size incorrect when running in Retina
10
 *******************************************************************************/
11
 *******************************************************************************/
11
package org.eclipse.swt.custom;
12
package org.eclipse.swt.custom;
12
13
Lines 79-84 Link Here
79
	static final int[] SIMPLE_BOTTOM_RIGHT_CORNER_BORDERLESS = new int[] {-4,0, -3,-1, -2,-2, -1,-3};
80
	static final int[] SIMPLE_BOTTOM_RIGHT_CORNER_BORDERLESS = new int[] {-4,0, -3,-1, -2,-2, -1,-3};
80
	
81
	
81
	static final RGB CLOSE_FILL = new RGB(252, 160, 160);
82
	static final RGB CLOSE_FILL = new RGB(252, 160, 160);
83
	
84
	static final int CHEVRON_COUNT_FONT_SIZE = 10;
82
	
85
	
83
	static final int BUTTON_SIZE = 16;
86
	static final int BUTTON_SIZE = 16;
84
	static final int BUTTON_TRIM = 1;
87
	static final int BUTTON_TRIM = 1;
Lines 841-850 Link Here
841
		// draw chevron (10x7)
844
		// draw chevron (10x7)
842
		Display display = parent.getDisplay();
845
		Display display = parent.getDisplay();
843
		Point dpi = display.getDPI();
846
		Point dpi = display.getDPI();
844
		int fontHeight = 72 * 10 / dpi.y;
845
		FontData fd = parent.getFont().getFontData()[0];
847
		FontData fd = parent.getFont().getFontData()[0];
846
		fd.setHeight(fontHeight);
848
		fd.setHeight(CHEVRON_COUNT_FONT_SIZE);
847
		Font f = new Font(display, fd);
849
		Font f = new Font(display, fd);
850
		// get font height in pixels
848
		int fHeight = f.getFontData()[0].getHeight() * dpi.y / 72;
851
		int fHeight = f.getFontData()[0].getHeight() * dpi.y / 72;
849
		int indent = Math.max(2, (chevronRect.height - fHeight - 4) /2);
852
		int indent = Math.max(2, (chevronRect.height - fHeight - 4) /2);
850
		int x = chevronRect.x + 2;
853
		int x = chevronRect.x + 2;

Return to bug 383305