问题
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).
回答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.
来源:https://stackoverflow.com/questions/29086277/change-color-of-purple-tab-text-in-konsole-css