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

List:       kde-commits
Subject:    KDE/kdelibs/plasma/extenders
From:       Marco Martin <notmart () gmail ! com>
Date:       2010-10-12 10:44:59
Message-ID: 20101012104459.4B654AC894 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1185142 by mart:

adjust the alignment even where there is only th icon on the left but no buttons on the right


 M  +9 -0      extenderitem.cpp  


--- trunk/KDE/kdelibs/plasma/extenders/extenderitem.cpp #1185141:1185142
@@ -973,7 +973,16 @@
 
     //to keep the text really centered
     toolboxLayout->setItemSpacing(0, KIconLoader::SizeSmall * (lastIndex - 2));
+    if (lastIndex == 2) {
+        if (QApplication::layoutDirection() == Qt::RightToLeft) {
+            toolboxLayout->setContentsMargins(KIconLoader::SizeSmall, 0, 0, 0);
+        } else {
+            toolboxLayout->setContentsMargins(0, 0, KIconLoader::SizeSmall, 0);
 }
+    } else {
+        toolboxLayout->setContentsMargins(0, 0, 0, 0);
+    }
+}
 
 Applet *ExtenderItemPrivate::hostApplet() const
 {
[prev in list] [next in list] [prev in thread] [next in thread] 

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