traverso-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Traverso-commit] traverso resources/themes/default/traversotheme...


From: Remon Sijrier
Subject: [Traverso-commit] traverso resources/themes/default/traversotheme...
Date: Sat, 21 Apr 2007 15:26:49 +0000

CVSROOT:        /sources/traverso
Module name:    traverso
Changes by:     Remon Sijrier <r_sijrier>       07/04/21 15:26:49

Modified files:
        resources/themes/default: traversotheme.xml 
        src/plugins/LV2: LV2PluginPropertiesDialog.cpp 
                         LV2PluginPropertiesDialog.h 
        src/plugins    : PluginSlider.cpp 

Log message:
        * some layout improvements in plugin editing dialog

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/themes/default/traversotheme.xml?cvsroot=traverso&r1=1.17&r2=1.18
http://cvs.savannah.gnu.org/viewcvs/traverso/src/plugins/LV2/LV2PluginPropertiesDialog.cpp?cvsroot=traverso&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/traverso/src/plugins/LV2/LV2PluginPropertiesDialog.h?cvsroot=traverso&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/traverso/src/plugins/PluginSlider.cpp?cvsroot=traverso&r1=1.3&r2=1.4

Patches:
Index: resources/themes/default/traversotheme.xml
===================================================================
RCS file: 
/sources/traverso/traverso/resources/themes/default/traversotheme.xml,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- resources/themes/default/traversotheme.xml  20 Apr 2007 12:18:19 -0000      
1.17
+++ resources/themes/default/traversotheme.xml  21 Apr 2007 15:26:49 -0000      
1.18
@@ -99,6 +99,8 @@
                <color name="Plugin:background" red="230" green="0" blue="230" 
alpha="170" />
                <color name="Plugin:background:bypassed" red="230" green="0" 
blue="230" alpha="80" />
                <color name="Plugin:text" red="255" green="255" blue="255" 
alpha="255" />
+               <color name="PluginSlider:background" red="199" green="228" 
blue="211" alpha="255" />
+               <color name="PluginSlider:value"  red="240" green="190" 
blue="218"  alpha="255" />
                
                <color name="Song:background" red="250" green="251" blue="255" 
alpha="255" />
                

Index: src/plugins/LV2/LV2PluginPropertiesDialog.cpp
===================================================================
RCS file: 
/sources/traverso/traverso/src/plugins/LV2/LV2PluginPropertiesDialog.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- src/plugins/LV2/LV2PluginPropertiesDialog.cpp       19 Jan 2007 12:15:27 
-0000      1.4
+++ src/plugins/LV2/LV2PluginPropertiesDialog.cpp       21 Apr 2007 15:26:49 
-0000      1.5
@@ -17,7 +17,7 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA.
 
-$Id: LV2PluginPropertiesDialog.cpp,v 1.4 2007/01/19 12:15:27 r_sijrier Exp $
+$Id: LV2PluginPropertiesDialog.cpp,v 1.5 2007/04/21 15:26:49 r_sijrier Exp $
 */
 
 
@@ -34,30 +34,25 @@
 
 
 LV2PluginPropertiesDialog::LV2PluginPropertiesDialog(LV2Plugin* plugin)
