[Editor] Create common Code Editor stylesheet

This commit is contained in:
2021-03-16 09:01:07 +01:00
parent 9fcdfdaf92
commit b499c44f3d
4 changed files with 26 additions and 4 deletions

View File

@@ -0,0 +1,19 @@
package com.bartlomiejpluta.base.editor.code.stylesheet
import javafx.scene.text.FontWeight
import tornadofx.Stylesheet
import tornadofx.cssclass
import tornadofx.px
open class CodeEditorStylesheet : Stylesheet() {
companion object {
val paragraphText by cssclass()
}
init {
paragraphText {
fontSize = 14.px
fontWeight = FontWeight.MEDIUM
}
}
}

View File

@@ -4,7 +4,7 @@ import javafx.scene.text.FontPosture
import javafx.scene.text.FontWeight
import tornadofx.*
class JavaSyntaxHighlightingStylesheet : Stylesheet() {
class JavaSyntaxHighlightingStylesheet : CodeEditorStylesheet() {
companion object {
val keyword by cssclass()
val semicolon by cssclass()

View File

@@ -3,10 +3,13 @@ package com.bartlomiejpluta.base.editor.code.stylesheet
import javafx.scene.paint.Color
import javafx.scene.text.FontPosture
import javafx.scene.text.FontWeight
import tornadofx.*
import tornadofx.c
import tornadofx.cssclass
import tornadofx.cssproperty
import tornadofx.csspseudoclass
class XmlSyntaxHighlightingStylesheet : Stylesheet() {
class XmlSyntaxHighlightingStylesheet : CodeEditorStylesheet() {
companion object {
val prolog by cssclass()
val namespace by cssclass()

View File

@@ -14,7 +14,7 @@ class ObjectPaintingCursor(
) : PaintingCursor {
override fun render(gc: GraphicsContext) {
brushVM.forEach { row, column, centerRow, centerColumn, tile ->
brushVM.forEach { row, column, centerRow, centerColumn, _ ->
renderTile(gc, row, column, centerRow, centerColumn)
}
}