[Gambas-user] How Gambas determine if the desktop is dark?
mbelmonte at belmotek.net
Tue Jul 7 12:11:26 CEST 2020
I followed the method of color luminance and as I use version 3.14 I
used the code snippet from the gambas ide sources like.
hColor = Color[Color.ButtonBackground]
If hColor.Luminance > 160 Then
Paint.Brush = Paint.Color(Color.Black)
Paint.Brush = Paint.Color(Color.White)
El 6/7/20 a las 16:23, Benoît Minisini escribió:
> Le 06/07/2020 à 15:45, Martin Belmonte a écrit :
>> What method uses Gambas to determine if the desktop theme is dark or
>> 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 text.
>> 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
> - Or if the GB_GUI_DARK_THEME environment variable is set to an
> integer number different from zero.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the User