diff --git a/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/MiraiGraphical.kt b/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/MiraiGraphical.kt index 264987b88..4c8ba7351 100644 --- a/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/MiraiGraphical.kt +++ b/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/MiraiGraphical.kt @@ -11,11 +11,10 @@ package net.mamoe.mirai.console.graphical import net.mamoe.mirai.console.MiraiConsole import net.mamoe.mirai.console.graphical.controller.MiraiGraphicalUIController -import net.mamoe.mirai.console.graphical.styleSheet.PrimaryStyleSheet +import net.mamoe.mirai.console.graphical.stylesheet.PrimaryStyleSheet import net.mamoe.mirai.console.graphical.view.Decorator import tornadofx.App import tornadofx.find -import tornadofx.launch //object MiraiGraphicalLoader { // @JvmStatic diff --git a/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/stylesheet/BaseStyleSheet.kt b/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/stylesheet/BaseStyleSheet.kt index 843173f6f..9d622fd86 100644 --- a/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/stylesheet/BaseStyleSheet.kt +++ b/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/stylesheet/BaseStyleSheet.kt @@ -1,4 +1,4 @@ -package net.mamoe.mirai.console.graphical.styleSheet +package net.mamoe.mirai.console.graphical.stylesheet import javafx.scene.layout.BackgroundRepeat import javafx.scene.paint.Color diff --git a/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/stylesheet/LoginViewStyleSheet.kt b/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/stylesheet/LoginViewStyleSheet.kt index 06fb8166b..fec8b8757 100644 --- a/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/stylesheet/LoginViewStyleSheet.kt +++ b/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/stylesheet/LoginViewStyleSheet.kt @@ -1,4 +1,4 @@ -package net.mamoe.mirai.console.graphical.styleSheet +package net.mamoe.mirai.console.graphical.stylesheet import javafx.scene.Cursor import javafx.scene.effect.BlurType diff --git a/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/stylesheet/PluginViewStyleSheet.kt b/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/stylesheet/PluginViewStyleSheet.kt index 45a93e523..30c481f1c 100644 --- a/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/stylesheet/PluginViewStyleSheet.kt +++ b/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/stylesheet/PluginViewStyleSheet.kt @@ -1,4 +1,4 @@ -package net.mamoe.mirai.console.graphical.styleSheet +package net.mamoe.mirai.console.graphical.stylesheet import javafx.geometry.Pos import javafx.scene.paint.Color diff --git a/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/stylesheet/PrimaryStyleSheet.kt b/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/stylesheet/PrimaryStyleSheet.kt index a5bea71e6..3a1477dfd 100644 --- a/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/stylesheet/PrimaryStyleSheet.kt +++ b/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/stylesheet/PrimaryStyleSheet.kt @@ -1,4 +1,4 @@ -package net.mamoe.mirai.console.graphical.styleSheet +package net.mamoe.mirai.console.graphical.stylesheet import javafx.scene.Cursor import javafx.scene.text.FontWeight @@ -50,14 +50,11 @@ class PrimaryStyleSheet : BaseStyleSheet() { backgroundColor += c(100, 100, 100, 0.4) backgroundRadius += box(5.px) - textFill = c(fontColor) - fontWeight = FontWeight.BOLD + textFill = c(fontColor) + fontWeight = FontWeight.BOLD } } - - textField { - } } } diff --git a/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/view/LoginView.kt b/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/view/LoginView.kt index 46b9d59dc..4d79d55d8 100644 --- a/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/view/LoginView.kt +++ b/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/view/LoginView.kt @@ -5,7 +5,7 @@ import javafx.geometry.Pos import javafx.scene.image.Image import kotlinx.coroutines.runBlocking import net.mamoe.mirai.console.graphical.controller.MiraiGraphicalUIController -import net.mamoe.mirai.console.graphical.styleSheet.LoginViewStyleSheet +import net.mamoe.mirai.console.graphical.stylesheet.LoginViewStyleSheet import net.mamoe.mirai.console.graphical.util.jfxButton import net.mamoe.mirai.console.graphical.util.jfxPasswordfield import net.mamoe.mirai.console.graphical.util.jfxTextfield diff --git a/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/view/PluginsView.kt b/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/view/PluginsView.kt index d08452003..a5d229125 100644 --- a/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/view/PluginsView.kt +++ b/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/view/PluginsView.kt @@ -3,7 +3,7 @@ package net.mamoe.mirai.console.graphical.view import com.jfoenix.controls.JFXTreeTableColumn import net.mamoe.mirai.console.graphical.controller.MiraiGraphicalUIController import net.mamoe.mirai.console.graphical.model.PluginModel -import net.mamoe.mirai.console.graphical.styleSheet.PluginViewStyleSheet +import net.mamoe.mirai.console.graphical.stylesheet.PluginViewStyleSheet import net.mamoe.mirai.console.graphical.util.jfxTreeTableView import tornadofx.View import tornadofx.addStylesheet diff --git a/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/view/PrimaryView.kt b/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/view/PrimaryView.kt index 35482b14e..073f3ad78 100644 --- a/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/view/PrimaryView.kt +++ b/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/view/PrimaryView.kt @@ -65,6 +65,26 @@ class PrimaryView : View() { } } } + } + + center = vbox { + + jfxTabPane { + + fitToParentHeight() + + tabClosingPolicy = TabPane.TabClosingPolicy.ALL_TABS + + logTab("Main", controller.mainLog, closeable = false) + + fixedTab("Plugins").content = find().root + + fixedTab("Settings").content = find().root + + fixedTab("Login").content = find().root + + mainTabPane = this + } // command input textfield { @@ -80,21 +100,6 @@ class PrimaryView : View() { } } } - - center = jfxTabPane { - - tabClosingPolicy = TabPane.TabClosingPolicy.ALL_TABS - - logTab("Main", controller.mainLog, closeable = false) - - fixedTab("Plugins").content = find().root - - fixedTab("Settings").content = find().root - - fixedTab("Login").content = find().root - - mainTabPane = this - } } fun Tab.select() = apply {