They broke the CSS custom color settings in 3.20

You may know the Nim editor from

Getting tooltips with white background for a dark gtksourceview color
scheme was already one of the harder task for GTK 3.18 -- but somehow I
managed it. Recently I got GTK 3.20 and had to notice that setting
background for tooltip does not work any more. Setting the colors was
done this way for GTK 3.18:

  str0 = ".tooltip {background-color: rgba($1, $2, $3, 0.9); color: rgba($4, $5, $6, 1.0); \n}"

proc setTTColor(fg, bg: cstring) =
  var rgba_bg: gdk3.RGBAObj
  var rgba_fg: gdk3.RGBAObj
  if not rgbaParse(rgba_fg, bg): return
  if not rgbaParse(rgba_bg, fg): return
  let str: string = str0 % map([,,,,,], proc(x: cdouble): string = $*255))
  var gerror: GError
  let provider: CssProvider = newCssProvider()
  let display: Display = displayGetDefault()
  let screen: gdk3.Screen = getDefaultScreen(display)
  styleContextAddProviderForScreen(screen, styleProvider(provider), STYLE_PROVIDER_PRIORITY_APPLICATION.cuint)
  discard loadFromData(provider, str, GSize(-1), gerror)

Even for a simple test application setting of background color seems
not to work any more:

I have the feeling that fixing this basically simple problem will take
much time again. Have already done some (Google) investigations
yesterday, but found no good hints. GtkInstector seems to be not really
helpful for tooltips unfortunately. I think I can remember some
questions about CSS problems on this list in recent months, some maybe
with replies of Mr Bassi. Have to dig :-)

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