[Gambas-devel] Release of gambas 1.9.34

Fabien Bodard sirfabien at ...176...
Wed Jul 19 16:06:23 CEST 2006


Le Mercredi 19 Juillet 2006 13:08, Daniel Campos a écrit :
> In fact there's a Stock class...
>

hi Daniel,
Happy to hear you :)

Yes i know, there is a stock class in gtk and benoit have done one in gambas 
for gb.qt. The gtk stock class is based on the libgtk internal icon 
management so it is able to evoluate with the deskop icon theme. The gb.qt 
one is based on a static bank of icons... so it is often out of style. My 
query was about to make a gtk/qt/kde layer (same api) to allow to get some 
icons from the system.

To be able to do that the used icons name can't be the gtk or kde icon 
original name but a gambas name.

For exemple :

Stock["Open_File"] will return :
GTK_STOCK_OPEN icon for gtk
KIcon->Path/Size/Type/openfile.png for kde


This is only in my mind for common icons used in toolbars...

The qt.stock need to have static icons has it don't have theme...


An other thing... We will be able to use it like a collection of icons

stock.size = 32

For each string in stock
	mypicture = stock[string]
next

(imagine have an image selector... and just track the picture on a widget to 
have the picture set ?)

this way we can use icons like many things now in gambas... i means without a 
line of code

I hope i have been more clear this time ... if not tell  me ... i will trying 
to do better.

Fabien




More information about the Devel mailing list