1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-01-21 10:52:14 +01:00

[IDE] Title of sketch is misaligned on Linux (#10210)

Fix #10209
This commit is contained in:
Ricardo JL Rufino 2020-05-20 06:29:31 -03:00 committed by GitHub
parent 02a2e22649
commit cc65234582
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);