Is there an easy way to put my program in a dark theme?
Posted
#1
(In Topic #1051)
Enthusiast

I have my project in light colors since I started it. But now I observe that it is more elegant, more readable and careful to use dark theme to consume less energy.
Anyway, me and my environmentalism.
Is there a way to convert my project to a dark theme without dying trying?
I already tried it several times but I gave up because of how huge my project is, full of forms and letters, especially in red and green because they are economic data, as well as icons that I did not take into account their background, etc.
Please, any help would be appreciated.
Greetings
For your misfortunes I am Spanish and I only know Spanish, please, be patient with me, Thank you.
Posted
Guru

Maybe using Color.Invert() in a For loop on the form controls to convert it..
Something a bit like that but probably more advanced <EMOJI seq="1f60e" tseq="1f60e">😎</EMOJI>
Posted
Enthusiast

:shock: How it works is going to be amazing. :shock:
For your misfortunes I am Spanish and I only know Spanish, please, be patient with me, Thank you.
Posted
Enthusiast

My problem is that I'm going to have to modify everything, everything, the code to resolve the issue to dark.
Nobody's fault. Only me for not having foreseen this possibility.
Note: It occurred to me now, to change the color in the .Form files but I don't know if it is possible. But even if it is possible, I am sure that within the code I assign colors, with which it will continue to be chaos.
Thanks for that attempt to help me, but I'm at a dead end.
For your misfortunes I am Spanish and I only know Spanish, please, be patient with me, Thank you.
Posted
Guru

I have this Public function in my StartUp.class…
Code (gambas)
- CheckDark(o)
then for each form class file i just add the following in the Form_Open() method…
It'll need more work though i think to check if the desktop is in dark mode.
I think the following code…
o.Foreground = If(o.Foreground = -1, Color.White, Color.Invert(o.Foreground))
may only work on non dark themes where the text is black
Posted
Enthusiast

For your misfortunes I am Spanish and I only know Spanish, please, be patient with me, Thank you.
Posted
Enthusiast

As I always tell you and I will tell you today you have done a little more good than bad. And I hope you are rewarded. Thank you.
For your misfortunes I am Spanish and I only know Spanish, please, be patient with me, Thank you.
1 guest and 0 members have just viewed this.



