[Gambas-user] Explanations about stock icons and dark theme

Benoit Minisini benoit.minisini at gambas-basic.org
Tue Feb 21 15:49:09 CET 2023


Le 21/02/2023 à 15:06, Gianluigi a écrit :
> Il 21/02/23 15:01, Gianluigi ha scritto:
> 
> 
> Here is the forgotten translation :-(
> 
> Sorry to be boring, but as you know I understand little about programming.
> 
> I meant to ask this:
> 
> If I write a project with this code, do others also see the same icons 
> that I see?
> 
> See attached image.
> 
> Or does it only work if you have the IDE installed?
> 
> Sigh
> 

You should not do that. The "$(mime)/" thing is just a trick that may 
not work in the future.

By using Stock[], you depend on 'Application.Theme', which, if not set, 
depends on the current icon set of the current desktop. So the user may 
not see the same icons as you.

To see the same icons, you have to set 'Application.Theme' to 'gambas', 
or a specific icon set name (for example 'breeze'), but then that icon 
set must have been installed by the user.

If you set it to 'gambas' (or 'gambas-mono' for the black & white 
version), you will get the default Gambas icon set stored in 
'gb.form.stock' (the component will be loaded automatically).

Note that you can set 'Application.Theme' to a desktop name (for example 
'gnome'), but then you get the icon set defined by the Gnome desktop, so 
it depends on the user configuration.

To get debugging messages about what happens exactly, you can define the 
'GB_STOCK_DEBUG' environment variable to '1'.

Regards,

-- 
Benoît Minisini.



More information about the User mailing list