[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/nepomuk/ui
From: Sebastian Trueg <sebastian () trueg ! de>
Date: 2010-06-23 8:51:29
Message-ID: 20100623085129.C610DAC8DA () svn ! kde ! org
[Download RAW message or body]
SVN commit 1141681 by trueg:
Do not force a minimum size which fits all in one row. Only use that as size hint. \
This fixes an issue where the tag widget can not be changed in size when put in a \
splitter.
M +13 -5 kblocklayout.cpp
--- trunk/KDE/kdelibs/nepomuk/ui/kblocklayout.cpp #1141680:1141681
@@ -170,11 +170,7 @@
QSize KBlockLayout::sizeHint() const
{
- return minimumSize();
-}
-
-QSize KBlockLayout::minimumSize() const
-{
+ // TODO: try to get the items into a square
QSize size;
QLayoutItem *item;
foreach (item, d->itemList) {
@@ -190,6 +186,18 @@
return size;
}
+QSize KBlockLayout::minimumSize() const
+{
+ QSize size;
+ QLayoutItem *item;
+ foreach (item, d->itemList) {
+ size = size.expandedTo(item->minimumSize());
+ }
+
+ size += QSize(2*margin(), 2*margin());
+ return size;
+}
+
struct Row {
Row( const QList<QLayoutItem*>& i, int h, int w )
: items(i), height(h), width(w) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic