[Gimp-developer] Total bafflement
David Gowers
00ai99 at gmail.com
Sun Aug 20 08:50:16 PDT 2006
Stock icons are identified by their string. there is an .h file (gimpstock.h)
somewhere that defines aliases like GIMP_STOCK_RESET,
GIMP_STOCK_LINE_SPACING
The actual mechanism for icons is more to do with GTK. Gimp registers stock
icons, then whenever you specify something like GIMP_STOCK_RESET, the icon
that Gimp registered before is used (I think stock IDs can also be
associated with text, as in the reset buttons showing an icon and also the
text 'Reset' -- but I don't fully understand that.
So if you want to add an icon, you would need to register it, provide the
image, and maybe modify the makefile.in file so that 'make install' will
include your icon when installing GIMP.
Just getting a stockbox matching the others should be simple, anyway.. look
at libgimpwidgets/gimppropwidgets.h: third parameter is 'stock_prefix' --
compare the values used here to the ones in gimpstock.h. It's fairly clear
why prefixes are used in the case of enums.
On 8/20/06, Chris Moller <moller at mollerware.com> wrote:
>
> I'm adding a hack to gimp text that lets the user set the alignment of a
> new created bit of text to something other than the upper left corner of the
> text extents. E.g., the user will be able to set horizontal alignment to
> "center" and text entered thereafter will be horizontally centered on the
> point where text entry was started.
>
I appreciate that. The current behaviour mainly makes sense for
left-justified text..
It might even make sense for right-justified text to fill to the left(with
the text moving left as you type.)
Currently, gimptextoption.c uses gimp_prop_enum_stock_box_new() to set up a
> row of little icons to let the user select left, center, right, or fill text
> justification. Just for consistency, I'd like to have the alignment options
> presented the same way, as a row of little icons.
>
> But I can't figure out where gimp is storing the blasted icons!
>
> Where does gimp_prop_enum_stock_box_new() get the images? Anyone Out
> There have a clue? At the moment, I'm using gimp_prop_enum_combo_box_new(),
> but that's not visually consistent with the stock_box stuff.
>
> Thanks
>
Hope that helps.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /lists/gimp-developer/attachments/20060820/227a5e46/attachment.html
More information about the Gimp-developer
mailing list