[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdenonbeta/kopete/libkopete/ui
From:       Carsten Pfeiffer <carpdjih () mailbox ! tu-berlin ! de>
Date:       2003-02-03 23:57:09
[Download RAW message or body]

CVS commit by pfeiffer: 

honor background color changes from kcontrol


  M +16 -2     chatview.cpp   1.109


--- kdenonbeta/kopete/libkopete/ui/chatview.cpp  #1.108:1.109
@@ -708,4 +708,11 @@ void ChatView::setFgColor( const QColor 
         pal.setColor(QPalette::Active, QColorGroup::Text, mFgColor );
         pal.setColor(QPalette::Inactive, QColorGroup::Text, mFgColor );
+
+        // unsetPalette() so that color changes in kcontrol are honoured
+        // if we ever have a subclass of KTextEdit, reimplement setPalette()
+        // and check it there.
+        if ( pal == QApplication::palette( m_edit ) )
+                m_edit->unsetPalette();
+        else
         m_edit->setPalette(pal);
 }
@@ -722,4 +729,11 @@ void ChatView::setBgColor( const QColor 
         pal.setColor(QPalette::Inactive, QColorGroup::Base, mBgColor );
         pal.setColor(QPalette::Disabled, QColorGroup::Base, mBgColor );
+
+        // unsetPalette() so that color changes in kcontrol are honoured
+        // if we ever have a subclass of KTextEdit, reimplement setPalette()
+        // and check it there.
+        if ( pal == QApplication::palette( m_edit ) )
+                m_edit->unsetPalette();
+        else
         m_edit->setPalette(pal);
 }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic