Selected text color in HAL_SpinButton

More
6 years 1 month ago #182626 by aekhv
Hi everyone,

Is it possible to change the color of selected text in HAL_SpinButton? By default it's light-light-gray, and it's really hard to see is anything selected or not. I didn't find any color's options in the Glade editor.

Attachment not found

Please Log in to join the conversation.

More
6 years 1 month ago #182865 by aekhv
Finally solved! :woohoo:
Code:
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import gtk import linuxcnc def __init__(self, halcomp, builder, useropts): self.builder = builder spinbtn = self.builder.get_object('spinbutton1') # Border spinbtn.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse("black")) spinbtn.modify_bg(gtk.STATE_INSENSITIVE, gtk.gdk.color_parse("black")) # Up/down arrows spinbtn.modify_fg(gtk.STATE_NORMAL, gtk.gdk.color_parse("#00ff00")) spinbtn.modify_fg(gtk.STATE_INSENSITIVE, gtk.gdk.color_parse("red")) # Selected text background spinbtn.modify_base(gtk.STATE_ACTIVE, gtk.gdk.color_parse("blue")) # Selected text spinbtn.modify_text(gtk.STATE_ACTIVE, gtk.gdk.color_parse("white")) def get_handlers(halcomp, builder, useropts): return [HandlerClass(halcomp, builder, useropts)]

Attachment not found



Attachment not found

Please Log in to join the conversation.

More
6 years 1 month ago #182992 by cmorley
You should be able to do this by using a modified theme too.
Some where on the forum was some question about themes for gscreen.
The solutions should be similar for gmoccapy

Please Log in to join the conversation.

Time to create page: 0.081 seconds
Powered by Kunena Forum