meterbridge -9dBFS tick -> red
authorRobin Gareus <robin@gareus.org>
Wed, 3 Jul 2013 17:07:19 +0000 (19:07 +0200)
committerRobin Gareus <robin@gareus.org>
Wed, 10 Jul 2013 13:27:06 +0000 (15:27 +0200)
gtk2_ardour/meter_strip.cc

index fc31a3f96bea01826113a5a905402b1adf869b53..89ed54268b286e37d18f31dedfbd94f7f772cd56 100644 (file)
@@ -595,10 +595,10 @@ MeterStrip::render_ticks (Gtk::Widget& w, vector<DataType> types)
        for (vector<DataType>::const_iterator i = types.begin(); i != types.end(); ++i) {
 
                Gdk::Color c;
        for (vector<DataType>::const_iterator i = types.begin(); i != types.end(); ++i) {
 
                Gdk::Color c;
+               c = w.get_style()->get_fg (Gtk::STATE_NORMAL);
 
                if (types.size() > 1) {
                        /* we're overlaying more than 1 set of marks, so use different colours */
 
                if (types.size() > 1) {
                        /* we're overlaying more than 1 set of marks, so use different colours */
-                       Gdk::Color c;
                        switch (*i) {
                        case DataType::AUDIO:
                                c = w.get_style()->get_fg (Gtk::STATE_NORMAL);
                        switch (*i) {
                        case DataType::AUDIO:
                                c = w.get_style()->get_fg (Gtk::STATE_NORMAL);
@@ -677,11 +677,13 @@ MeterStrip::render_ticks (Gtk::Widget& w, vector<DataType> types)
 
                        switch (*i) {
                        case DataType::AUDIO:
 
                        switch (*i) {
                        case DataType::AUDIO:
-                               if (j->first >= 0) {
+                               if (j->first >= 0 || j->first == -9) {
                                        cairo_set_source_rgb (cr,
                                                        UINT_RGBA_R_FLT(peakcolor),
                                                        UINT_RGBA_G_FLT(peakcolor),
                                                        UINT_RGBA_B_FLT(peakcolor));
                                        cairo_set_source_rgb (cr,
                                                        UINT_RGBA_R_FLT(peakcolor),
                                                        UINT_RGBA_G_FLT(peakcolor),
                                                        UINT_RGBA_B_FLT(peakcolor));
+                               } else {
+                                       cairo_set_source_rgb (cr, c.get_red_p(), c.get_green_p(), c.get_blue_p());
                                }
                                fraction = log_meter (j->first);
                                pos = height - (gint) floor (height * fraction);
                                }
                                fraction = log_meter (j->first);
                                pos = height - (gint) floor (height * fraction);