[Gambas-devel] gb.gtk 05806 / qt bug

Benoit Minisini gambas at ...1...
Sun Aug 7 20:28:02 CEST 2005


On Sunday 07 August 2005 20:12, Daniel Campos wrote:
> Hi Benoit:
> >In the version I will release, I made a Stock class in the gambas part of
> > the gb.qt component, AND the same Stock class in a new gambas part in the
> > gb.gtk component. This Stock class returns stock icons, like the class
> > you did before. But I put in the gb.gtk component only GTK+/Gnome icons,
> > and in the gb.qt component only KDE icons, all with the same name.
>
> Bad idea for GTK+:
>
> 1) GTK+ has these icons included in the same library, so you're wasting
> memory
> having it twice in memory (and hard disk).

So this is the reason I didn't find them! I waste hard disk, but not memory as 
the picture files are memory mapped.

>
> 2) Icons can change with the theme. What to do then? They will not look
> at the rest
> of applications.

Do the stock icons included in the library change with the theme ? Are icon 
themes a GTK+ feature or a Gnome feature ?

>
> I'll write the Stock class directly in the C++ part of the gb.gtk
> component for the next release.
>

OK. But please can you use the following syntax? Stock["XX/a/b/c"] where XX is 
the size of the icon: 16, 32, ... and 'a/b/c' the path to the icon - without 
any extension at the end. And can you simplify a bit the way GTK+ name its 
icons, by using subdirectories: Stock["16/text/bold"] for example, or 
Stock["16/device/harddisk"].

If path is not found, Stock must find a icon of a different size, scale it, 
and return it.

This way, I will be able to make a gb.qt gambas part that will use the same 
syntax, and equivalent icons. As for gb.qt.kde, I will override the Stock 
class so that it uses the KDE icon themes.

Regards,

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the Devel mailing list