Re: [gtk-list] how to turn off prelight on buttons ?




hi Paul,

i don't know if there's a way to stop a button from setting
its state to PRELIGHT, but you can use the same colors for
the button for both NORMAL and PRELIGHT modes.
you can do this like that:

GtkWidget *button;
GtkStyle *oldstyle;
GtkStyle *newstyle;

oldstyle=gtk_widget_get_style(button);
newstyle=gtk_style_copy(oldstyle);
newstyle->fg[PRELIGHT]=oldstyle->fg[NORMAL];
newstyle->bg[PRELIGHT]=oldstyle->bg[NORMAL];
newstyle->text[PRELIGHT]=oldstyle->text[NORMAL];
gtk_widget_set_style(button, newstyle);

i think it works.
good luck!

On Fri, 15 Oct 1999, Paul Barton-Davis wrote:

> how do i disable prelight ? in theory, i could do it from the rc file,
> but that implies knowing what the NORMAL colors are, which i don't
> unless i set them too. 
> 
> is there a way to stop a button from setting its state to PRELIGHT ?
> 
> --p
> 
> -- 
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
> 
> 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]