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

List:       kde-commits
Subject:    KDE/kdebase/workspace/plasma/applets/tasks
From:       Marco Martin <notmart () gmail ! com>
Date:       2009-04-19 15:58:55
Message-ID: 1240156735.409025.10897.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 956238 by mart:

make the expanded groups mostly working again in the suboptimal way they
used to, via some usual hacks around maximum/preferred sizes, it seems
we can't free us from that stuff


 M  +16 -0     taskitemlayout.cpp  


--- trunk/KDE/kdebase/workspace/plasma/applets/tasks/taskitemlayout.cpp \
#956237:956238 @@ -253,6 +253,16 @@
     //int columnWidth = qMax(1, int(m_groupItem->geometry().size().width() / \
columns));  //kDebug() << "column width set to " << columnWidth;
 
+    //FIXME: resetting column preferred sizesthey shouldn't be taken into account \
for inexistent ones but they are, probably upstream issue +    for (int i = 0; \
i<columnCount(); ++i) { +        setColumnMaximumWidth(i, 0);
+        setColumnPreferredWidth(i, 0);
+    }
+    for (int i = 0; i<rowCount(); ++i) {
+        setRowMaximumHeight(i, 0);
+        setRowPreferredHeight(i, 0);
+    }
+
     //clearLayout
     while (count()) {
         removeAt(0);
@@ -297,12 +307,18 @@
         //m_layout->setColumnPreferredWidth(col, columnWidth);//Somehow this line is \
                absolutely crucial
         //m_layout->setRowPreferredHeight(row, rowHeight);//Somehow this line is \
absolutely crucial  
+
+        //FIXME: this is a glorious hack
         if (maximumCellSize.isValid()) {
             if (m_layoutOrientation == Qt::Vertical) {
                 setRowMaximumHeight(row, maximumCellSize.height());
+                setColumnMaximumWidth(col, QWIDGETSIZE_MAX);
             } else {
                 setColumnMaximumWidth(col, maximumCellSize.width());
+                setRowMaximumHeight(row, QWIDGETSIZE_MAX);
             }
+            setRowPreferredHeight(row, maximumCellSize.height());
+            setColumnPreferredWidth(col, maximumCellSize.width());
         }
 
         if (item->abstractItem() && item->abstractItem()->isGroupItem()) {


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

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