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: Nicola Doebelin
Subject: [Traverso-commit] traverso resources/themes/default/traversotheme...
Date: Tue, 30 Sep 2008 19:43:06 +0000

CVSROOT:        /sources/traverso
Module name:    traverso
Changes by:     Nicola Doebelin <n_doebelin>    08/09/30 19:43:06

Modified files:
        resources/themes/default: traversotheme.xml 
        resources/themes/medium-contrast: traversotheme.xml 
        resources/themes/system-palette: traversotheme.xml 
        resources/themes/ubuntu: traversotheme.xml 
        src/sheetcanvas: AudioClipView.cpp AudioClipView.h 
        src/traverso/dialogs/settings: Pages.cpp 
        src/traverso/ui: ThemeConfigPage.ui 

Log message:
        Draw lines at 0 and -6 dB. Can be switched on/off in 
Preferences->Appearance.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/themes/default/traversotheme.xml?cvsroot=traverso&r1=1.48&r2=1.49
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/themes/medium-contrast/traversotheme.xml?cvsroot=traverso&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/themes/system-palette/traversotheme.xml?cvsroot=traverso&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/themes/ubuntu/traversotheme.xml?cvsroot=traverso&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/traverso/src/sheetcanvas/AudioClipView.cpp?cvsroot=traverso&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/traverso/src/sheetcanvas/AudioClipView.h?cvsroot=traverso&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/dialogs/settings/Pages.cpp?cvsroot=traverso&r1=1.42&r2=1.43
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/ui/ThemeConfigPage.ui?cvsroot=traverso&r1=1.7&r2=1.8

Patches:
Index: resources/themes/default/traversotheme.xml
===================================================================
RCS file: 
/sources/traverso/traverso/resources/themes/default/traversotheme.xml,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -b -r1.48 -r1.49
--- resources/themes/default/traversotheme.xml  12 Feb 2008 11:45:08 -0000      
1.48
+++ resources/themes/default/traversotheme.xml  30 Sep 2008 19:43:04 -0000      
1.49
@@ -32,6 +32,7 @@
                <font name="ContextMenu:fontscale:actions" value="0.95" />
                <font name="Plugin:fontscale:name" value="0.9" />
                <font name="AudioClip:fontscale:title" value="0.9" />
+               <font name="AudioClip:fontscale:dblines" value="0.75" />
                <font name="VUMeter:fontscale:label" value="0.75" />
                <font name="FFTMeter:fontscale:label" value="0.75" />
                <font name="CorrelationMeter:fontscale:label" value="0.75" />
@@ -89,6 +90,7 @@
                <color name="AudioClip:clipinfobackground:inactive"  red="199" 
green="190" blue="218"  alpha="200" />
                <color name="AudioClip:sampleoverload" red="255" green="0" 
blue="0" alpha="255" />
                <color name="AudioClip:invalidreadsource"  red="255" green="0" 
blue="0"  alpha="100" />
+               <color name="AudioClip:db-grid"  red="150" green="150" 
blue="150"  alpha="180" />
                
                
                <color name="Curve:active" red="255" green="0" blue="255" 
alpha="255" />

Index: resources/themes/medium-contrast/traversotheme.xml
===================================================================
RCS file: 
/sources/traverso/traverso/resources/themes/medium-contrast/traversotheme.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- resources/themes/medium-contrast/traversotheme.xml  16 Feb 2008 22:43:48 
-0000      1.6
+++ resources/themes/medium-contrast/traversotheme.xml  30 Sep 2008 19:43:05 
-0000      1.7
@@ -32,6 +32,7 @@
                <font name="ContextMenu:fontscale:actions" value="0.95" />
                <font name="Plugin:fontscale:name" value="0.9" />
                <font name="AudioClip:fontscale:title" value="0.9" />
+               <font name="AudioClip:fontscale:dblines" value="0.75" />
                <font name="VUMeter:fontscale:label" value="0.75" />
                <font name="FFTMeter:fontscale:label" value="0.75" />
                <font name="CorrelationMeter:fontscale:label" value="0.75" />
