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

List:       kde-commits
Subject:    kdelibs/kstyles/highcolor
From:       Daniel Molkentin <molkentin () kde ! org>
Date:       2003-01-16 18:21:44
[Download RAW message or body]

CVS commit by danimo: 

gradients for hc flat button mode, too


  M +15 -2     highcolor.cpp   1.48


--- kdelibs/kstyles/highcolor/highcolor.cpp  #1.47:1.48
@@ -304,4 +304,6 @@ void HighColorStyle::drawPrimitive( Prim
                         int  x, y, w, h;
                         r.rect(&x, &y, &w, &h);
+                        int x2 = x+w-1;
+                        int y2 = y+h-1;
 
                         if ( sunken )
@@ -316,5 +318,16 @@ void HighColorStyle::drawPrimitive( Prim
                         // "Flat" button
                         else if (!(flags & (Style_Raised | Style_Sunken)))
-                                p->fillRect(r, cg.button());
+                            {
+                                //p->fillRect(r, cg.button());
+                                renderGradient(p, QRect(x, y, w-1, h-1),
+                                                                cg.button(), false);
+                                p->setPen(cg.button().light(75));
+                                
+                                p->drawLine(x, y, x2, y);
+                                p->drawLine(x, y, x, y2);
+                                p->drawLine(x, y2, x2, y2);
+                                p->drawLine(x2, y, x2, y2);
+                                
+                        }          
                         
                         else if( highcolor )


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

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