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

List:       kde-commits
Subject:    KDE/kdebase/runtime/kstyles/oxygen
From:       Huynh Huu Long <long.upcase () googlemail ! com>
Date:       2008-05-27 13:58:22
Message-ID: 1211896702.725492.26085.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 813363 by huynhhuu:

remove trailing spaces


 M  +47 -47    oxygen.cpp  


--- trunk/KDE/kdebase/runtime/kstyles/oxygen/oxygen.cpp #813362:813363
@@ -449,7 +449,7 @@
                     TileSet *tiles1 = _helper.progressBar(color, rect, orientation);
                     if (orientation == Qt::Horizontal)
                         tiles1->render(rect, p, TileSet::Left | TileSet::Vertical | \
                TileSet::Right);
-                    else 
+                    else
                         tiles1->render(rect, p, TileSet::Top | TileSet::Horizontal | \
TileSet::Bottom);  
                     return;
@@ -470,7 +470,7 @@
                         pm.fill(Qt::transparent);
                         QPainter pp(&pm);
                         pp.setRenderHints(QPainter::Antialiasing);
-                        
+
                         QLinearGradient lg(rect.topLeft(),rect.topRight());
                         lg.setColorAt(0.0, _helper.alphaColor(hoverColor,0.8));
                         lg.setColorAt(1.0, hoverColor);
@@ -484,7 +484,7 @@
                             tiles1->render(pm.rect(), &pp, TileSet::Horizontal);
                         else
                             tiles1->render(pm.rect(), &pp, TileSet::Vertical);
-     
+
                         pp.end();
                         p->drawPixmap(rect.topLeft(),pm);
                     }
