◐ Shell
reader mode source ↗
Skip to content
Open
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
16 changes: 13 additions & 3 deletions java/src/processing/mode/java/pdex/JavaTextAreaPainter.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,22 @@ synchronized public void paint(Graphics gfx) {
}

// draw color boxes
for (ColorControlBox cBox: colorBoxes.get(currentTab)) {
int lineStartChar = textArea.getLineStartOffset(cBox.getLine());
int x = textArea.offsetToX(cBox.getLine(), cBox.getCharIndex() - lineStartChar);
int y = textArea.lineToY(cBox.getLine()) + fm.getDescent();
cBox.setPos(x, y+1);
cBox.draw(g2d);
}
}
}
Expand Down
Toggle all file notes Toggle all file annotations