Task Force Viking: operation green line
authorRobin Gareus <robin@gareus.org>
Mon, 8 Jul 2013 15:55:29 +0000 (17:55 +0200)
committerRobin Gareus <robin@gareus.org>
Wed, 10 Jul 2013 13:27:14 +0000 (15:27 +0200)
gtk2_ardour/ardour3_styles.rc.in
libs/gtkmm2ext/pixfader.cc

index 3743d1db497c6adab6714c24758eb15d29125525..53de49fe586374d1aa779896fe1f65c2b1069095 100644 (file)
@@ -72,9 +72,9 @@ style "gain_fader"
        bg[ACTIVE] = shade (0.705, @@COLPREFIX@_bg)
        bg[INSENSITIVE] = shade (0.705, @@COLPREFIX@_bg)
 
-        fg[INSENSITIVE] = { 0.525, 0.521, 0.568 }
-        fg[NORMAL] = { 0.525, 0.521, 0.568 }
-       fg[ACTIVE] = { 0.525, 0.521, 0.568 }
+        fg[INSENSITIVE] = shade(1.4, @@COLPREFIX@_bg)
+        fg[NORMAL] = shade(1.4, @@COLPREFIX@_bg)
+       fg[ACTIVE] = shade(1.4, @@COLPREFIX@_bg)
 }
 
 #MSR and related buttons
index f4e362bca1b6ec0b3670d3a110354c8fa9cd2bad..dab7503c77718d5b4d1d871d54729643e614e9c7 100644 (file)
@@ -264,21 +264,57 @@ PixFader::on_expose_event (GdkEventExpose* ev)
                
        /* draw the unity-position line if it's not at either end*/
        if (unity_loc > 0) {
-               if ( _orien == VERT) {
-                       if (unity_loc < h ) {
-                                       context->set_line_width (1); 
-                                       context->set_source_rgb (0.0, 1.0, 0.0);
-                                       context->move_to (1, unity_loc);
-                                       context->line_to (girth - 2.0, unity_loc);
+               context->set_line_width (1);
+               if (girth <= 10) { // Line
+                       context->set_source_rgb (0.0, 1.0, 0.0);
+                       if ( _orien == VERT) {
+                               if (unity_loc < h ) {
+                                       context->move_to (1, unity_loc + .5);
+                                       context->line_to (girth - 2.0, unity_loc + .5);
                                        context->stroke ();
+                               }
+                       } else {
+                               if ( unity_loc < w ){
+                                       context->move_to (unity_loc + .5, 1);
+                                       context->line_to (unity_loc + .5, girth - 2.0);
+                                       context->stroke ();
+                               }
                        }
-               } else {
-                       if ( unity_loc < w ){
-                               context->set_line_width (1); 
-                               context->set_source_rgb (0.0, 1.0, 0.0);
-                               context->move_to (unity_loc, 1);
-                               context->line_to (unity_loc, girth - 2.0);
-                               context->stroke ();
+               } else { // triangle
+                       Gdk::Color c = get_style()->get_fg (Gtk::STATE_ACTIVE);
+                       context->set_source_rgba (c.get_red_p()*1.25, c.get_green_p()*1.25, c.get_blue_p()*1.25, 0.85);
+                       if ( _orien == VERT) {
+                               if (unity_loc < h ) {
+                                       context->move_to (1, unity_loc - 1.0);
+                                       context->line_to (1, unity_loc + 2.0);
+                                       context->line_to (5.0, unity_loc + 0.5);
+                                       cairo_close_path(cr);
+                                       context->fill_preserve ();
+                                       context->stroke ();
+
+                                       context->move_to (girth - 1, unity_loc - 1.0);
+                                       context->line_to (girth - 1, unity_loc + 2.0);
+                                       context->line_to (girth - 5, unity_loc + 0.5);
+                                       cairo_close_path(cr);
+                                       context->fill_preserve ();
+                                       context->stroke ();
+                               }
+                       } else {
+                               if ( unity_loc < w ){
+                                       context->move_to (unity_loc + 1.0, 1);
+                                       context->line_to (unity_loc - 2.0, 1);
+                                       context->line_to (unity_loc - 0.5, 5);
+                                       cairo_close_path(cr);
+                                       context->fill_preserve ();
+                                       context->stroke ();
+
+                                       context->move_to (unity_loc + 1.0, girth - 1);
+                                       context->line_to (unity_loc - 2.0, girth - 1);
+                                       context->line_to (unity_loc - 0.5, girth - 5);
+                                       cairo_close_path(cr);
+                                       context->fill_preserve ();
+                                       context->stroke ();
+                               }
                        }
                }
        }