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

List:       kde-commits
Subject:    playground/artwork/Oxygen/style/code
From:       Thomas Lübking <thomas.luebking () web ! de>
Date:       2007-06-03 18:34:07
Message-ID: 1180895647.861936.29799.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 671082 by luebking:

reverting outlining, new tab lightning on bottom



 M  +9 -7      drawcontrol.cpp  
 M  +4 -3      tileset.cpp   [UTF-8 ENCODING PROBLEMS]
 M  +2 -2      tileset.h   [UTF-8 ENCODING PROBLEMS]


--- trunk/playground/artwork/Oxygen/style/code/drawcontrol.cpp #671081:671082
@@ -372,10 +372,12 @@
             switch ((QTabBar::Shape)shape) {
             case QTabBar::RoundedNorth:
             case QTabBar::TriangularNorth:
-               rect = selected ? RECT.adjusted($2,$2,-$2,-$2) :
-                  RECT.adjusted($2,$4,-$2,-dpi.$3);
-               size = rect.height();
-//                off = QPoint(0, 0);
+               if (sunken)
+                  rect.adjust(0, rect.height()/4, 0, -rect.height()/4);
+               else
+                  rect.setTop(rect.bottom()-rect.height()/2);
+               size = RECT.height()-dpi.$2;
+               off = QPoint(0, rect.y()-(RECT.y()+dpi.$2));
                break;
             case QTabBar::RoundedSouth:
             case QTabBar::TriangularSouth:
@@ -408,7 +410,7 @@
             QColor c = PAL.color(config.role_tab[0]);
             int h,s,v; c.getHsv(&h,&s,&v);
             if (v < 80) v = 80;
-            v = ((100+step*4)*v)/100;
+            v = ((100+step*7)*v)/100;
             c.setHsv(h,s,CLAMP(v,0,255));
 #endif
             const QPixmap &fill = gradient(c, size, o,
@@ -773,7 +775,7 @@
             rect = r.adjusted(dpi.$3, dpi.$2, -dpi.$3, -dpi.$3);
             const QPixmap &fill = gradient(CONF_COLOR(role_popup[0]), rect.height(), \
Qt::Vertical, config.gradient);  fillWithMask(painter, rect, fill, &masks.button);
-            masks.button.outline(rect, painter, QPen(Qt::white), true);
+            masks.button.outline(rect, painter, Qt::white, true);
             cr = config.role_popup[1];
          }
          QPixmap pix = mbi->icon.pixmap(pixelMetric(PM_SmallIconSize), isEnabled ? \
QIcon::Normal : QIcon::Disabled); @@ -1230,7 +1232,7 @@
          // slider base
          fillWithMask(painter, r, gradient(btnBgColor(PAL, isEnabled, hover, \
                complexStep),
                                            size, direction, config.gradBtn), \
                &masks.button);
-	 masks.button.outline(r, painter, QPen(Qt::white), true);
+	 masks.button.outline(r, painter, Qt::white, true);
          
          // and maybe a "scrollarea hovered indicator"
          if (hover && !complexStep)
--- trunk/playground/artwork/Oxygen/style/code/tileset.cpp #671081:671082
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2006-2007 by Thomas L�bking                             *
+ *   Copyright (C) 2006-2007 by Thomas Lübking                             *
  *   thomas.luebking@web.de                                                *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -210,11 +210,12 @@
 #undef DRAW_TILED_PIXMAP
 }
 
-void Set::outline(const QRect &r, QPainter *p, QPen pen, bool strong, PosFlags pf) \
const +void Set::outline(const QRect &r, QPainter *p, QColor c, bool strong, PosFlags \
pf) const  {
    p->save();
    p->setRenderHint(QPainter::Antialiasing, false);
-   pen.setWidth(1);
+   QPen pen = p->pen();
+   pen.setColor(c); pen.setWidth(1);
    p->setPen(pen);
    p->setBrush(Qt::NoBrush);
    QRect rect = r/*.adjusted(0,0,0,-1)*/;
--- trunk/playground/artwork/Oxygen/style/code/tileset.h #671081:671082
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2006-2007 by Thomas L�bking                             *
+ *   Copyright (C) 2006-2007 by Thomas Lübking                             *
  *   thomas.luebking@web.de                                                *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -53,7 +53,7 @@
    Set(const QPixmap &pix, int xOff, int yOff, int width, int height, int rx = 0, \
int ry = 0);  Set(){}
    void render(const QRect &rect, QPainter *p, PosFlags pf = Ring) const;
-   void outline(const QRect &rect, QPainter *p, QPen p, bool strong = false,
+   void outline(const QRect &rect, QPainter *p, QColor c, bool strong = false,
                 PosFlags pf = Ring) const;
    Picture render(int width, int height, PosFlags pf = Ring) const;
    Picture render(const QSize &size, PosFlags pf = Ring) const;


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

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