mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-23 13:50:12 +08:00
Simplify code
This commit is contained in:
parent
46d490df7b
commit
3fe70449d1
@ -76,11 +76,11 @@ class PrimaryView : View() {
|
||||
|
||||
logTab("Main", controller.mainLog, closeable = false)
|
||||
|
||||
tab("Plugins").apply { isClosable = false }.content = find<PluginsView>().root
|
||||
fixedTab("Plugins").content = find<PluginsView>().root
|
||||
|
||||
tab("Settings").apply { isClosable = false }.content = find<SettingsView>().root
|
||||
fixedTab("Settings").content = find<SettingsView>().root
|
||||
|
||||
tab("Login").apply { isClosable = false }.content = find<LoginView>().root
|
||||
fixedTab("Login").content = find<LoginView>().root
|
||||
|
||||
mainTabPane = this
|
||||
}
|
||||
@ -92,6 +92,8 @@ class PrimaryView : View() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun TabPane.fixedTab(title: String) = tab(title) { isClosable = false }
|
||||
|
||||
private fun TabPane.logTab(
|
||||
text: String? = null,
|
||||
logs: ObservableList<String>,
|
||||
|
Loading…
Reference in New Issue
Block a user