summaryrefslogtreecommitdiff
path: root/libs/gtkmm2ext/barcontroller.cc
diff options
context:
space:
mode:
authorBen Loftis <ben@glw.com>2012-12-07 22:38:49 +0000
committerBen Loftis <ben@glw.com>2012-12-07 22:38:49 +0000
commit5249f826035c35ae3ea75cbbd2457a0d8a510a79 (patch)
tree979a94b3123d2cfb0bef3e7f704dc29ec56f3e2a /libs/gtkmm2ext/barcontroller.cc
parent526a1a71fe8bf0b448a51c1cae47d7c516764882 (diff)
more theming and layout tweaks. new faders that pre-light. fixed some spacing around mixer buttons. tweaked some colors (returned mutes to yellow). removed group button at bottom of mixer strip and replaced it with fader automation mode.
git-svn-id: svn://localhost/ardour2/branches/3.0@13617 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/gtkmm2ext/barcontroller.cc')
-rw-r--r--libs/gtkmm2ext/barcontroller.cc46
1 files changed, 14 insertions, 32 deletions
diff --git a/libs/gtkmm2ext/barcontroller.cc b/libs/gtkmm2ext/barcontroller.cc
index baa36418b1..3afd0a98b9 100644
--- a/libs/gtkmm2ext/barcontroller.cc
+++ b/libs/gtkmm2ext/barcontroller.cc
@@ -285,8 +285,8 @@ BarController::create_patterns ()
float rheight = darea.get_height()-2;
cairo_pattern_t* pat = cairo_pattern_create_linear (0.0, 0.0, 0.0, rheight);
- cairo_pattern_add_color_stop_rgba (pat, 0, r*0.3,g*0.3,b*0.3, 1.0);
- cairo_pattern_add_color_stop_rgba (pat, 1, r, g, b, 1.0);
+ cairo_pattern_add_color_stop_rgba (pat, 0, r*0.8,g*0.8,b*0.8, 1.0);
+ cairo_pattern_add_color_stop_rgba (pat, 1, r*0.6,g*0.6,b*0.6, 1.0);
Cairo::RefPtr<Cairo::Pattern> p (new Cairo::Pattern (pat, false));
pattern = p;
cairo_pattern_destroy(pat);
@@ -439,44 +439,26 @@ BarController::expose (GdkEventExpose* /*event*/)
w = darea.get_width() - 2;
h = darea.get_height() - 2;
- x2 = (gint) floor (w * (0.1+0.9*fract));
+ x2 = (gint) floor (w * fract);
y2 = h;
radius = 4;
+ if (x2 < 8) x2 = 8;
- /* border */
+ /* border */
- c = get_style()->get_bg (get_state());
- r = c.get_red_p ();
- g = c.get_green_p ();
- b = c.get_blue_p ();
- context->set_source_rgb (0,0,0);
- rounded_rectangle (context, 0, 0, darea.get_width(), darea.get_height() , radius);
- context->fill ();
+ context->set_source_rgb (0,0,0);
+ cairo_rectangle (context->cobj(), 0, 0, darea.get_width(), darea.get_height());
+ context->fill ();
/* draw active box */
- c = get_style()->get_fg (get_state());
- r = c.get_red_p ();
- g = c.get_green_p ();
- b = c.get_blue_p ();
- context->set_source (pattern);
- rounded_rectangle (context, 1, 1, x2, y2, radius-1.5);
- context->fill ();
-
- context->set_source (shine_pattern);
- rounded_rectangle (context, 2, 3, x2-2, y2-8, radius-2);
- context->fill ();
-
- /* draw inactive box */
-
-// c = get_style()->get_fg (STATE_INSENSITIVE);
- // r = c.get_red_p ();
- // g = c.get_green_p ();
- // b = c.get_blue_p ();
- // context->set_source_rgb (r, g, b);
- // rounded_rectangle (context, 1 + x2, 1 + y1, w - x2, y2);
- // context->fill ();
+ context->set_source (pattern);
+ rounded_rectangle (context, 1, 1, x2, y2, radius-1.5);
+ context->fill ();
+// context->set_source (shine_pattern);
+// rounded_rectangle (context, 2, 3, x2-2, y2-8, radius-2);
+// context->fill ();
break;
case RightToLeft: