Use the new KColorScheme to get 'active' color to highlight tabs when activity occurs in them. Currently uses a 50/50 blend of the normal text color and the active text color.

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=677283
This commit is contained in:
Robert Knight
2007-06-18 20:38:23 +00:00
parent 89e41ae82e
commit 063dba1c71

View File

@@ -36,6 +36,8 @@
// KDE
#include <KColorDialog>
#include <kcolorscheme.h>
#include <kcolorutils.h>
#include <KIconLoader>
#include <KLocale>
#include <KMenu>
@@ -574,9 +576,12 @@ void TabbedViewContainerV2::removeViewWidget( QWidget* view )
void TabbedViewContainerV2::setTabActivity(int index , bool activity)
{
const QColor activityColor = _tabBar->palette()
.highlight().color().dark(120);
KColorScheme colorScheme;
const QColor colorSchemeActive = colorScheme.foreground(KColorScheme::ActiveText).color();
const QColor normalColor = _tabBar->palette().text().color();
const QColor activityColor = KColorUtils::mix(normalColor,colorSchemeActive);
QColor color = activity ? activityColor : normalColor;