Skip to content

Commit a77b473

Browse files
Review Comments
1 parent afcaae9 commit a77b473

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderRenderer.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ public class CTabFolderRenderer {
102102
static final int FLAGS = SWT.DRAW_TRANSPARENT | SWT.DRAW_MNEMONIC | SWT.DRAW_DELIMITER;
103103
static final String ELLIPSIS = "..."; //$NON-NLS-1$
104104
private static final String CHEVRON_ELLIPSIS = "99+"; //$NON-NLS-1$
105-
private static final int CHEVRON_FONT_HEIGHT = 10;
105+
private static final float CHEVRON_FONT_SIZE_FACTOR = 0.7f;
106+
private static final int CHEVRON_BOTTOM_INDENT = 4;
106107

107108
//Part constants
108109
/**
@@ -926,7 +927,7 @@ void drawChevron(GC gc, Rectangle chevronRect, int chevronImageState) {
926927
Display display = parent.getDisplay();
927928
Font font = getChevronFont(display);
928929
int fontHeight = font.getFontData()[0].getHeight();
929-
int indent = Math.max(2, (chevronRect.height - fontHeight - 8) /2);
930+
int indent = Math.max(2, (chevronRect.height - fontHeight - CHEVRON_BOTTOM_INDENT) /2);
930931
int x = chevronRect.x + 2;
931932
int y = chevronRect.y + indent;
932933
int count = parent.getChevronCount();
@@ -1697,7 +1698,7 @@ Color getFillColor() {
16971698
private Font getChevronFont(Display display) {
16981699
if (chevronFont == null) {
16991700
FontData fd = parent.getFont().getFontData()[0];
1700-
int fontHeight = (int) (fd.height * 0.7);
1701+
int fontHeight = (int) (fd.height * CHEVRON_FONT_SIZE_FACTOR);
17011702
fd.setHeight(fontHeight);
17021703
chevronFont = new Font(display, fd);
17031704
}

0 commit comments

Comments
 (0)