Re: Insensitive pixmaps
- From: Owen Taylor <otaylor redhat com>
- To: gtk-devel-list redhat com
- Subject: Re: Insensitive pixmaps
- Date: 21 Sep 1998 11:24:24 -0400
Lionel ULMER <ulmer@directprovider.net> writes:
> Hi,
>
> While coding some feature for one of my projects using Gtk (GtkSQL), I
> found that it would be really useful to be able to build GtkPixmaps
> with two different images in them, one when sensitive, one when
> unsensitive (so that Toolbars with no text can show which buttons are
> sensitive, for example).
>
> So I looked a bit in GtkPixmap's code and (well I am no Gtk expert :-)
> I think it could be done quite easily. We would need to add a new
> "new" function (for example gtk_pixmap_new_with_unsensitive) giving
> another GdkPixmap to be used in the unsensitive cases.
>
> After that, for the coding, there would be four different way to do it :
> - both pixmaps have the same Mask
> - the two Pixmaps must have the same size but any mask
> - the pixmaps can have different size, but the GtkPixmap has always
> the same size (that of the bigger GdkPixmap)
> - the GtkPixmap can change size when going from sensitive to
> unsensitive.
>
> So my two questions :
>
> 1) is this already implemented somewhere ? (I checked all the
> modifications in the latest Gtk+'s ChangeLog, but found nothing for
> Pixmaps)
>
> 2) would you find that useful ? (and would the patch be included in Gtk+
> if it works :-) ? )
>
As a historical note, originally, gtk_pixmap_new() took five
GdkPixmap arguments, one for each state.
However, when the mask was added, this was changed, presumably
because
a) When the background changes to match the state, the
need to use separate pixmaps is less.
b) Specifying 5 pixmaps and 5 masks would be extremely
clunky. (5 pixmaps was already extremely clunky)
As Tim has pointed out, you can change the pixmaps yourself
in response to "state_changed" currently.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]