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

List:       kde-commits
Subject:    KDE/kdebase/workspace/kwin/clients
From:       Lucas Murray <lmurray () undefinedfire ! com>
Date:       2009-01-15 2:03:51
Message-ID: 1231985031.716661.10756.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 911207 by lmurray:

Add 4px padding between the title text and the stripes so that it
doesn't look so cramped.

 M  +4 -4      oxygen/oxygenclient.cpp  
 M  +4 -4      ozone/oxygenclient.cpp  


--- trunk/KDE/kdebase/workspace/kwin/clients/oxygen/oxygenclient.cpp #911206:911207
@@ -337,20 +337,20 @@
         }
 
         if (align & Qt::AlignLeft) {
-            int left = titleLeft + QFontMetrics(options()->font(isActive(), \
false)).width(caption()); +            int left = titleLeft + \
QFontMetrics(options()->font(isActive(), false)).width(caption()) + 4;  int right = \
titleLeft + titleWidth;  drawScratch(&painter, palette, left, right, titleTop+6);
         }
         if (align & Qt::AlignRight) {
             int left = titleLeft;
-            int right = titleLeft + titleWidth - \
QFontMetrics(options()->font(isActive(), false)).width(caption()); +            int \
right = titleLeft + titleWidth - QFontMetrics(options()->font(isActive(), \
false)).width(caption()) - 4;  drawScratch(&painter, palette, right, left, \
titleTop+6);  }
         if (align & Qt::AlignHCenter) {
             int textWidth = QFontMetrics(options()->font(isActive(), \
false)).width(caption());  int left = titleLeft;
-            int centerLeft = titleLeft + titleWidth/2 - textWidth/2;
-            int centerRight = titleLeft + titleWidth/2 + textWidth/2;
+            int centerLeft = titleLeft + titleWidth/2 - textWidth/2 - 4;
+            int centerRight = titleLeft + titleWidth/2 + textWidth/2 + 4;
             int right = titleLeft + titleWidth;
             drawScratch(&painter, palette, centerLeft, left, titleTop+6);
             drawScratch(&painter, palette, centerRight, right, titleTop+6);
--- trunk/KDE/kdebase/workspace/kwin/clients/ozone/oxygenclient.cpp #911206:911207
@@ -346,20 +346,20 @@
         }
 
         if (align & Qt::AlignLeft) {
-            int left = titleLeft + QFontMetrics(options()->font(isActive(), \
false)).width(caption()); +            int left = titleLeft + \
QFontMetrics(options()->font(isActive(), false)).width(caption()) + 4;  int right = \
titleLeft + titleWidth;  drawScratch(&painter, palette, left, right, titleTop+6);
         }
         if (align & Qt::AlignRight) {
             int left = titleLeft;
-            int right = titleLeft + titleWidth - \
QFontMetrics(options()->font(isActive(), false)).width(caption()); +            int \
right = titleLeft + titleWidth - QFontMetrics(options()->font(isActive(), \
false)).width(caption()) - 4;  drawScratch(&painter, palette, right, left, \
titleTop+6);  }
         if (align & Qt::AlignHCenter) {
             int textWidth = QFontMetrics(options()->font(isActive(), \
false)).width(caption());  int left = titleLeft;
-            int centerLeft = titleLeft + titleWidth/2 - textWidth/2;
-            int centerRight = titleLeft + titleWidth/2 + textWidth/2;
+            int centerLeft = titleLeft + titleWidth/2 - textWidth/2 - 4;
+            int centerRight = titleLeft + titleWidth/2 + textWidth/2 + 4;
             int right = titleLeft + titleWidth;
             drawScratch(&painter, palette, centerLeft, left, titleTop+6);
             drawScratch(&painter, palette, centerRight, right, titleTop+6);


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

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