From 4a65bc88d587e425b71b7e36307fccc74d378ccd Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sun, 5 Sep 2021 23:25:16 +0200 Subject: [PATCH] Theme Editor: highlight selected editor tab --- .../com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java index 03c35552..02da2a64 100644 --- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java +++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java @@ -52,6 +52,7 @@ import java.util.prefs.Preferences; import javax.lang.model.SourceVersion; import javax.swing.*; import net.miginfocom.swing.*; +import com.formdev.flatlaf.FlatClientProperties; import com.formdev.flatlaf.FlatDarculaLaf; import com.formdev.flatlaf.FlatDarkLaf; import com.formdev.flatlaf.FlatIntelliJLaf; @@ -130,6 +131,10 @@ class FlatThemeFileEditor if( UIManager.getLookAndFeel() instanceof FlatDarkLaf ) darkLafMenuItem.setSelected( true ); + // highlight selected tab + tabbedPane.putClientProperty( FlatClientProperties.STYLE, + "[light]selectedBackground: #fff; [dark]selectedBackground: #303234" ); + // add "+" button to tabbed pane newButton = new JButton( new FlatSVGIcon( "com/formdev/flatlaf/themeeditor/icons/add.svg" ) ); newButton.setToolTipText( "New Properties File" );