diff widgets/PluginParameterDialog.cpp @ 149:3dade4b025b7

* Pull transforms out of Layer menu (again) and into a separate Transforms menu * Add Recent Transforms submenu * Add effects and generators to the transforms menu (not yet implemented) as well as analysis plugins and data-from-effects (control output ports) * Add a nice dictionary-volume-style alphabetic subdivision of plugin names in plugins By Name menus
author Chris Cannam
date Fri, 22 Sep 2006 16:12:23 +0000
parents 4e7980e3b48e
children 8c730f49b9b3
line wrap: on
line diff
--- a/widgets/PluginParameterDialog.cpp	Wed Sep 20 15:47:16 2006 +0000
+++ b/widgets/PluginParameterDialog.cpp	Fri Sep 22 16:12:23 2006 +0000
@@ -26,6 +26,7 @@
 #include <QGroupBox>
 #include <QHBoxLayout>
 #include <QVBoxLayout>
+#include <QScrollArea>
 #include <QPushButton>
 #include <QMessageBox>
 #include <QComboBox>
@@ -152,10 +153,16 @@
     paramLayout->setMargin(0);
     paramBox->setLayout(paramLayout);
 
+    QScrollArea *scroll = new QScrollArea;
+    scroll->setWidgetResizable(true);
+    scroll->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+    scroll->setFrameShape(QFrame::NoFrame);
+    paramLayout->addWidget(scroll);
+
     m_parameterBox = new PluginParameterBox(m_plugin);
     connect(m_parameterBox, SIGNAL(pluginConfigurationChanged(QString)),
             this,  SIGNAL(pluginConfigurationChanged(QString)));
-    paramLayout->addWidget(m_parameterBox);
+    scroll->setWidget(m_parameterBox);
 
     m_advanced = new QFrame;
     QVBoxLayout *advancedLayout = new QVBoxLayout;
@@ -402,7 +409,8 @@
 
     std::cerr << "resize to " << sizeHint().width() << " x " << sizeHint().height() << std::endl;
 
-    setMaximumSize(sizeHint());
+    setMinimumHeight(sizeHint().height());
+    if (visible) setMaximumHeight(sizeHint().height());
 }
 
 void