Change color of SpeedControl widget using css

More
02 Jan 2025 12:29 - 02 Jan 2025 21:18 #317869 by Wischi
Hello,

i am trying to change the color of the SpeedControl widget using css. It is used as the slider for feed/spindle override, the default color is orange. But I can't find out how to call it in css. I have the .css file set in the config ini and it is working if I change for example the color of labels or buttons.

This is what i tried:

speedcontrol {
     color: #9498A0;
}

Also i tried spc_rapid and spc_feed instead of speedcontrol. No effect. How to call it correctly? Thanks
Last edit: 02 Jan 2025 21:18 by Wischi.

Please Log in or Create an account to join the conversation.

More
12 Jan 2025 11:32 - 12 Jan 2025 11:32 #318757 by HansU
As far as I know the SpeedControl cannot be styled by CSS.

You have to change either the glade file or do that in a user command file (linuxcnc.org/docs/stable/html/gui/gmocca...l#_user_command_file)
with that content for example:

self.widgets.spc_spindle.set_property("color", Gdk.RGBA(0, 0, 255, 0))
Last edit: 12 Jan 2025 11:32 by HansU.
The following user(s) said Thank You: Wischi

Please Log in or Create an account to join the conversation.

More
12 Jan 2025 14:35 #318779 by Wischi
With the user command file it works perfect. Thank you!

Please Log in or Create an account to join the conversation.

Moderators: newbynobiHansU
Time to create page: 0.052 seconds
Powered by Kunena Forum