changeset 493:4afdcecbd62e

* experiment (does this improve layout on mac?)
author Chris Cannam
date Wed, 11 Feb 2009 14:44:14 +0000
parents f60b6204856e
children b3140e9e0665
files widgets/PropertyBox.cpp widgets/PropertyBox.h
diffstat 2 files changed, 8 insertions(+), 5 deletions(-) [+]
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);
 	    }
--- a/widgets/PropertyBox.h	Mon Feb 09 16:50:52 2009 +0000
+++ b/widgets/PropertyBox.h	Wed Feb 11 14:44:14 2009 +0000
@@ -85,7 +85,7 @@
     QVBoxLayout *m_mainBox;
     LEDButton *m_showButton;
     LEDButton *m_playButton;
-    std::map<QString, QLayout *> m_groupLayouts;
+    std::map<QString, QGridLayout *> m_groupLayouts;
     std::map<QString, QWidget *> m_propertyControllers;
 };