修改行标像素

This commit is contained in:
许轲 2023-08-20 23:40:01 +08:00
parent 200c090887
commit d4d7cdfc68

View File

@ -50,7 +50,7 @@ public class LineNumberTextArea extends BorderPane {
} }
} }
//单数字宽度10像素4为padding=左3+右1 //单数字宽度10像素4为padding=左3+右1
int actualWidth = Math.max(count * 10 + 8, MIN_LINE_NUMBER_WIDTH); int actualWidth = Math.max(count * 10 + 11, MIN_LINE_NUMBER_WIDTH);
if (actualWidth != lineNumberArea.getWidth()) { if (actualWidth != lineNumberArea.getWidth()) {
lineNumberArea.setPrefWidth(actualWidth); lineNumberArea.setPrefWidth(actualWidth);
} }