-       : QDialog(), m_plugin(plugin)
+       : QDialog()
+       , m_plugin(plugin)
 {
-       setup_gui();
-}
-
-void LV2PluginPropertiesDialog::setup_gui()
-{
-       QList<LV2ControlPort* > ports = m_plugin->get_control_ports();
-
        QWidget* sliderWidget = new QWidget(this);
        QVBoxLayout* sliderWidgetLayout = new QVBoxLayout;
        sliderWidget->setLayout(sliderWidgetLayout);
 
        QHBoxLayout* dialogLayout = new QHBoxLayout;
        dialogLayout->addWidget(sliderWidget);
-       this->setLayout(dialogLayout);
+       dialogLayout->setMargin(0);
+       setLayout(dialogLayout);
 
 
-       resize(400, 300);
-
-       foreach(LV2ControlPort* port, ports) {
+       foreach(LV2ControlPort* port, m_plugin->get_control_ports()) {
 
                QWidget* widget = new QWidget(sliderWidget);
-               QHBoxLayout *layout = new QHBoxLayout;
+               QHBoxLayout* lay = new QHBoxLayout();
+               lay->setSpacing(12);
+               lay->setMargin(3);
 
                PluginSlider* slider = new PluginSlider();
                slider->setFixedWidth(200);
@@ -68,32 +63,24 @@
 
                QLabel* minvalue = new QLabel();
                minvalue->setNum(port->get_min_control_value());
-               minvalue->setFixedWidth(20);
+               minvalue->setFixedWidth(35);
 
                QLabel* maxvalue = new QLabel();
                maxvalue->setNum(port->get_max_control_value());
-               maxvalue->setFixedWidth(30);
-
-               QLabel* currentvalue = new QLabel();
-               currentvalue->setNum(port->get_control_value());
-               currentvalue->setFixedWidth(35);
-
-               connect(slider, SIGNAL(sliderValueChangedDouble(double)), 
currentvalue, SLOT(setNum (double)));
+               maxvalue->setFixedWidth(35);
 
                QLabel* controlname = new QLabel(port->get_description());
-               controlname->setFixedWidth(80);
 
-               layout->addWidget(minvalue);
-               layout->addWidget(slider, 4);
-               layout->addWidget(maxvalue);
-               layout->addWidget(currentvalue);
-               layout->addWidget(controlname);
+               lay->addWidget(minvalue);
+               lay->addWidget(slider, 4);
+               lay->addWidget(maxvalue);
+               lay->addWidget(controlname);
+               lay->addStretch(1);
 
-               widget->setLayout(layout);
+               widget->setLayout(lay);
 
                sliderWidgetLayout->addWidget(widget);
        }
-
 }
 
 //eof

Index: src/plugins/LV2/LV2PluginPropertiesDialog.h
===================================================================
RCS file: 
/sources/traverso/traverso/src/plugins/LV2/LV2PluginPropertiesDialog.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- src/plugins/LV2/LV2PluginPropertiesDialog.h 31 Jul 2006 13:24:46 -0000      
1.1
+++ src/plugins/LV2/LV2PluginPropertiesDialog.h 21 Apr 2007 15:26:49 -0000      
1.2
@@ -17,7 +17,7 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA.
 
-$Id: LV2PluginPropertiesDialog.h,v 1.1 2006/07/31 13:24:46 r_sijrier Exp $
+$Id: LV2PluginPropertiesDialog.h,v 1.2 2007/04/21 15:26:49 r_sijrier Exp $
 */
 
 
@@ -30,15 +30,14 @@
 
 class LV2PluginPropertiesDialog : public QDialog
 {
-       public:
+
+public:
                LV2PluginPropertiesDialog(LV2Plugin* plugin);
                ~LV2PluginPropertiesDialog(){};
 
 
-       private:
+private:
                LV2Plugin*      m_plugin;
-
-               void setup_gui();
 };
 
 #endif

Index: src/plugins/PluginSlider.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/plugins/PluginSlider.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- src/plugins/PluginSlider.cpp        8 Feb 2007 20:51:38 -0000       1.3
+++ src/plugins/PluginSlider.cpp        21 Apr 2007 15:26:49 -0000      1.4
@@ -17,11 +17,11 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA.
 
-$Id: PluginSlider.cpp,v 1.3 2007/02/08 20:51:38 r_sijrier Exp $
+$Id: PluginSlider.cpp,v 1.4 2007/04/21 15:26:49 r_sijrier Exp $
 */
 
 #include "PluginSlider.h"
-
+#include <Themer.h>
 
 PluginSlider::PluginSlider()
        : QWidget()
@@ -57,20 +57,18 @@
 {
        QPainter painter(this);
        
-       QColor color;
+       QColor color = themer()->get_color("PluginSlider:value");
+       QColor background = themer()->get_color("PluginSlider:background");
        
-       if (dragging) {
-               color.setRgb(169, 48, 111, 255);
-       } else {
                if (highlight) {
-                       color.setRgb(169, 48, 111, 220);
-               } else {
-                       color.setRgb(169, 48, 111, 180);
-               }
+               color = color.light(110);
+               background = background.light(105);
        }
        
-       painter.fillRect(0, 0, width(), height(), QBrush(QColor("#C7E4D3")));
-       painter.fillRect(0, 0, m_xpos, height(), QBrush(color));
+       painter.setBrush(background);
+       painter.drawRect(0, 0, width() - 0.5, height()- 0.5);
+       painter.fillRect(1, 1, m_xpos - 2, height() - 2, QBrush(color));
+       painter.drawText(0, 0, width(), height(), Qt::AlignCenter, 
QString::number(m_value, 'f', 2));
 }
 
 void PluginSlider::mousePressEvent( QMouseEvent * e )




reply via email to

[Prev in Thread] Current Thread [Next in Thread]