From 1ffaed3f36c3bd246ef1c0e72d2be172a687c7df Mon Sep 17 00:00:00 2001 From: hstyi Date: Fri, 14 Mar 2025 12:24:32 +0800 Subject: [PATCH] fix: sftp ui --- src/main/kotlin/app/termora/sftp/SFTPTabbed.kt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/kotlin/app/termora/sftp/SFTPTabbed.kt b/src/main/kotlin/app/termora/sftp/SFTPTabbed.kt index e1b4797..5f9aca8 100644 --- a/src/main/kotlin/app/termora/sftp/SFTPTabbed.kt +++ b/src/main/kotlin/app/termora/sftp/SFTPTabbed.kt @@ -34,14 +34,6 @@ class SFTPTabbed(private val transportManager: TransportManager) : FlatTabbedPan super.setTabLayoutPolicy(SCROLL_TAB_LAYOUT) super.setTabsClosable(true) 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() toolbar.add(addBtn) @@ -157,6 +149,14 @@ class SFTPTabbed(private val transportManager: TransportManager) : FlatTabbedPan 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) { val c = getComponentAt(index)