[Editor] Create common Code Editor stylesheet
This commit is contained in:
@@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,7 +4,7 @@ import javafx.scene.text.FontPosture
|
|||||||
import javafx.scene.text.FontWeight
|
import javafx.scene.text.FontWeight
|
||||||
import tornadofx.*
|
import tornadofx.*
|
||||||
|
|
||||||
class JavaSyntaxHighlightingStylesheet : Stylesheet() {
|
class JavaSyntaxHighlightingStylesheet : CodeEditorStylesheet() {
|
||||||
companion object {
|
companion object {
|
||||||
val keyword by cssclass()
|
val keyword by cssclass()
|
||||||
val semicolon by cssclass()
|
val semicolon by cssclass()
|
||||||
|
|||||||
@@ -3,10 +3,13 @@ package com.bartlomiejpluta.base.editor.code.stylesheet
|
|||||||
import javafx.scene.paint.Color
|
import javafx.scene.paint.Color
|
||||||
import javafx.scene.text.FontPosture
|
import javafx.scene.text.FontPosture
|
||||||
import javafx.scene.text.FontWeight
|
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 {
|
companion object {
|
||||||
val prolog by cssclass()
|
val prolog by cssclass()
|
||||||
val namespace by cssclass()
|
val namespace by cssclass()
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ class ObjectPaintingCursor(
|
|||||||
) : PaintingCursor {
|
) : PaintingCursor {
|
||||||
|
|
||||||
override fun render(gc: GraphicsContext) {
|
override fun render(gc: GraphicsContext) {
|
||||||
brushVM.forEach { row, column, centerRow, centerColumn, tile ->
|
brushVM.forEach { row, column, centerRow, centerColumn, _ ->
|
||||||
renderTile(gc, row, column, centerRow, centerColumn)
|
renderTile(gc, row, column, centerRow, centerColumn)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user