Insensitive pixmaps



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 :-) ? )

Anyway, thanks for Gtk, it's really cool.

-- 
  Lionel ULMER  -  bbrox@mygale.org - http://www.mygale.org/~bbrox/



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