diff widgets/PropertyBox.cpp @ 493:4afdcecbd62e

* experiment (does this improve layout on mac?)
author Chris Cannam
date Wed, 11 Feb 2009 14:44:14 +0000
parents 035d62c4cddf
children 1fe7951a61e8
line wrap: on
line diff
--- a/widgets/PropertyBox.cpp	Mon Feb 09 16:50:52 2009 +0000
+++ b/widgets/PropertyBox.cpp	Wed Feb 11 14:44:14 2009 +0000
@@ -293,7 +293,7 @@
 		m_layout->addWidget(new QLabel(groupName, m_mainWidget), row, 0);
 		QFrame *frame = new QFrame(m_mainWidget);
 		m_layout->addWidget(frame, row, 1, 1, 2);
-		m_groupLayouts[groupName] = new QHBoxLayout;
+		m_groupLayouts[groupName] = new QGridLayout;
 		m_groupLayouts[groupName]->setMargin(0);
 		frame->setLayout(m_groupLayouts[groupName]);
 	    }
@@ -337,7 +337,8 @@
                     this, SLOT(mouseLeftWidget()));
 	    if (inGroup) {
 		button->setToolTip(propertyLabel);
-		m_groupLayouts[groupName]->addWidget(button);
+		m_groupLayouts[groupName]->addWidget
+                    (button, 0, m_groupLayouts[groupName]->columnCount());
 	    } else {
 		m_layout->addWidget(button, row, 1, 1, 2);
 	    }
@@ -390,7 +391,8 @@
 	    if (inGroup) {
 		dial->setFixedWidth(24);
 		dial->setFixedHeight(24);
-		m_groupLayouts[groupName]->addWidget(dial);
+		m_groupLayouts[groupName]->addWidget
+                    (dial, 0, m_groupLayouts[groupName]->columnCount());
 	    } else {
 		dial->setFixedWidth(32);
 		dial->setFixedHeight(32);
@@ -482,7 +484,8 @@
 
 	    if (inGroup) {
 		cb->setToolTip(propertyLabel);
-		m_groupLayouts[groupName]->addWidget(cb);
+		m_groupLayouts[groupName]->addWidget
+                    (cb, 0, m_groupLayouts[groupName]->columnCount());
 	    } else {
 		m_layout->addWidget(cb, row, 1, 1, 2);
 	    }