[Panel-devel] [PATCH] Beginnings of a panel implementation for discussion

Percy Leonhardt mailings at eris23.de
Thu Aug 23 13:25:14 CEST 2007


On Monday 20 August 2007, Robert Knight wrote:
> As an aside, HBoxLayout and VBoxLayout are very similar internally.  I
> think it would be a good idea to try and merge them to avoid bugs
> arising from duplication.

Talking about bugs in layout, is it okay to commit the following?

--- hboxlayout.cpp      (revision 703347)
+++ hboxlayout.cpp      (working copy)
@@ -75,7 +75,7 @@

     foreach (LayoutItem *l, fixedChildren) {
         QSizeF hint = l->sizeHint();
-        sizes.insert(indexOf(l), QSizeF(available.width(), hint.height()));
+        sizes.insert(indexOf(l), QSizeF(hint.width(), available.height()));
         available -= QSizeF(hint.width() + spacing(), 0.0f);
     }

@@ -113,6 +113,8 @@
         hintHeight = qMax(hint.height(), hintHeight);
         hintWidth += hint.width() + spacing();
     }
+    hintWidth += 2 * margin();
+    hintHeight += 2 * margin();

     return QSizeF(hintWidth, hintHeight);
 }


--- vboxlayout.cpp      (revision 703347)
+++ vboxlayout.cpp      (working copy)
@@ -118,6 +118,8 @@
         hintWidth = qMax(hint.width(), hintWidth);
         hintHeight += hint.height() + spacing();
     }
+    hintWidth += 2 * margin();
+    hintHeight += 2 * margin();

     return QSizeF(hintWidth, hintHeight);
 }


	Percy


More information about the Panel-devel mailing list