// See #189 func fixPopupMenusWithoutFocus() { prov, _ := gtk.CssProviderNew() prov.LoadFromData("GtkMenu { margin: 0; }") // It must be added to the screen. // Adding to the main window has the same effect as putting the CSS in // gtk-keys.css (it is overwritten by the theme) screen, _ := gdk.ScreenGetDefault() gtk.AddProviderForScreen(screen, prov, gtk.STYLE_PROVIDER_PRIORITY_USER) }
func (*RealGtk) AddProviderForScreen(s gdki.Screen, provider gtki.StyleProvider, prio uint) { gtk.AddProviderForScreen(gdka.UnwrapScreen(s), unwrapStyleProvider(provider), prio) }