mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-19 15:40:15 +08:00
color
This commit is contained in:
parent
97b566f60e
commit
6aa8f6a75b
@ -0,0 +1,15 @@
|
|||||||
|
package net.mamoe.mirai.console.graphical.styleSheet
|
||||||
|
|
||||||
|
import tornadofx.Stylesheet
|
||||||
|
import tornadofx.c
|
||||||
|
|
||||||
|
open class BaseStyleSheet : Stylesheet() {
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
const val primaryColor = "0EA987"
|
||||||
|
const val stressColor = "35867C"
|
||||||
|
const val secondaryColor = "32CABA"
|
||||||
|
const val lightColor ="9FD1CC"
|
||||||
|
const val FontColor = "FFFFFF"
|
||||||
|
}
|
||||||
|
}
|
@ -7,7 +7,7 @@ import javafx.scene.paint.Color
|
|||||||
import javafx.scene.text.FontWeight
|
import javafx.scene.text.FontWeight
|
||||||
import tornadofx.*
|
import tornadofx.*
|
||||||
|
|
||||||
class LoginViewStyleSheet : Stylesheet() {
|
class LoginViewStyleSheet : BaseStyleSheet() {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val vBox by csselement("VBox")
|
val vBox by csselement("VBox")
|
||||||
@ -15,11 +15,14 @@ class LoginViewStyleSheet : Stylesheet() {
|
|||||||
|
|
||||||
init {
|
init {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* center box
|
||||||
|
*/
|
||||||
vBox {
|
vBox {
|
||||||
maxWidth = 500.px
|
maxWidth = 500.px
|
||||||
maxHeight = 500.px
|
maxHeight = 500.px
|
||||||
|
|
||||||
backgroundColor += c("39c5BB", 0.3)
|
backgroundColor += c(primaryColor, 0.3)
|
||||||
backgroundRadius += box(15.px)
|
backgroundRadius += box(15.px)
|
||||||
|
|
||||||
padding = box(50.px, 100.px)
|
padding = box(50.px, 100.px)
|
||||||
@ -35,8 +38,11 @@ class LoginViewStyleSheet : Stylesheet() {
|
|||||||
fontWeight = FontWeight.BOLD
|
fontWeight = FontWeight.BOLD
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* login button
|
||||||
|
*/
|
||||||
button {
|
button {
|
||||||
backgroundColor += c("00BCD4", 0.8)
|
backgroundColor += c(stressColor, 0.8)
|
||||||
padding = box(10.px, 0.px)
|
padding = box(10.px, 0.px)
|
||||||
prefWidth = 500.px
|
prefWidth = 500.px
|
||||||
textFill = Color.WHITE
|
textFill = Color.WHITE
|
||||||
|
@ -1,21 +1,39 @@
|
|||||||
package net.mamoe.mirai.console.graphical.styleSheet
|
package net.mamoe.mirai.console.graphical.styleSheet
|
||||||
|
|
||||||
import tornadofx.*
|
import tornadofx.box
|
||||||
|
import tornadofx.c
|
||||||
|
import tornadofx.cssclass
|
||||||
|
import tornadofx.px
|
||||||
|
|
||||||
class PrimaryStyleSheet : Stylesheet() {
|
class PrimaryStyleSheet : BaseStyleSheet() {
|
||||||
companion object {
|
companion object {
|
||||||
|
// window
|
||||||
val jfxTitle by cssclass("jfx-decorator-buttons-container")
|
val jfxTitle by cssclass("jfx-decorator-buttons-container")
|
||||||
val container by cssclass("jfx-decorator-content-container")
|
val container by cssclass("jfx-decorator-content-container")
|
||||||
|
|
||||||
|
// tab
|
||||||
|
val tabPane by cssclass("tab-header-background")
|
||||||
}
|
}
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
/*
|
||||||
|
* window
|
||||||
|
*/
|
||||||
jfxTitle {
|
jfxTitle {
|
||||||
backgroundColor += c("00BCD4")
|
backgroundColor += c(primaryColor)
|
||||||
}
|
}
|
||||||
|
|
||||||
container {
|
container {
|
||||||
borderColor += box(c("00BCD4"))
|
borderColor += box(c(primaryColor))
|
||||||
borderWidth += box(0.px, 4.px, 4.px, 4.px)
|
borderWidth += box(0.px, 4.px, 4.px, 4.px)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* tab pane
|
||||||
|
*/
|
||||||
|
tabPane {
|
||||||
|
backgroundColor += c(primaryColor)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -23,7 +23,9 @@ class PrimaryView : View() {
|
|||||||
|
|
||||||
left = vbox {
|
left = vbox {
|
||||||
|
|
||||||
imageview(Image(PrimaryView::class.java.classLoader.getResourceAsStream("logo.png")))
|
imageview(Image(PrimaryView::class.java.classLoader.getResourceAsStream("logo.png"))) {
|
||||||
|
isPreserveRatio = true
|
||||||
|
}
|
||||||
|
|
||||||
// bot list
|
// bot list
|
||||||
jfxListView(controller.botList) {
|
jfxListView(controller.botList) {
|
||||||
|
Loading…
Reference in New Issue
Block a user