Re: deactivate "enter" signal on GtkButton
- From: Mahesh Chaudhari <mahesh chaudhari ymail com>
- To: Andrew Potter <agpotter gmail com>
- Cc: "gtk-app-devel-list gnome org" <gtk-app-devel-list gnome org>
- Subject: Re: deactivate "enter" signal on GtkButton
- Date: Fri, 8 Nov 2013 11:06:18 +0800 (SGT)
Andrew,
when so ever theme style may get applied but
I am doing this in enter signal handler i.e. whenever I keep mouse pointer over button ,
style of the normal state copied to prelight state
On Thursday, 7 November 2013 10:46 AM, Andrew Potter <agpotter gmail com> wrote:
On Thu, Nov 7, 2013 at 4:10 AM, Mahesh Chaudhari
<mahesh chaudhari ymail com> wrote:
Also (unsuccessfully) tried :
void enter_button1(GtkWidget *widget, gpointer data)
{
GtkStyle *style;
style = gtk_widget_get_style(button1);
style->bg[GTK_STATE_PRELIGHT] = style->bg[GTK_STATE_NORMAL];
gtk_widget_set_style(button1, style);
}
This may not have worked because the theme style may be being applied
after you call this function.
I would make a custom CSS theme and load it with priority
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION.
See https://developer.gnome.org/gtk3/stable/GtkCssProvider.htmland
https://developer.gnome.org/gtk3/stable/GtkStyleContext.html#gtk-style-context-add-provider-for-screen
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]