On off switch colour

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
aa73
New User
Posts: 19
Joined: Fri Aug 23, 2019 5:13 am
First Name: Alexis
Last Name: ALABERT
Company Name: LOISELET & DAIGREMONT
Country: France
Contact:

On off switch colour

Post by aa73 »

Hello,

Anyone know how to change the background colors of the "on off switch" widget?

Thank you
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: On off switch colour

Post 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.
Attachments
skonoff.css
(244 Bytes) Downloaded 245 times
on.png
on.png (1.32 KiB) Viewed 2886 times
off.png
off.png (1.32 KiB) Viewed 2886 times
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: On off switch colour

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests