diff options
author | Robin Gareus <robin@gareus.org> | 2013-07-12 19:07:07 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2013-07-12 19:07:07 +0200 |
commit | 5bae4373c792481980a1e9a986627f90af4ea520 (patch) | |
tree | 6442673a7604785b0dd4431549aeb1c8c98085a8 /libs/gtkmm2ext/pixfader.cc | |
parent | e0bbc0b435eb93ea2e1e2a61453a0639ac10071c (diff) |
implement visual-sensitivity (gray out) for faders
Note: bar-controller sensitivity state is not yet set if
automation-mode changes to/from play, but the widget now
supports that.
Diffstat (limited to 'libs/gtkmm2ext/pixfader.cc')
-rw-r--r-- | libs/gtkmm2ext/pixfader.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/libs/gtkmm2ext/pixfader.cc b/libs/gtkmm2ext/pixfader.cc index 6e0c642917..0185550259 100644 --- a/libs/gtkmm2ext/pixfader.cc +++ b/libs/gtkmm2ext/pixfader.cc @@ -292,13 +292,15 @@ PixFader::on_expose_event (GdkEventExpose* ev) pango_cairo_show_layout (cr, _layout->gobj()); } -// if (Config->get_widget_prelight()) { //pixfader does not have access to config - if (_hovering) { - Gtkmm2ext::rounded_rectangle (cr, 0, 0, get_width(), get_height(), 3); - cairo_set_source_rgba (cr, 0.905, 0.917, 0.925, 0.1); - cairo_fill (cr); - } -// } + if (!get_sensitive()) { + Gtkmm2ext::rounded_rectangle (cr, 0, 0, get_width(), get_height(), 3); + cairo_set_source_rgba (cr, 0.505, 0.517, 0.525, 0.4); + cairo_fill (cr); + } else if (_hovering) { + Gtkmm2ext::rounded_rectangle (cr, 0, 0, get_width(), get_height(), 3); + cairo_set_source_rgba (cr, 0.905, 0.917, 0.925, 0.1); + cairo_fill (cr); + } last_drawn = ds; |