diff --git a/gtk2_ardour/waves_button.cc b/gtk2_ardour/waves_button.cc index 14e11d8033..f8b58011d3 100644 --- a/gtk2_ardour/waves_button.cc +++ b/gtk2_ardour/waves_button.cc @@ -117,8 +117,11 @@ WavesButton::render (cairo_t* cr, cairo_rectangle_t*) { Glib::RefPtr style = get_style(); - Gdk::Color bgcolor = style->get_bg ((get_state() == Gtk::STATE_INSENSITIVE) ? Gtk::STATE_INSENSITIVE : - (get_active() ? Gtk::STATE_ACTIVE : Gtk::STATE_NORMAL)); + Gdk::Color bgcolor = style->get_bg ((get_state() == Gtk::STATE_INSENSITIVE) ? Gtk::STATE_INSENSITIVE : + (_pushed ? (get_active() ? Gtk::STATE_NORMAL : + Gtk::STATE_ACTIVE) : + (get_active() ? Gtk::STATE_ACTIVE : + Gtk::STATE_NORMAL))); int width = get_width (); int height = get_height(); @@ -180,11 +183,11 @@ WavesButton::render_text (cairo_t* cr) cairo_new_path (cr); - Gdk::Color fgcolor = style->get_fg ((get_state() == Gtk::STATE_INSENSITIVE) ? - Gtk::STATE_INSENSITIVE : - (get_active() ? - Gtk::STATE_ACTIVE : - Gtk::STATE_NORMAL)); + Gdk::Color fgcolor = style->get_fg ((get_state() == Gtk::STATE_INSENSITIVE) ? Gtk::STATE_INSENSITIVE : + (_pushed ? (get_active() ? Gtk::STATE_NORMAL : + Gtk::STATE_ACTIVE) : + (get_active() ? Gtk::STATE_ACTIVE : + Gtk::STATE_NORMAL))); cairo_set_source_rgba (cr, fgcolor.get_red_p(), fgcolor.get_green_p(), fgcolor.get_blue_p(), 1); diff --git a/gtk2_ardour/waves_dropdown.cc b/gtk2_ardour/waves_dropdown.cc index f4bbccdd0c..32619ea54d 100644 --- a/gtk2_ardour/waves_dropdown.cc +++ b/gtk2_ardour/waves_dropdown.cc @@ -160,8 +160,12 @@ WavesDropdown::_on_popup_menu_position (int& x, int& y, bool& push_in) bool WavesDropdown::_on_mouse_pressed (GdkEventButton*) { - _menu.popup (sigc::mem_fun(this, &WavesDropdown::_on_popup_menu_position), 1, gtk_get_current_event_time()); _hovering = _pushed = false; - set_active (true); + if (!_menu.items ().empty ()) { + _menu.popup (sigc::mem_fun(this, &WavesDropdown::_on_popup_menu_position), 1, gtk_get_current_event_time()); + set_active (true); + } else { + set_active (false); + } return true; } diff --git a/gtk2_ardour/waves_icon_button.cc b/gtk2_ardour/waves_icon_button.cc index 0b3f02088a..a69b2b625b 100644 --- a/gtk2_ardour/waves_icon_button.cc +++ b/gtk2_ardour/waves_icon_button.cc @@ -56,9 +56,9 @@ WavesIconButton::render (cairo_t* cr, cairo_rectangle_t*) if (pixbuf == 0) { pixbuf = (get_state() == Gtk::STATE_INSENSITIVE) ? - (_inactive_pixbuf ? _inactive_pixbuf : _normal_pixbuf) : - (get_active() ? (_active_pixbuf ? _active_pixbuf : _normal_pixbuf) : - _normal_pixbuf); + _inactive_pixbuf : + (_pushed ? (get_active () ? _normal_pixbuf : _active_pixbuf) : + (get_active () ? _active_pixbuf : _normal_pixbuf)); } // pixbuf, if any