Re: Tooltip over dark background



On Tue, 2016-06-14 at 22:50 +0200, infirit wrote:
Unfortunately documentation is really sparse

Thanks for your reply.

After some testing I have indeed been able to get black text on white
background with this Nim code:

const
  str0 = ".tooltip {background-color: #fff; color: #000; \n}"

proc setTTColor() =
  var error: GError
  var provider: CssProvider = newCssProvider()
  var display: Display = displayGetDefault()
  var screen: gdk3.Screen = getDefaultScreen(display)
  styleContextAddProviderForScreen(screen, styleProvider(provider), 
STYLE_PROVIDER_PRIORITY_APPLICATION.cuint);
  discard loadFromData(provider, str0, GSize(-1), error)
  if error != nil:
    echo error.message
  objectUnref(provider);




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