1

When input comes in on a tab that is not active, the text for the tab changes to a purple color. What CSS selectors do I need to use to change this?

I am using a custom stylesheet in Konsole to change how the tabs look, but can't figure out how to change this one value. This page makes no mention of it.

I'm using Konsole 2.13.2(KDE 4.13.3) on Xubuntu 14.04(XFCE).

2
  • So you are hacking Konsole source code from KDE, that sound interesting.. if you added also qt4 or qt tag you may get more attention. Maybe its some custom selector, or they are using their own hack for that.. I guess you searched their qss and found nothing?
    – nayana
    Apr 20, 2015 at 12:13
  • I checked the master git code for konsole and I found out that they do not use separate .qss but rather keep the styles somewhere else (like in some KDE files somewhere) I see in MainWindow class this line setNavigationStyleSheetFromFile(KonsoleSettings::tabBarUserStyleSheetFile()); maybe you want to check that one
    – nayana
    Apr 20, 2015 at 12:24

1 Answer 1

1

As of today, this tab-activity color appears to be set by

void TabbedViewContainer::setTabActivity(int index , bool activity)
{
    const QPalette& palette = _tabBar->palette();
    KColorScheme colorScheme(palette.currentColorGroup());
    const QColor colorSchemeActive = colorScheme.foreground(KColorScheme::ActiveText).color();

    const QColor normalColor = palette.text().color();
    const QColor activityColor = KColorUtils::mix(normalColor, colorSchemeActive);

    QColor color = activity ? activityColor : QColor();

    if (color != _tabBar->tabTextColor(index))
        _tabBar->setTabTextColor(index, color);
}

in konsole's src/ViewContainer.cpp and is therefore probably beyond the reach of a custom stylesheet configured in Konsole.

Note how KColorScheme::ActiveText is mixed with normalColor. You can have some influence over the color by changing the "Active Text" color in KDE System Settings -> Color -> Colors tab -> Active Text. Konsole has to restarted for the changes to take effect.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.