From: Damon C. <da...@tc...> - 2009-02-11 18:50:52
|
On Feb 11, 2009, at 12:18 PM, Jeff Hobbs wrote: > On 11-Feb-09, at 10:11 AM, Joe English wrote: >> I've also found it useful to have variants based on state; for >> instance >> a toolbar icon might have a grayscale variant for when it's disabled >> and a brighter variant for when it's active. (AIUI, Qt and Gtk+ >> manage this programmatically. Tk can do this to a certain degree -- >> autostippling images when disabled, f'rinstance -- but the results >> aren't ideal.) > > I think this is something we should rely on Tk to do, then improve Tk > to do it right. treectrl has an imagetint command that should be used > by (added into) the core for such things. I wrote a toolbar for Mac that used imagetint and the transparency capabilities of tkpng to make a button that did exactly what it was supposed to as a toolbutton. If the -image option has a single image, handling disabled, pressed and active images should be automatic. If they pass in a map of image states, we don't muck with it and let them handle it all themselves. D |