Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import javafx.scene.paint.Paint;
import javafx.scene.text.Font;
import javafx.scene.text.FontPosture;
import javafx.scene.text.FontWeight;

import org.reactfx.collection.LiveList;
import org.reactfx.value.Val;
Expand All @@ -29,10 +30,9 @@ public class LineNumberFactory<PS> implements IntFunction<Node> {

private static final Insets DEFAULT_INSETS = new Insets(0.0, 5.0, 0.0, 5.0);
private static final Paint DEFAULT_TEXT_FILL = Color.web("#666");
private static final Font DEFAULT_FONT =
Font.font("monospace", FontPosture.ITALIC, 13);
private static final Background DEFAULT_BACKGROUND =
new Background(new BackgroundFill(Color.web("#ddd"), null, null));
private static final Font DEFAULT_FONT = Font.font("monospace", FontPosture.ITALIC, 13);
private static final Font DEFAULT_FOLD_FONT = Font.font("monospace", FontWeight.BOLD, 13);
private static final Background DEFAULT_BACKGROUND = new Background(new BackgroundFill(Color.web("#ddd"), null, null));

public static IntFunction<Node> get(GenericStyledArea<?, ?, ?> area) {
return get(area, digits -> "%1$" + digits + "s");
Expand Down Expand Up @@ -113,7 +113,8 @@ public Node apply(int idx) {
if ( isFoldedCheck != null )
{
Label foldIndicator = new Label( " " );
foldIndicator.setTextFill( DEFAULT_TEXT_FILL ); // Prevents CSS errors
foldIndicator.setTextFill( Color.BLUE ); // Prevents CSS errors
foldIndicator.setFont( DEFAULT_FOLD_FONT );

lineNo.setContentDisplay( ContentDisplay.RIGHT );
lineNo.setGraphic( foldIndicator );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,3 @@

/* For folding/hiding paragraphs. It's applied to TextFlow. */
.collapse { visibility: collapse; }

/* For LineNumberFactory, it's applied to Label. */
.fold-indicator {
-fx-font-weight: bold;
-fx-text-fill: blue;
}