Color (boolean selected) { ContentManager contentManager = myUi.window.getContentManagerIfCreated(); if (contentManager != null && contentManager.getContentCount() > 1) { return selected ? JBUI.CurrentTheme.ToolWindow.underlinedTabInactiveForeground() : JBUI.CurrentTheme.Label.foreground(false); } return super.getPassiveFg(selected); }