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

List:       kde-commits
Subject:    KDE/kdebase/workspace/plasma/applets/pager
From:       Marco Martin <notmart () gmail ! com>
Date:       2008-11-19 11:50:25
Message-ID: 1227095425.467634.28462.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 886486 by mart:

compute those strange extra 2px margin in the calculation, weird, but
otherwise pager gets too small O.o


 M  +5 -4      pager.cpp  


--- trunk/KDE/kdebase/workspace/plasma/applets/pager/pager.cpp #886485:886486
@@ -269,19 +269,20 @@
         qreal ratio = (qreal)Kephal::ScreenUtils::desktopGeometry().width() / \
(qreal)Kephal::ScreenUtils::desktopGeometry().height();  
         if (formFactor() == Plasma::Vertical ) {
-            qreal optimalSize = (geometry().width() - KIconLoader::SizeSmall*ratio * \
columns + padding*(columns-1))/2; +            //FIXME: extra 2px margin, as the \
panel margin calculation, as weird as that +            qreal optimalSize = \
(geometry().width() - KIconLoader::SizeSmall*ratio * columns + padding*(columns-1))/2 \
- 2;  
             if (optimalSize < leftMargin || optimalSize < rightMargin) {
                 leftMargin = rightMargin = qMax(qreal(1), optimalSize);
-                 m_showOwnBackground = false;
+                m_showOwnBackground = false;
             }
 
         } else if (formFactor() == Plasma::Horizontal ) {
-            qreal optimalSize = (geometry().height() - KIconLoader::SizeSmall*rows + \
padding*(rows-1))/2; +            qreal optimalSize = (geometry().height() - \
KIconLoader::SizeSmall*rows + padding*(rows-1))/2 - 2;  
             if (optimalSize < topMargin || optimalSize < bottomMargin) {
                 topMargin = bottomMargin =  qMax(qreal(1), optimalSize);
-                 m_showOwnBackground = false;
+                m_showOwnBackground = false;
             }
         } else {
             m_showOwnBackground = true;


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

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