How can I retrieve gtk style context information from textview widget class without a textview widget?



Hi,

I would like to use the style information from the textview widget in another context. I want
to retrieve the text foreground color and the background color as it would be used in a textview widget
and use this style information for rendering inside a drawing area. I figured out that I can modify the
style by adding a style class with gtk_style_context_add_class (), but the textview background 
color seems to be specific to the textview widget.

In the adwaita scheme css:

GtkTextView {
  background-color: #f6f6f6; }
  GtkTextView:backdrop {
    background-color: #f6f6f6; }

Is there a way to retrieve this information of the background-color similar to the class mechanism?
I would need the same style context as if I was in a textview widget.

Friedrich






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]