Skip to content

Commit

Permalink
[IDE] Title of sketch is misaligned on Linux (arduino#10210)
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardojlrufino authored May 20, 2020
1 parent 02a2e22 commit cc65234
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/src/processing/app/EditorHeader.java
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down Expand Up @@ -270,8 +271,8 @@ public void paintComponent(Graphics screen) {
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);
Expand Down

0 comments on commit cc65234

Please sign in to comment.