mnrl mnrl - 6 months ago 34
CSS Question

Can i use my own css style for gtk scrollbars in pygtk?

I've got 2 scrollbar (horizontal and vertical) widgets in my pygtk app. As you know the scrollbars have current gtk theme style by default. I want to use my own css style for gtk scrollbars only in my app. There is a tutorial here But there is no information about how to use css files that we created in a pygtk application.
How can i do this?

style_provider = Gtk.CssProvider()

css = open('/path/to/your/style.css'), 'rb') # rb needed for python 3 support
css_data =


    Gdk.Screen.get_default(), style_provider,     

Add theese codes into your to use a personal css file. The new values in your css file will be overwritten to system general styles.