@@ -1797,7 +1797,7 @@
                     {
                         StyleOptions opts = 0;
 
-                        if (const QTabBar *tb =  dynamic_cast<const \
QTabBar*>(t->parent()))                                +                        if \
(const QTabBar *tb =  dynamic_cast<const QTabBar*>(t->parent()))  {
                             bool horizontal = true;
                             bool northOrEast = true;
@@ -2782,24 +2782,24 @@
 
             // We want to avoid super-skiny buttons, for things like "up" when icons \
+ text  // For this, we would like to make width >= height.
-            // However, once we get here, QToolButton may have already put in the \
                menu area 
-            // (PM_MenuButtonIndicator) into the width. So we may have to take it \
out, fix things  +            // However, once we get here, QToolButton may have \
already put in the menu area +            // (PM_MenuButtonIndicator) into the width. \
                So we may have to take it out, fix things
             // up, and add it back in. So much for class-independent rendering...
             int   menuAreaWidth = 0;
             if (const QStyleOptionToolButton* tbOpt = qstyleoption_cast<const \
                QStyleOptionToolButton*>(option)) {
                 if (tbOpt->features & QStyleOptionToolButton::MenuButtonPopup)
                     menuAreaWidth = pixelMetric(QStyle::PM_MenuButtonIndicator, \
option, widget);  }
-            
+
             size.setWidth(size.width() - menuAreaWidth);
             if (size.width() < size.height())
                 size.setWidth(size.height());
             size.setWidth(size.width() + menuAreaWidth);
-            
+
             const QToolButton* t=dynamic_cast<const QToolButton*>(widget);
             if (t && t->autoRaise()==true)
             {
-                int width = size.width() +  
+                int width = size.width() +
                                     2*widgetLayoutProp(WT_ToolButton, \
                ToolButton::ContentsMargin + MainMargin, option, widget) +
                                     widgetLayoutProp(WT_ToolButton, \
                ToolButton::ContentsMargin + Left, option, widget) +
                                     widgetLayoutProp(WT_ToolButton, \
ToolButton::ContentsMargin + Right, option, widget); @@ -2855,7 +2855,7 @@
                     int th = gbOpt->fontMetrics.height() + 8;
                     QRect cr = subElementRect(SE_CheckBoxIndicator, option, widget);
                     int fw = widgetLayoutProp(WT_GroupBox, GroupBox::FrameWidth, \
                option, widget);
-                    
+
                     bool checkable = gbOpt->subControls & \
QStyle::SC_GroupBoxCheckBox;  bool emptyText = gbOpt->text.isEmpty();
                     if (emptyText && !checkable) r.adjust(fw, fw, -fw, -fw);
@@ -3171,48 +3171,48 @@
                 _helper.drawFloatFrame(&p, dw->rect(), \
dw->palette().color(QPalette::Window));  return false;
             }
-            
-            QPixmap pm(dw->rect().size());                                           \
                
-            pm.fill(Qt::transparent);                                                \
 +
+            QPixmap pm(dw->rect().size());
+            pm.fill(Qt::transparent);
             QPainter pp(&pm);
             pp.setRenderHints(QPainter::Antialiasing);
             pp.translate(.5, .5);
             int x,y,w,h;
 
             dw->rect().getRect(&x, &y, &w, &h);
-            x = 0; y = 0;                                                            \
                
-            h--; w--;                                                                \
                
-            
-            QRect rect(x,y,w,h);                                                     \
                
-            
-            QPalette pal = dw->palette();                                            \
                
-            QColor color = pal.color(QPalette::Window);                              \
                
-            QColor light = _helper.calcLightColor(color);                            \
                
-            QColor dark = _helper.calcDarkColor(color);                              \
 +            x = 0; y = 0;
+            h--; w--;
 
-            dark.setAlpha(200);                
+            QRect rect(x,y,w,h);
+
+            QPalette pal = dw->palette();
+            QColor color = pal.color(QPalette::Window);
+            QColor light = _helper.calcLightColor(color);
+            QColor dark = _helper.calcDarkColor(color);
+
+            dark.setAlpha(200);
             light.setAlpha(150);
-                                                                                     \
                
-            // draw left and right border                                            \
                
-            QLinearGradient lg(rect.topLeft(),rect.topRight());                      \
                
-            lg.setColorAt(0.0, light);                                               \
                
-            lg.setColorAt(0.1, QColor(0,0,0,0));                                     \
                
-            lg.setColorAt(0.9, QColor(0,0,0,0));                                     \
                
-            lg.setColorAt(1.0, light);                                               \
                
-            pp.setPen(QPen(lg,1));                                                   \
                
-            //pp.drawRoundedRect(rect.adjusted(1,1,-1,0),5,5);                       \
                
-            pp.drawRoundedRect(rect.adjusted(0,-1,0,-1),4,4);                        \
                
-            pp.drawRoundedRect(rect.adjusted(2,1,-2,-2),4,4);       
 
-            lg.setColorAt(0.0, dark);                                                \
                
-            lg.setColorAt(0.1, QColor(0,0,0,0));                                     \
                
-            lg.setColorAt(0.9, QColor(0,0,0,0));                                     \
                
-            lg.setColorAt(1.0, dark);                                                \
                
-            pp.setPen(QPen(lg,1));                                                   \
                
-            pp.setBrush(Qt::NoBrush);                                                \
                
-            //pp.drawRoundedRect(rect.adjusted(0,0,0,-1),5,5);                       \
                
-            pp.drawRoundedRect(rect.adjusted(1,0,-1,-2),4,4);                        \
                
- 
+            // draw left and right border
+            QLinearGradient lg(rect.topLeft(),rect.topRight());
+            lg.setColorAt(0.0, light);
+            lg.setColorAt(0.1, QColor(0,0,0,0));
+            lg.setColorAt(0.9, QColor(0,0,0,0));
+            lg.setColorAt(1.0, light);
+            pp.setPen(QPen(lg,1));
+            //pp.drawRoundedRect(rect.adjusted(1,1,-1,0),5,5);
+            pp.drawRoundedRect(rect.adjusted(0,-1,0,-1),4,4);
+            pp.drawRoundedRect(rect.adjusted(2,1,-2,-2),4,4);
+
+            lg.setColorAt(0.0, dark);
+            lg.setColorAt(0.1, QColor(0,0,0,0));
+            lg.setColorAt(0.9, QColor(0,0,0,0));
+            lg.setColorAt(1.0, dark);
+            pp.setPen(QPen(lg,1));
+            pp.setBrush(Qt::NoBrush);
+            //pp.drawRoundedRect(rect.adjusted(0,0,0,-1),5,5);
+            pp.drawRoundedRect(rect.adjusted(1,0,-1,-2),4,4);
+
             // fade
             QRect maskr = rect.adjusted(0,h/3,0,0);
             pp.setCompositionMode(QPainter::CompositionMode_DestinationIn);
@@ -3224,9 +3224,9 @@
             pp.drawRect(maskr);
             p.drawPixmap(dw->rect().topLeft(),pm);
 
-            // draw top and bottom border                                            \
                
-            renderSeparator(&p,QRect(x,y,w,2),dw->palette(),Qt::Horizontal);         \
                
-            renderSeparator(&p,QRect(x,y+h-2,w,2),dw->palette(),Qt::Horizontal);     \
 +            // draw top and bottom border
+            renderSeparator(&p,QRect(x,y,w,2),dw->palette(),Qt::Horizontal);
+            renderSeparator(&p,QRect(x,y+h-2,w,2),dw->palette(),Qt::Horizontal);
             return false;
         }
     }
@@ -3244,7 +3244,7 @@
         }
         return false;
     }
-    
+
     // style HLines/VLines here, as Qt doesn't make them stylable as primitives.
     // Qt bug is filed.
     if (QFrame *f = qobject_cast<QFrame*>(obj))


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

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