try a different method of text display on automation bars
authorBen Loftis <ben@harrisonconsoles.com>
Thu, 28 Aug 2014 21:42:02 +0000 (16:42 -0500)
committerBen Loftis <ben@harrisonconsoles.com>
Fri, 29 Aug 2014 21:35:20 +0000 (16:35 -0500)
libs/gtkmm2ext/barcontroller.cc

index 83a29017349f652f72395fdf84988445b6ef74e3..4ad048a0cc2e4eb4c6604cb68b974c6eff1bb98d 100644 (file)
@@ -456,9 +456,14 @@ BarController::expose (GdkEventExpose* /*event*/)
                layout->set_text (label);
                layout->get_pixel_size (twidth, theight);
 
-               c = get_style()->get_text (get_state());
-               CairoWidget::set_source_rgb_a (cr, c, 1.0);
-               context->move_to ( (fract > 0.5) ? w - twidth/0.7 : twidth/0.7, (darea.get_height()/2) - (theight/2));
+               if (fract > 0.5) {
+                       cairo_set_source_rgba (cr, 0.17, 0.17, 0.17, 1.0);
+                       context->move_to ( 5, (darea.get_height()/2) - (theight/2));
+               } else {
+                       c = get_style()->get_text (get_state());
+                       CairoWidget::set_source_rgb_a (cr, c, 0.7);
+                       context->move_to ( w-twidth-5, (darea.get_height()/2) - (theight/2));
+               }
                layout->show_in_cairo_context (context);
        }