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

List:       kde-commits
Subject:    KDE/kdelibs/nepomuk/ui
From:       Peter Penz <peter.penz () gmx ! at>
Date:       2010-06-12 18:47:24
Message-ID: 20100612184724.8AC95AC8CF () svn ! kde ! org
[Download RAW message or body]

SVN commit 1137422 by ppenz:

Provide a minimum size hint, that is capable to show the whole content in one line. This allows \
the layout system, to check the heightForWidth() value, if the minimum width cannot be \
provided.

This fixes the issue, that the Nepomok Tag widget does not show all tags or the "Change..." \
label.

CCMAIL:  trueg@kde.org
BUG: 240099

 M  +8 -2      kblocklayout.cpp  


--- trunk/KDE/kdelibs/nepomuk/ui/kblocklayout.cpp #1137421:1137422
@@ -177,9 +177,15 @@
 {
     QSize size;
     QLayoutItem *item;
-    foreach (item, d->itemList)
-        size = size.expandedTo(item->minimumSize());
+    foreach (item, d->itemList) {
+        const QSize itemSize = item->minimumSize();
+        size.rwidth() += itemSize.width();
+        if (itemSize.height() > size.height()) {
+            size.setHeight(itemSize.height());
+        }
+    }
 
+    size.rwidth() += horizontalSpacing() * d->itemList.count();
     size += QSize(2*margin(), 2*margin());
     return size;
 }


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

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