SimpleColoredComponent () { SimpleColoredComponent label = new SimpleColoredComponent() { @Override public Font getFont() { Font font = super.getFont(); return (isFontSet() || !myTabs.useSmallLabels()) ? font : RelativeFont.NORMAL.fromResource("EditorTabs.fontSizeOffset", -2, JBUIScale.scale(11f)).derive(StartupUiUtil.getLabelFont()); } @Override protected Color getActiveTextColor(Color attributesColor) { TabPainterAdapter painterAdapter = myTabs.tabPainterAdapter; TabTheme theme = painterAdapter.getTabTheme(); Color foreground; if (myTabs.getSelectedInfo() == myInfo && (attributesColor == null || UIUtil.getLabelForeground().equals(attributesColor))) { foreground = myTabs.isActiveTabs(myInfo) ? theme.getUnderlinedTabForeground() : theme.getUnderlinedTabInactiveForeground(); } else { foreground = super.getActiveTextColor(attributesColor); } return editLabelForeground(foreground); } @Override protected void paintIcon(@NotNull Graphics g, @NotNull Icon icon, int offset) { Icon editedIcon = editIcon(icon); super.paintIcon(g, editedIcon, offset); } }; label.setOpaque(false); label.setBorder(null); label.setIconOpaque(false); label.setIpad(JBInsets.emptyInsets()); return label; }