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

Benoit Minisini benoit.minisini at gambas-basic.org
Mon Feb 20 18:08:08 CET 2023


Hi,

I see a lot of mails about that, so let me try to clarify...

The Picture[] array automatically adapts the returned picture to dark 
theme and right-to-left languages... except for stock icons (those with 
path beginning with 'icon:/' or 'flag:/').

In the case of stock icons, the automatic adaptation is delegated to the 
Stock class of 'gb.form' (if 'gb.form' is loaded).

But the Stock class actually does nothing. Only the default stock (the 
Gambas icons stored in the 'gb.form.stock' component) automatically 
handles dark theme and right-to-left language.

If your icon theme (Application.Theme) is a standard desktop theme, then 
dark theme and rtl language are supposed to be handled by the desktop 
theme itself, and Gambas does nothing.

Is the stock icons behaviour clearer?

-- 
Benoît Minisini.


More information about the User mailing list