Skip to content

Commit 1fc33b1

Browse files
Add styling BOLD_RESET_FG (black un Jupyter Lab, white un VSCode)
Change use of BOLD_BLACK_FG to BOLD_RESET_FG for improved visibility
1 parent 1fbe234 commit 1fc33b1

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

jjava/src/main/java/org/dflib/jjava/JavaKernel.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,12 @@ public JavaKernel(String version) {
146146
);
147147

148148
this.errorStyler = new StringStyler.Builder()
149-
.addPrimaryStyle(TextColor.BOLD_BLACK_FG)
149+
.addPrimaryStyle(TextColor.BOLD_RESET_FG)
150150
.addSecondaryStyle(TextColor.BOLD_RED_FG)
151-
.addHighlightStyle(TextColor.BOLD_BLACK_FG)
151+
.addHighlightStyle(TextColor.BOLD_RESET_FG)
152152
.addHighlightStyle(TextColor.RED_BG)
153153
//TODO map snippet ids to code cells and put the proper line number in the margin here
154-
.withLinePrefix(TextColor.BOLD_BLACK_FG + "| ")
154+
.withLinePrefix(TextColor.BOLD_RESET_FG + "| ")
155155
.build();
156156

157157
this.mavenResolver.initImplicitExtensions();

jupyter-jvm-basekernel/src/main/java/org/dflib/jjava/jupyter/kernel/BaseKernel.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ public BaseKernel(Charset charset) {
107107
Text.registerAll(this.renderer);
108108

109109
this.errorStyler = new StringStyler.Builder()
110-
.addPrimaryStyle(TextColor.BOLD_BLACK_FG)
110+
.addPrimaryStyle(TextColor.BOLD_RESET_FG)
111111
.addSecondaryStyle(TextColor.BOLD_RED_FG)
112-
.addHighlightStyle(TextColor.BOLD_BLACK_FG)
112+
.addHighlightStyle(TextColor.BOLD_RESET_FG)
113113
.addHighlightStyle(TextColor.RED_BG)
114114
.build();
115115
}

jupyter-jvm-basekernel/src/main/java/org/dflib/jjava/jupyter/kernel/util/TextColor.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ public enum TextColor {
3232
WHITE_BG(47),
3333
RESET_BG(49),
3434

35+
BOLD_RESET_FG(39, 1),
36+
3537
BOLD(1),
3638
UNDERLINE(4),
3739
SWAP_FG_BG(7),

0 commit comments

Comments
 (0)