draw settings of bypassed panners
authorRobin Gareus <robin@gareus.org>
Thu, 9 Jan 2014 13:32:13 +0000 (14:32 +0100)
committerRobin Gareus <robin@gareus.org>
Thu, 9 Jan 2014 13:32:13 +0000 (14:32 +0100)
gtk2_ardour/mono_panner.cc
gtk2_ardour/stereo_panner.cc

index c1039092c5226ac8ca5823f601efa7e19eed887a..57939a4f198a58a6f5d1ed3177b0ab0b2da00a1d 100644 (file)
@@ -133,13 +133,18 @@ MonoPanner::on_expose_event (GdkEventExpose*)
         pf = colors.pos_fill;
         po = colors.pos_outline;
 
+        if (_panner_shell->bypassed()) {
+               b  = 0x20202040;
+               f  = 0x404040ff;
+               o  = 0x606060ff;
+               po = 0x606060ff;
+               pf = 0x404040ff;
+               t  = 0x606060ff;
+       }
+
         /* background */
 
-        if (!_panner_shell->bypassed()) {
-                context->set_source_rgba (UINT_RGBA_R_FLT(b), UINT_RGBA_G_FLT(b), UINT_RGBA_B_FLT(b), UINT_RGBA_A_FLT(b));
-        } else {
-                context->set_source_rgba (0.1, 0.1, 0.1, 0.2);
-        }
+       context->set_source_rgba (UINT_RGBA_R_FLT(b), UINT_RGBA_G_FLT(b), UINT_RGBA_B_FLT(b), UINT_RGBA_A_FLT(b));
         context->rectangle (0, 0, width, height);
         context->fill ();
 
@@ -169,10 +174,6 @@ MonoPanner::on_expose_event (GdkEventExpose*)
         context->line_to ((pos_box_size/2.0) + (usable_width/2.0), height);
         context->stroke ();
 
-       if (_panner_shell->bypassed()) {
-               return true;
-       }
-
         /* left box */
 
         rounded_rectangle (context,
index c2b38867abf473414c0a8cbb5fa79f0580da1da3..116dfbd8a078a4f1d5f4da471b6847dbb1e74206 100644 (file)
@@ -150,13 +150,17 @@ StereoPanner::on_expose_event (GdkEventExpose*)
        b = colors[state].background;
        r = colors[state].rule;
 
+       if (_panner_shell->bypassed()) {
+               b  = 0x20202040;
+               f  = 0x404040ff;
+               o  = 0x606060ff;
+               t  = 0x606060ff;
+               r  = 0x606060ff;
+       }
+
        /* background */
 
-       if (!_panner_shell->bypassed()) {
-               context->set_source_rgba (UINT_RGBA_R_FLT(b), UINT_RGBA_G_FLT(b), UINT_RGBA_B_FLT(b), UINT_RGBA_A_FLT(b));
-       } else {
-               context->set_source_rgba (0.1, 0.1, 0.1, 0.2);
-       }
+       context->set_source_rgba (UINT_RGBA_R_FLT(b), UINT_RGBA_G_FLT(b), UINT_RGBA_B_FLT(b), UINT_RGBA_A_FLT(b));
        cairo_rectangle (context->cobj(), 0, 0, width, height);
        context->fill ();
 
@@ -194,10 +198,6 @@ StereoPanner::on_expose_event (GdkEventExpose*)
        context->set_source_rgba (UINT_RGBA_R_FLT(r), UINT_RGBA_G_FLT(r), UINT_RGBA_B_FLT(r), UINT_RGBA_A_FLT(r));
        context->stroke ();
 
-       if (_panner_shell->bypassed()) {
-               return true;
-       }
-
        /* compute & draw the line through the box */
 
        context->set_line_width (2);