mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-14 09:37:36 -05:00
Remove hardcoded Color.BLACK foreground on JideTabbedPanes
ControllerPanel.getTabbedPane() and NowPlayingPanel.getTabbedPane() each called setForeground(Color.BLACK) on their JideTabbedPane instances. Color.BLACK is a plain java.awt.Color, not a ColorUIResource, so it is never replaced by LookAndFeel.installColorsAndFont() on subsequent UI installs - it permanently pins the tab labels to black regardless of any JIDE or FlatLaf defaults the theme manager sets. In dark mode this leaves the tab labels black-on-dark and unreadable. Drop the explicit foreground calls so the LAF (JideTabbedPaneUI reading JideTabbedPane.foreground / .unselectedTabTextForeground / .selectedTabTextForeground / .activeTabTextForeground) drives the colour in both light and dark modes.
This commit is contained in:
@@ -28,7 +28,6 @@ import io.github.dsheirer.module.decode.event.MessageActivityPanel;
|
|||||||
import io.github.dsheirer.playlist.PlaylistManager;
|
import io.github.dsheirer.playlist.PlaylistManager;
|
||||||
import io.github.dsheirer.preference.UserPreferences;
|
import io.github.dsheirer.preference.UserPreferences;
|
||||||
import io.github.dsheirer.settings.SettingsManager;
|
import io.github.dsheirer.settings.SettingsManager;
|
||||||
import java.awt.Color;
|
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
|
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
@@ -98,7 +97,6 @@ public class NowPlayingPanel extends JPanel
|
|||||||
mTabbedPane.addTab("Messages", mMessageActivityPanel);
|
mTabbedPane.addTab("Messages", mMessageActivityPanel);
|
||||||
mTabbedPane.addTab("Channel", mChannelSpectrumSquelchPanel);
|
mTabbedPane.addTab("Channel", mChannelSpectrumSquelchPanel);
|
||||||
mTabbedPane.setFont(this.getFont());
|
mTabbedPane.setFont(this.getFont());
|
||||||
mTabbedPane.setForeground(Color.BLACK);
|
|
||||||
//Register state change listener to toggle visibility state for channel tab to turn-on/off FFT processing
|
//Register state change listener to toggle visibility state for channel tab to turn-on/off FFT processing
|
||||||
mTabbedPane.addChangeListener(e -> mChannelSpectrumSquelchPanel.setPanelVisible(getTabbedPane().getSelectedIndex() == getTabbedPane()
|
mTabbedPane.addChangeListener(e -> mChannelSpectrumSquelchPanel.setPanelVisible(getTabbedPane().getSelectedIndex() == getTabbedPane()
|
||||||
.indexOfComponent(mChannelSpectrumSquelchPanel)));
|
.indexOfComponent(mChannelSpectrumSquelchPanel)));
|
||||||
|
|||||||
@@ -100,7 +100,6 @@ public class ControllerPanel extends JPanel
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
mTabbedPane.setFont(this.getFont());
|
mTabbedPane.setFont(this.getFont());
|
||||||
mTabbedPane.setForeground(Color.BLACK);
|
|
||||||
mTabbedPane.addTab("Now Playing", mNowPlayingPanel);
|
mTabbedPane.addTab("Now Playing", mNowPlayingPanel);
|
||||||
mTabbedPane.addTab("Map", mMapPanel);
|
mTabbedPane.addTab("Map", mMapPanel);
|
||||||
mTabbedPane.addTab("Tuners", mTunerManagerPanel);
|
mTabbedPane.addTab("Tuners", mTunerManagerPanel);
|
||||||
|
|||||||
Reference in New Issue
Block a user