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

List:       kde-commits
Subject:    KDE/kdelibs/plasma/private
From:       Reza Shah <rshah0385 () kireihana ! com>
Date:       2009-08-25 0:39:59
Message-ID: 1251160799.094524.17145.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1015241 by rshah:

This fixed drawing problem for scollbar's slider at horizontal orientation.
For smallest size, the slider not will not drawn properly (cut on the right side).

 M  +9 -4      style.cpp  


--- trunk/KDE/kdelibs/plasma/private/style.cpp #1015240:1015241
@@ -138,10 +138,15 @@
         subLine.moveCenter(subControlRect(control, option, SC_ScrollBarSubLine, \
                widget).center());
         addLine.moveCenter(subControlRect(control, option, SC_ScrollBarAddLine, \
widget).center());  
-        const QRect slider =
-            subControlRect(control, option, SC_ScrollBarSlider, widget).adjusted(1, \
0, -1, 0); +	QRect slider = subControlRect(control, option, SC_ScrollBarSlider, \
widget);  
-        if (scrollOption && scrollOption->orientation == Qt::Horizontal && \
d->scrollbar->hasElement("background-horizontal-center")) { +        if (scrollOption \
&& scrollOption->orientation == Qt::Horizontal) { +            slider.adjust(0, 1, 0, \
-1); +        } else {
+            slider.adjust(1, 0, -1, 0);
+        }
+
+/*        if (scrollOption && scrollOption->orientation == Qt::Horizontal && \
d->scrollbar->hasElement("background-horizontal-center")) {  \
                d->scrollbar->setElementPrefix("background-horizontal");
         } else if (scrollOption && scrollOption->orientation == Qt::Vertical && \
d->scrollbar->hasElement("background-vertical-center")) {  \
d->scrollbar->setElementPrefix("background-vertical"); @@ -149,7 +154,7 @@
             d->scrollbar->setElementPrefix("background");
         }
         d->scrollbar->resizeFrame(option->rect.size());
-        d->scrollbar->paintFrame(painter);
+        d->scrollbar->paintFrame(painter);*/
 
         if (sunken && scrollOption && scrollOption->activeSubControls & \
SC_ScrollBarSlider) {  d->scrollbar->setElementPrefix("sunken-slider");


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

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