From cc652345823cdfcf4b46c4ceaec4da982fab6ba0 Mon Sep 17 00:00:00 2001 From: Ricardo JL Rufino Date: Wed, 20 May 2020 06:29:31 -0300 Subject: [PATCH] [IDE] Title of sketch is misaligned on Linux (#10210) Fix #10209 --- app/src/processing/app/EditorHeader.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/processing/app/EditorHeader.java b/app/src/processing/app/EditorHeader.java index 25c09a8df..c5695cf8a 100644 --- a/app/src/processing/app/EditorHeader.java +++ b/app/src/processing/app/EditorHeader.java @@ -73,6 +73,7 @@ public class EditorHeader extends JComponent { static final int PIECE_WIDTH = scale(4); static final int PIECE_HEIGHT = scale(33); + static final int TAB_HEIGHT = scale(27); // value for the size bars, buttons, etc // TODO: Should be a Theme value? @@ -270,8 +271,8 @@ public class EditorHeader extends JComponent { int textLeft = contentLeft + (pieceWidth - textWidth) / 2; g.setColor(textColor[state]); - int baseline = (sizeH + fontAscent) / 2; - //g.drawString(sketch.code[i].name, textLeft, baseline); + int tabMarginTop = sizeH - TAB_HEIGHT; + int baseline = tabMarginTop + ((TAB_HEIGHT + fontAscent) / 2) ; g.drawString(text, textLeft, baseline); g.drawImage(pieces[state][RIGHT], x, 0, null);