GNOME Bugzilla – Bug 763538
Wrong CSS selector used with gtk-3.20?
Last modified: 2016-03-13 10:28:24 UTC
Gtk+-3.19.11 (on Xenial beta; Gtk+ and Wayland client packages updated from Ubuntu Gnome3 Staging). The 1px padding, set internally in vtegtk.cc gtk_css_provider_load_from_data() is not set. The terminal contents are aligned to the very top left. Similarly, the extra padding is not pink with the patch from bug 763007 comment 9. Also, placing in ~/.config/gtk-3.0/gtk.css a similar entry: VteTerminal, vte-terminal { padding: 5px; -GtkWidget-cursor-aspect-ratio: 0.15; } makes no effect either. Changing the selector from "VteTerminal, vte-terminal" to "*" (either in vtegtk.cc, or in my gtk.css) makes the padding, pink background, whatever applied correctly (well, from gtk.css it's applied to all other widgets as well, but the point is that it's applied to vte too). No clue if the "VteTerminal, vte-terminal" selector does not apply to the vte widget, or if the theme provides a more specific selector which overrides it.
Created attachment 323779 [details] Inspector screenshot for CSS nodes Seems like the VTE widget bears the CSS name "widget" instead of "vte-terminal". Accordingly, a CSS like widget { padding: 5px; } does apply to VTE. The relevant code is this: #if GTK_CHECK_VERSION(3, 19, 5) gtk_widget_class_set_css_name(widget_class, VTE_TERMINAL_CSS_NAME); #endif Conclusion: PEBKAC. One cannot compile against 3.18 and then upgrade the runtime libs to 3.19. It needs to be compiled against 3.19. I still don't get why the VteTerminal selector doesn't work, though – any insight here?
This is probably part of the gtk css changes, I've seen other projects change away from using the gobject type names in css.
Nothing to see here, then.