From a59a9a58fb936f834f6d5ae36a9d0a94eccc9b0e Mon Sep 17 00:00:00 2001 From: VKamyshniy Date: Thu, 2 Oct 2014 00:24:57 +0300 Subject: [PATCH] [Summary] Removing indication of the pushed and hovered states for WavesButton and WavesIconButton --- gtk2_ardour/waves_button.cc | 22 +++++++--------------- gtk2_ardour/waves_icon_button.cc | 18 ++---------------- 2 files changed, 9 insertions(+), 31 deletions(-) diff --git a/gtk2_ardour/waves_button.cc b/gtk2_ardour/waves_button.cc index da84d934a6..14e11d8033 100644 --- a/gtk2_ardour/waves_button.cc +++ b/gtk2_ardour/waves_button.cc @@ -118,13 +118,7 @@ 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 : - (_hovering ? - (_pushed ? - Gtk::STATE_ACTIVE : - Gtk::STATE_NORMAL ) : // or Gtk::STATE_PRELIGHT if you want hovering - (get_active() ? - Gtk::STATE_ACTIVE : - Gtk::STATE_NORMAL))); + (get_active() ? Gtk::STATE_ACTIVE : Gtk::STATE_NORMAL)); int width = get_width (); int height = get_height(); @@ -186,14 +180,12 @@ WavesButton::render_text (cairo_t* cr) cairo_new_path (cr); - Gdk::Color fgcolor = style->get_fg ((get_state() == Gtk::STATE_INSENSITIVE) ? Gtk::STATE_INSENSITIVE : - (_hovering ? - (_pushed ? - Gtk::STATE_ACTIVE : - Gtk::STATE_PRELIGHT ) : - (get_active() ? - Gtk::STATE_ACTIVE : - Gtk::STATE_NORMAL))); + Gdk::Color fgcolor = style->get_fg ((get_state() == Gtk::STATE_INSENSITIVE) ? + Gtk::STATE_INSENSITIVE : + (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); /* align text */ diff --git a/gtk2_ardour/waves_icon_button.cc b/gtk2_ardour/waves_icon_button.cc index 911288210d..0b3f02088a 100644 --- a/gtk2_ardour/waves_icon_button.cc +++ b/gtk2_ardour/waves_icon_button.cc @@ -57,22 +57,8 @@ WavesIconButton::render (cairo_t* cr, cairo_rectangle_t*) if (pixbuf == 0) { pixbuf = (get_state() == Gtk::STATE_INSENSITIVE) ? (_inactive_pixbuf ? _inactive_pixbuf : _normal_pixbuf) : - (_hovering ? - (_pushed ? (_active_pixbuf ? - _active_pixbuf : - _normal_pixbuf) : - (_prelight_pixbuf ? - _prelight_pixbuf : - (get_active() ? - (_active_pixbuf ? - _active_pixbuf : - _normal_pixbuf) : - _normal_pixbuf))) : - (get_active() ? - (_active_pixbuf ? - _active_pixbuf : - _normal_pixbuf) : - _normal_pixbuf)); + (get_active() ? (_active_pixbuf ? _active_pixbuf : _normal_pixbuf) : + _normal_pixbuf); } // pixbuf, if any