fix: sftp ui

This commit is contained in:
hstyi
2025-03-14 12:24:32 +08:00
committed by hstyi
parent 4cb42953ad
commit 1ffaed3f36

View File

@@ -34,14 +34,6 @@ class SFTPTabbed(private val transportManager: TransportManager) : FlatTabbedPan
super.setTabLayoutPolicy(SCROLL_TAB_LAYOUT) super.setTabLayoutPolicy(SCROLL_TAB_LAYOUT)
super.setTabsClosable(true) super.setTabsClosable(true)
super.setTabType(TabType.underlined) super.setTabType(TabType.underlined)
super.setStyleMap(
mapOf(
"focusColor" to UIManager.getColor("TabbedPane.selectedBackground"),
"hoverColor" to UIManager.getColor("TabbedPane.background"),
"tabHeight" to 30
)
)
val toolbar = JToolBar() val toolbar = JToolBar()
toolbar.add(addBtn) toolbar.add(addBtn)
@@ -157,6 +149,14 @@ class SFTPTabbed(private val transportManager: TransportManager) : FlatTabbedPan
return null return null
} }
override fun updateUI() {
styleMap = mapOf(
"focusColor" to UIManager.getColor("TabbedPane.selectedBackground"),
"hoverColor" to UIManager.getColor("TabbedPane.background"),
"tabHeight" to 30
)
super.updateUI()
}
override fun removeTabAt(index: Int) { override fun removeTabAt(index: Int) {
val c = getComponentAt(index) val c = getComponentAt(index)