Re: Drawing an insensitive widget

Well, I realize that this thread is a bit older, but I am still trying
to figure out how to do this right. My point is the following: when the
widget is insensitive, it should look different to indicate this fact.
Specifically the widget should look "greyed out" in some sense. The
question is how to achieve this effect for a custom widget. Assume that
this widget is an icon, which is to say that it contains arbitrary RGBA
values. My question is how to adjust the drawing routine to draw a
greyed out version of the icon. In my case for a drawing call in the
case where the widget is sensitive I just copy a cairo_surface_t* to the
cairo_t* in question. Could I modify (desaturate) the surface somehow in
the case where the widget is insensitive? How is this done by the normal
widgets in gtk3?

On 30.04.2014 19:44, Ян Злобин wrote:

The GtkWidget “expose-event” signal has been replaced by a new “draw”
signal, which takes a cairo_t instead of an expose event.

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