summaryrefslogtreecommitdiffstats
path: root/tdeui/ktabbar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tdeui/ktabbar.cpp')
-rw-r--r--tdeui/ktabbar.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/tdeui/ktabbar.cpp b/tdeui/ktabbar.cpp
index 29479c0e9..2dd2cc9a3 100644
--- a/tdeui/ktabbar.cpp
+++ b/tdeui/ktabbar.cpp
@@ -298,9 +298,19 @@ void KTabBar::setTabColor( int id, const TQColor& color )
}
}
+void KTabBar::resetTabColor( int id )
+{
+ TQTab *t = tab(id);
+ if (t) {
+ if (mTabColors.contains(id))
+ mTabColors.remove(id);
+ repaint(t->rect(), false);
+ }
+}
+
const TQColor &KTabBar::tabColor( int id ) const
{
- if ( mTabColors.contains( id ) )
+ if ( mTabColors.contains(id) && mTabColors[id].isValid() )
return mTabColors[id];
return colorGroup().foreground();
@@ -359,7 +369,7 @@ void KTabBar::paintLabel( TQPainter *p, const TQRect& br,
flags |= TQStyle::Style_HasFocus;
TQColorGroup cg( colorGroup() );
- if ( mTabColors.contains( t->identifier() ) )
+ if ( mTabColors.contains(t->identifier()) && mTabColors[t->identifier()].isValid() )
cg.setColor( TQColorGroup::Foreground, mTabColors[t->identifier()] );
style().drawControl( TQStyle::CE_TabBarLabel, p, this, r,