@@ -89,6 +90,7 @@
                <color name="AudioClip:clipinfobackground:inactive"  red="150" 
green="150" blue="255"  alpha="150" />
                <color name="AudioClip:sampleoverload" red="255" green="0" 
blue="0" alpha="255" />
                <color name="AudioClip:invalidreadsource"  red="255" green="0" 
blue="0"  alpha="100" />
+               <color name="AudioClip:db-grid"  red="150" green="150" 
blue="150"  alpha="180" />
                
                
                <color name="Curve:active" red="255" green="0" blue="0" 
alpha="255" />

Index: resources/themes/system-palette/traversotheme.xml
===================================================================
RCS file: 
/sources/traverso/traverso/resources/themes/system-palette/traversotheme.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- resources/themes/system-palette/traversotheme.xml   12 Feb 2008 11:45:09 
-0000      1.2
+++ resources/themes/system-palette/traversotheme.xml   30 Sep 2008 19:43:05 
-0000      1.3
@@ -32,6 +32,7 @@
                <font name="ContextMenu:fontscale:actions" value="0.95" />
                <font name="Plugin:fontscale:name" value="0.9" />
                <font name="AudioClip:fontscale:title" value="0.9" />
+               <font name="AudioClip:fontscale:dblines" value="0.75" />
                <font name="VUMeter:fontscale:label" value="0.75" />
                <font name="FFTMeter:fontscale:label" value="0.75" />
                <font name="CorrelationMeter:fontscale:label" value="0.75" />

Index: resources/themes/ubuntu/traversotheme.xml
===================================================================
RCS file: /sources/traverso/traverso/resources/themes/ubuntu/traversotheme.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- resources/themes/ubuntu/traversotheme.xml   16 Feb 2008 22:43:48 -0000      
1.5
+++ resources/themes/ubuntu/traversotheme.xml   30 Sep 2008 19:43:05 -0000      
1.6
@@ -32,6 +32,7 @@
                <font name="ContextMenu:fontscale:actions" value="0.95" />
                <font name="Plugin:fontscale:name" value="0.9" />
                <font name="AudioClip:fontscale:title" value="0.9" />
+               <font name="AudioClip:fontscale:dblines" value="0.75" />
                <font name="VUMeter:fontscale:label" value="0.75" />
                <font name="FFTMeter:fontscale:label" value="0.75" />
                <font name="CorrelationMeter:fontscale:label" value="0.75" />
@@ -89,6 +90,7 @@
                <color name="AudioClip:clipinfobackground:inactive" red="251" 
green="206" blue="138"  alpha="255" />
                <color name="AudioClip:sampleoverload" red="255" green="0" 
blue="0" alpha="255" />
                <color name="AudioClip:invalidreadsource"  red="255" green="0" 
blue="0"  alpha="100" />
+               <color name="AudioClip:db-grid"  red="150" green="150" 
blue="150"  alpha="180" />
                
                
                <color name="Curve:active" red="255" green="0" blue="0" 
alpha="255" />

Index: src/sheetcanvas/AudioClipView.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/sheetcanvas/AudioClipView.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- src/sheetcanvas/AudioClipView.cpp   21 Feb 2008 20:00:48 -0000      1.8
+++ src/sheetcanvas/AudioClipView.cpp   30 Sep 2008 19:43:05 -0000      1.9
@@ -359,7 +359,7 @@
                
                // calculate the height of the area available for peak drawing 
                // and if the infoarea is displayed, translate the painter
