[Gambas-user] How Gambas determine if the desktop is dark?
g4mba5 at gmail.com
Mon Jul 6 16:23:07 CEST 2020
Le 06/07/2020 à 15:45, Martin Belmonte a écrit :
> What method uses Gambas to determine if the desktop theme is dark or light?
> I try to find out so that the programs I made with Gambas adapt to the
> desktop in other aspects beyond the standard icons and the color of the
> Specifically I use paint to draw by code the images that I will show in
> drawing tools.
The Application.DarkTheme property is TRUE if:
- The luminance of the default background color is lower or equal than 50%.
- Or if the GB_GUI_DARK_THEME environment variable is set to an integer
number different from zero.
More information about the User