In our app, I have put 3 buttons on the bottom of the window beside the
status bar.  I have made bare buttons and use stock images for two.  One
is a pause image, another is a play image and the third is a custom
clock image.  (specialized terminal app,  command queue features {pause,
run, timer})

Is it possible to change the foreground color of the image depending on
the state?  I have tried using the gtk.Widget.modify_fg(), but it does
not seem to work.  The reason I am trying to change it is because it is
difficult to see whether it is active or not since they are small
buttons.  I realize some of this can be changed by changing my desktop
theme.  I would like to stay with stock images if possible & it suits
the purpose.  Do I have to use custom images for this to work?

snipit:

        self.pause_btn.modify_fg(gtk.STATE_INSENSITIVE, 
gtk.gdk.color_parse("#962A1C")) # dark red
        self.pause_btn.modify_fg(gtk.STATE_NORMAL, 
gtk.gdk.color_parse("#DA311B"))      # med red
        self.pause_btn.modify_fg(gtk.STATE_PRELIGHT, 
gtk.gdk.color_parse("#F65540"))    # light red
        self.play_btn.modify_fg(gtk.STATE_INSENSITIVE, 
gtk.gdk.color_parse("#3C6E38"))  # dark green
        self.play_btn.modify_fg(gtk.STATE_NORMAL, 
gtk.gdk.color_parse("#4EBA44"))       # med green
        self.play_btn.modify_fg(gtk.STATE_PRELIGHT, 
gtk.gdk.color_parse("#58F64A"))     # light green

I just realized something that may be affecting my results.  I have an
instance of the app running some package upgrades from before this
change.  Would that cause python to not create new .pyc files for the
modified files since there is another instance loaded and running?

I'm tired, and heading off to bed.  In the morning i"ll have an updated
system with gtk+-2.8.18 to test out.
-- 
Brian Dolbec <[EMAIL PROTECTED]>
-- 
Brian <[EMAIL PROTECTED]>

_______________________________________________
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to