-               // drawing by dy = m_infoAreaheight
+               // drawing by dy = m_infoAreaHeight
                int height;
                
                if (m_height >= m_mimimumheightforinfoarea) {
@@ -401,6 +401,7 @@
                        
                        if (m_mergedView) {
                                ytrans = (height / 2) * channels;
+                               scaleFactor *= channels;
                        } else {
                                ytrans = (height / 2) + (chan * height);
                        }
@@ -426,6 +427,39 @@
                        
p->setPen(themer()->get_color("AudioClip:wavemicroview"));
                        p->drawPolyline(m_polygon);
                
+                       p->restore();
+                       p->save();
+
+                       // draw lines at 0 and -6 db
+                       if (m_drawDbGrid) {
+                                       if (m_height >= 
m_mimimumheightforinfoarea) {
+                                               
p->setMatrix(matrix().translate(0, m_infoAreaHeight), true);
+                                       }
+                                       p->setMatrix(matrix().translate(0, 
ytrans), true);
+
+                                       int scale = 1;
+                                       if (!m_mergedView) {
+                                               scale = channels;
+                                       }
+
+                                       
p->setPen(themer()->get_color("AudioClip:db-grid"));
+                                       p->setFont( 
themer()->get_font("AudioClip:fontscale:dblines") );
+                                       QFontMetrics fm(p->font());
+                                       int toffset = fm.width(" -6 dB ");
+
+                                       p->drawLine(toffset, -0.9 * 
height/scale, xstart+pixelcount, -0.9 * height/scale);
+                                       p->drawText(0.0, -0.9 * height/scale - 
1 + fm.ascent()/2, "  0 dB");
+
+                                       p->drawLine(toffset, 0.9 * height/scale 
+ 1, xstart+pixelcount, 0.9 * height/scale + 1);
+                                       p->drawText(0.0, 0.9 * height/scale + 
fm.ascent()/2, "  0 dB");
+
+                                       p->drawLine(toffset, -0.45 * 
height/scale, xstart+pixelcount, -0.45 * height/scale);
+                                       p->drawText(0.0, -0.45 * height/scale - 
1 + fm.ascent()/2, " -6 dB");
+
+                                       p->drawLine(toffset, 0.45 * 
height/scale + 1, xstart+pixelcount, 0.45 * height/scale + 1);
+                                       p->drawText(0.0, 0.45 * height/scale + 
fm.ascent()/2, " -6 dB");
+                       }
+
                // Macroview, paint waveform with painterpath
                } else {
                        if (m_fillwave) {
@@ -493,6 +527,39 @@
                                p->setPen(minINFLineColor);
                                p->drawLine(0, 0, pixelcount, 0);
                        
+                               p->restore();
+                               p->save();
+
+                               // draw lines at 0 and -6 db
+                               if (m_drawDbGrid) {
+                                       if (m_height >= 
m_mimimumheightforinfoarea) {
+                                               
p->setMatrix(matrix().translate(0, m_infoAreaHeight), true);
+                                       }
+                                       p->setMatrix(matrix().translate(0, 
ytrans), true);
+
+                                       int scale = 1;
+                                       if (!m_mergedView) {
+                                               scale = channels;
+                                       }
+
+                                       
p->setPen(themer()->get_color("AudioClip:db-grid"));
+                                       p->setFont( 
themer()->get_font("AudioClip:fontscale:dblines") );
+
+                                       QFontMetrics fm(p->font());
+                                       int toffset = fm.width(" -6 dB ");
+
+                                       p->drawLine(toffset, -0.9 * 
height/scale, xstart+pixelcount, -0.9 * height/scale);
+                                       p->drawText(0.0, -0.9 * height/scale - 
1 + fm.ascent()/2, "  0 dB");
+
+                                       p->drawLine(toffset, 0.9 * height/scale 
+ 1, xstart+pixelcount, 0.9 * height/scale + 1);
+                                       p->drawText(0.0, 0.9 * height/scale + 
fm.ascent()/2, "  0 dB");
+
+                                       p->drawLine(toffset, -0.45 * 
height/scale, xstart+pixelcount, -0.45 * height/scale);
+                                       p->drawText(0.0, -0.45 * height/scale - 
1 + fm.ascent()/2, " -6 dB");
+
+                                       p->drawLine(toffset, 0.45 * 
height/scale + 1, xstart+pixelcount, 0.45 * height/scale + 1);
+                                       p->drawText(0.0, 0.45 * height/scale + 
fm.ascent()/2, " -6 dB");
+                               }
                        } else {
                                scaleFactor =  (float) height * 0.95 * 
m_clip->get_gain() / Peak::MAX_DB_VALUE * curveDefaultValue;
                                ytrans = height + (chan * height);
@@ -518,6 +585,34 @@
                                path.lineTo(0, 0);
                                
                                p->drawPath(path);
+
+                               p->restore();
+                               p->save();
+
+                               // draw lines at 0 and -6 db
+                               if (m_drawDbGrid) {
+                                       if (m_height >= 
m_mimimumheightforinfoarea) {
+                                               
p->setMatrix(matrix().translate(0, m_infoAreaHeight), true);
+                                       }
+                                       p->setMatrix(matrix().translate(0, 
ytrans), true);
+
+                                       int scale = 1;
+                                       if (!m_mergedView) {
+                                               scale = channels;
+                                       }
+
+                                       
p->setPen(themer()->get_color("AudioClip:db-grid"));
+                                       p->setFont( 
themer()->get_font("AudioClip:fontscale:dblines") );
+                                       QFontMetrics fm(p->font());
+                                       int toffset = fm.width(" -6 dB ");
+
+                                       p->drawLine(toffset, -1.9 * 
height/scale, xstart+pixelcount, -1.9 * height/scale);
+                                       p->drawText(0.0, -1.9 * height/scale - 
1 + fm.ascent()/2, "  0 dB");
+
+                                       p->drawLine(toffset, -0.95 * 
height/scale, xstart+pixelcount, -0.95 * height/scale);
+                                       p->drawText(0.0, -0.95 * height/scale - 
1 + fm.ascent()/2, " -6 dB");
+                               }
+
                        }
                }
                
