本文介绍了在Konsole CSS中更改紫色选项卡文本的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当输入进入不活动的选项卡时,该选项卡的文本将变为紫色.我需要使用哪些CSS选择器来更改此设置?

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?

我在Konsole中使用自定义样式表来更改选项卡的外观,但无法弄清楚如何更改此值. 此页面未提及

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.

我在Xubuntu 14.04(XFCE)上使用Konsole 2.13.2(KDE 4.13.3).

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

推荐答案

到目前为止,此选项卡活动颜色似乎是由

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);
}

在konsole的 src/ViewContainer.cpp 中,因此是可能超出了Konsole中配置的自定义样式表的范围.

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

请注意如何将KColorScheme::ActiveTextnormalColor混合.通过在KDE系统设置->颜色->颜色选项卡->活动文本中更改活动文本"颜色,可以对颜色产生一定的影响. 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.

这篇关于在Konsole CSS中更改紫色选项卡文本的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-17 00:52