Re: Tooltip over dark background

Op 06/14/2016 om 10:08 PM schreef Stefan Salewski:
There seems to be no easy solution. Getting the GtkSourceView colors is
not easy, and setting the tooltip colors may be really hard. Plain
color setting is deprecated generally, so we have to use CSS I guess.
Maybe the only way is Pango markup? Well, may result in a whole day of
work, maybe a whole weekend, and maybe still not work :-(

Unfortunately documentation is really sparse and it took my some effort
to figure this out. What you are supposed to do is create a style
provider and use it to load some css with colors and effects you want.
What I did is the following:

  * Set a unique widget names which we can use in the css.
  * Create css which uses these unique widget names (eg
#MyUniqueWidgetName GtkTreeView:selected)
  * Create a GtkStyleProvider and load the css (css can be inline or in
a file)
  * Attach the style provider to the GtkStyleContext


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