@@ -840,6 +935,7 @@
        m_fillwave = themer()->get_property("AudioClip:fillwave", 1).toInt();
        minINFLineColor = themer()->get_color("AudioClip:channelseperator");
        m_paintWithOutline = config().get_property("Themer", 
"paintwavewithoutline", true).toBool();
+       m_drawDbGrid = config().get_property("Themer", "drawdbgrid", 
false).toBool();
        m_clipInfo->setFont(themer()->get_font("AudioClip:fontscale:title"));
        calculate_bounding_rect();
 }

Index: src/sheetcanvas/AudioClipView.h
===================================================================
RCS file: /sources/traverso/traverso/src/sheetcanvas/AudioClipView.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- src/sheetcanvas/AudioClipView.h     12 Feb 2008 15:09:36 -0000      1.3
+++ src/sheetcanvas/AudioClipView.h     30 Sep 2008 19:43:05 -0000      1.4
@@ -95,6 +95,7 @@
        bool m_mergedView;
        bool m_classicView;
        bool m_paintWithOutline;
+       bool m_drawDbGrid;
        int m_height;
        int m_infoAreaHeight;
        int m_mimimumheightforinfoarea;

Index: src/traverso/dialogs/settings/Pages.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/dialogs/settings/Pages.cpp,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -b -r1.42 -r1.43
--- src/traverso/dialogs/settings/Pages.cpp     6 Aug 2008 16:47:20 -0000       
1.42
+++ src/traverso/dialogs/settings/Pages.cpp     30 Sep 2008 19:43:05 -0000      
1.43
@@ -570,6 +570,7 @@
        config().set_property("Themer", "usestylepallet", 
m_themepage->useStylePalletCheckBox->isChecked());
        config().set_property("Themer", "paintaudiorectified", 
m_themepage->rectifiedCheckBox->isChecked());
        config().set_property("Themer", "paintstereoaudioasmono", 
m_themepage->mergedCheckBox->isChecked());
+       config().set_property("Themer", "drawdbgrid", 
m_themepage->dbGridCheckBox->isChecked());
        config().set_property("Themer", "paintwavewithoutline", 
m_themepage->paintAudioWithOutlineCheckBox->isChecked());
        config().set_property("Themer", "iconsize", 
m_themepage->iconSizeCombo->currentText());
        config().set_property("Themer", "toolbuttonstyle", 
m_themepage->toolbarStyleCombo->currentIndex());
@@ -605,6 +606,7 @@
        bool paintRectified = config().get_property("Themer", 
"paintaudiorectified", false).toBool();
        bool paintStereoAsMono = config().get_property("Themer", 
"paintstereoaudioasmono", false).toBool();
        bool paintWaveWithLines = config().get_property("Themer", 
"paintwavewithoutline", true).toBool();
+       bool dbGrid = config().get_property("Themer", "drawdbgrid", 
false).toBool();
        
        int index = m_themepage->styleCombo->findText(style);
        m_themepage->styleCombo->setCurrentIndex(index);
