Page 1 of 1
On off switch colour
Posted: Tue Oct 26, 2021 11:14 am
by aa73
Hello,
Anyone know how to change the background colors of the "on off switch" widget?
Thank you
Re: On off switch colour
Posted: Tue Oct 26, 2021 2:37 pm
by Scott Klement
Hello,
Currently, the background of the on-off switch is an image to give it a gradient color and a 3d/rounded look. You could override this with a custom CSS file.
to do that, create folders in your IFS named /www/YOUR-INSTANCE/htdocs/profoundui/userdata/images/onoff and /www/YOUR-INSTANCE/htdocs/profoundui/userdata/css (if they don't already exist) and then upload the attached on.png and off.png to the "images/onoff" directory and the attached skonoff.css to the "css" directory that you just created.
In your display file, set the "external css" property to point to /profoundui/userdata/css/skonoff.css and any on-off switches on that screen will use the files that I attached for their backgrounds.
Naturally, you can use your own images, and edit the css file to customize it to your needs.
Re: On off switch colour
Posted: Tue Oct 26, 2021 2:38 pm
by Scott Klement
Also, just so you know.. I had to use !important in the CSS class because (unfortunately) the image location is hard-coded in Profound UI 6 fix pack 15.0 and older releases. This will be changed in future releases so that the !important isn't needed.