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



Paul Barton-Davis wrote:
> 
> >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:
> 
> thanks. the problem with this approach is that PRELIGHT is reached
> from two states, NORMAL and ACTIVE. Thus, using the NORMAL style as
> the PRELIGHT one doesn't actually stop it from being apparent when
> NORMAL and ACTIVE are different.
> 
> it seems that the best (only?) way is to catch the "state_changed"
> signal, and if the current widget state is PRELIGHT, change it back to
> the old value handed to the signal handler.
> 
> i'd prefer a way to disable a button from ever toggling its state to
> PRELIGHT, but at least its a consistent system as it stands :)

>From a UI point of view, whether widgets change their color when the
mouse is hovering over them should be consistant throughout the desktop,
any application that alters such behavior will make the user think,
"That's odd, the buttons on this application doesn't light up when the
mouse is over them."

So I'd say submit a wishlist item for Gtk+ to have the capability of
turning off the PRELIGHT behavior at the *user's* request, and for the
whole desktop only.

As an application developer, I wouldn't fight with my widget set.

-- 
Weiqi Gao
weiqigao@a.crl.com



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