@@ -615,6 +617,7 @@
        m_themepage->themePathLineEdit->setText(themepath);
        m_themepage->rectifiedCheckBox->setChecked(paintRectified);
        m_themepage->mergedCheckBox->setChecked(paintStereoAsMono);
+       m_themepage->dbGridCheckBox->setChecked(dbGrid);
        
m_themepage->paintAudioWithOutlineCheckBox->setChecked(paintWaveWithLines);
 
        m_themepage->toolbarStyleCombo->clear();
@@ -675,6 +678,7 @@
        config().set_property("Themer", "usestylepallet", false);
        config().set_property("Themer", "paintaudiorectified", false);
        config().set_property("Themer", "paintstereoaudioasmono", false);
+       config().set_property("Themer", "drawdbgrid", false);
        config().set_property("Themer", "paintwavewithoutline", true);
        config().set_property("Themer", "supportediconsizes", "16;22;32;48");
        config().set_property("Themer", "iconsize", "16");
@@ -700,6 +704,7 @@
        connect(colorAdjustBox, SIGNAL(valueChanged(int)), this, 
SLOT(color_adjustbox_changed(int)));
        connect(rectifiedCheckBox, SIGNAL(toggled(bool)), this, 
SLOT(theme_option_changed()));
        connect(mergedCheckBox, SIGNAL(toggled(bool)), this, 
SLOT(theme_option_changed()));
+       connect(dbGridCheckBox, SIGNAL(toggled(bool)), this, 
SLOT(theme_option_changed()));
        connect(paintAudioWithOutlineCheckBox, SIGNAL(toggled(bool)), this, 
SLOT(theme_option_changed()));
 }
 
@@ -775,6 +780,7 @@
 {
        config().set_property("Themer", "paintaudiorectified", 
rectifiedCheckBox->isChecked());
        config().set_property("Themer", "paintstereoaudioasmono", 
mergedCheckBox->isChecked());
+       config().set_property("Themer", "drawdbgrid", 
dbGridCheckBox->isChecked());
        config().set_property("Themer", "paintwavewithoutline", 
paintAudioWithOutlineCheckBox->isChecked());
        themer()->load();
 }

Index: src/traverso/ui/ThemeConfigPage.ui
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/ui/ThemeConfigPage.ui,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- src/traverso/ui/ThemeConfigPage.ui  6 Aug 2008 16:47:21 -0000       1.7
+++ src/traverso/ui/ThemeConfigPage.ui  30 Sep 2008 19:43:05 -0000      1.8
@@ -6,7 +6,7 @@
     <x>0</x>
     <y>0</y>
     <width>346</width>
-    <height>585</height>
+    <height>634</height>
    </rect>
   </property>
   <property name="windowTitle" >
@@ -220,6 +220,13 @@
         </property>
        </widget>
       </item>
+      <item>
+       <widget class="QCheckBox" name="dbGridCheckBox" >
+        <property name="text" >
+         <string>Draw lines at 0 and -6 dB</string>
+        </property>
+       </widget>
+      </item>
      </layout>
     </widget>
    </item>




reply via email to

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