[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: is it possible to ignore dark theme completely?


> Picture[] is really for icons, and Picture properties, because when the
>> system icon theme changes, the internal picture is cached is used to
>> automatically reload the icons.
>>
>> You should create your own cache with a collection, so that you won't be
>> disturbed by the automatic processes behing Picture[] (dark theme
>> adaptation, and automatic reload on system icon theme changes).
>>
>> Regards,
>>
>> --
>> Benoît Minisini.
>>
>
> Yep that's what I went with,  I made a Picture.class and added a Sub
> LoadC() to it that uses a cache collection.
>
> Cheers for the advice :)
> BruceS
>

I figured another simple workaround..
I can use the Picture._Put method on program start to pre-load all the
pictures i want to stay original-color.

So if i do something like

For Each sPic As String In Dir("./Img")
 Picture["./Img/" & sPic] = Picture.Load("./Img/" & sPic)
Next

Then all future calls to load anything from the Img folder with Picture[]
uses the pre-cached original color pictures.

Personally I think some kind of switch would be good. because your comment
"Picture[] is really only meant for loading icons" was news to me. i now
need to re-visit many of my programs as the only time i ever use
Picture.Load and not Picture[] is if i want to force a reload of an image
from disk. and not ever using dark theme means i've not noticed this before
now.

Maybe in the Picture._get() method?
hPic = Picture[Path As String, Optional Size As String, KeepColor As
Boolean]

Then if KeepColor is true then no inverting happens

Respects
BruceS

Follow-Ups:
Re: is it possible to ignore dark theme completely?Bruce Steers <bsteers4@xxxxxxxxx>
References:
is it possible to ignore dark theme completely?Bruce Steers <bsteers4@xxxxxxxxx>
Re: is it possible to ignore dark theme completely?Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: is it possible to ignore dark theme completely?Bruce Steers <bsteers4@xxxxxxxxx>
Re: is it possible to ignore dark theme completely?Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: is it possible to ignore dark theme completely?Bruce Steers <bsteers4@xxxxxxxxx>
Re: is it possible to ignore dark theme completely?Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: is it possible to ignore dark theme completely?Bruce Steers <bsteers4@xxxxxxxxx>