Skip to content

Commit cc65234

Browse files
[IDE] Title of sketch is misaligned on Linux (#10210)
Fix #10209
1 parent 02a2e22 commit cc65234

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: app/src/processing/app/EditorHeader.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ public class EditorHeader extends JComponent {
7373

7474
static final int PIECE_WIDTH = scale(4);
7575
static final int PIECE_HEIGHT = scale(33);
76+
static final int TAB_HEIGHT = scale(27);
7677

7778
// value for the size bars, buttons, etc
7879
// TODO: Should be a Theme value?
@@ -270,8 +271,8 @@ public void paintComponent(Graphics screen) {
270271
int textLeft = contentLeft + (pieceWidth - textWidth) / 2;
271272

272273
g.setColor(textColor[state]);
273-
int baseline = (sizeH + fontAscent) / 2;
274-
//g.drawString(sketch.code[i].name, textLeft, baseline);
274+
int tabMarginTop = sizeH - TAB_HEIGHT;
275+
int baseline = tabMarginTop + ((TAB_HEIGHT + fontAscent) / 2) ;
275276
g.drawString(text, textLeft, baseline);
276277

277278
g.drawImage(pieces[state][RIGHT], x, 0, null);

0 commit comments

Comments
 (0)