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

List:       kde-commits
Subject:    kdebase/kicker/taskmanager
From:       Aaron J. Seigo <aseigo () kde ! org>
Date:       2005-04-19 20:06:42
Message-ID: 20050419200642.EFCF03C8 () office ! kde ! org
[Download RAW message or body]

CVS commit by aseigo: 

blendColor is now in libkicker


  M +2 -2      Makefile.am   1.7
  M +4 -17     tasklmbmenu.cpp   1.16
  M +0 -1      tasklmbmenu.h   1.7


--- kdebase/kicker/taskmanager/Makefile.am  #1.6:1.7
@@ -1,3 +1,3 @@
-INCLUDES = $(all_includes)
+INCLUDES = $(all_includes) -I$(srcdir)/../share
 
 lib_LTLIBRARIES = libtaskmanager.la
@@ -6,5 +6,5 @@
 
 libtaskmanager_la_LDFLAGS = $(all_libraries) -version-info 1:0:0 -no-undefined
-libtaskmanager_la_LIBADD = $(LIB_KDECORE)
+libtaskmanager_la_LIBADD = $(LIB_KDECORE) ../share/libkickermain.la
 
 messages:

--- kdebase/kicker/taskmanager/tasklmbmenu.cpp  #1.15:1.16
@@ -27,9 +27,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE 
 
 #include <qpainter.h>
-#include "qstyle.h"
+#include <qstyle.h>
 
 #include <kdebug.h>
 #include <kglobalsettings.h>
 
+#include "global.h"
+
 TaskMenuItem::TaskMenuItem(const QString &text,
                           bool active, bool minimized, bool attention)
@@ -64,5 +66,5 @@ void TaskMenuItem::paint(QPainter *p, co
     else if (m_isMinimized)
     {
-        p->setPen(QPen(blendColors(cg.background(), cg.text())));
+        p->setPen(QPen(KickerLib::blendColors(cg.background(), cg.text())));
     }
     else if (m_demandsAttention && !m_attentionState)
@@ -85,19 +87,4 @@ QSize TaskMenuItem::sizeHint()
 }
 
-QColor TaskMenuItem::blendColors( QColor c1, QColor c2 )
-{
-    int r1, g1, b1;
-    int r2, g2, b2;
-
-    c1.rgb( &r1, &g1, &b1 );
-    c2.rgb( &r2, &g2, &b2 );
-
-    r1 += (int) ( .5 * ( r2 - r1 ) );
-    g1 += (int) ( .5 * ( g2 - g1 ) );
-    b1 += (int) ( .5 * ( b2 - b1 ) );
-
-    return QColor( r1, g1, b1 );
-}
-
 /*****************************************************************************/
 

--- kdebase/kicker/taskmanager/tasklmbmenu.h  #1.6:1.7
@@ -40,5 +40,4 @@ public:
     void paint(QPainter*, const QColorGroup&, bool, bool, int, int, int, int);
     QSize sizeHint();
-    QColor blendColors(QColor, QColor);
     void setAttentionState(bool state) { m_attentionState = state; }
 


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

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