Theme Editor: highlight selected editor tab

This commit is contained in:
Karl Tauber
2021-09-05 23:25:16 +02:00
parent a8f3d59729
commit 4a65bc88d5

View File

@@ -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" );