Skip to content

Commit

Permalink
minor codearea UX tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Mucha committed Feb 29, 2024
1 parent 94178e6 commit ba048c5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion milkman/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
<dependency>
<groupId>org.fxmisc.richtext</groupId>
<artifactId>richtextfx</artifactId>
<version>0.11.0</version>
<version>0.11.2</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import org.apache.commons.lang3.SystemUtils;
import org.apache.commons.lang3.time.StopWatch;
import org.fxmisc.flowless.VirtualizedScrollPane;
import org.fxmisc.richtext.Caret;
import org.fxmisc.richtext.CodeArea;
import org.fxmisc.richtext.LineNumberFactory;
import org.fxmisc.richtext.model.StyleSpans;
Expand Down Expand Up @@ -113,6 +114,8 @@ public ContentEditor() {

private void setupCodeArea() {
codeArea = new CodeArea();
//always show caret, even for non-editable
codeArea.setShowCaret(Caret.CaretVisibility.ON);
// codeArea.setWrapText(true);
setupParagraphGraphics();
EventStream<Object> highLightTrigger = EventStreams.merge(codeArea.multiPlainChanges(),
Expand Down
4 changes: 4 additions & 0 deletions milkman/src/main/sass/themes/_template-dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,10 @@
.code-area {
-fx-text-fill: $foreground;
-fx-background-color: darken($background, 10%);

.caret {
-fx-stroke: $foreground;
}
}
.list-cell {
-fx-text-fill: $foreground;
Expand Down

0 comments on commit ba048c5

Please sign in to comment.