From d83ba0052d57d262549d6f5d5d3769e157975710 Mon Sep 17 00:00:00 2001 From: Albert Safin Date: Sat, 12 Aug 2017 15:50:12 +0700 Subject: [PATCH] intruduce `.termite` CSS class --- README.rst | 6 +++--- termite.cc | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 62e41ab..ea2db58 100644 --- a/README.rst +++ b/README.rst @@ -167,13 +167,13 @@ unique match. PADDING ======= -Internal padding can be added by using CSS to style the VTE widget. Adding the -following snippet to ``$XDG_CONFIG_HOME/gtk-3.0/gtk.css`` (or +Internal padding can be added by using CSS to style Termite. Adding +the following snippet to ``$XDG_CONFIG_HOME/gtk-3.0/gtk.css`` (or ``~/.config/gtk-3.0/gtk.css``) will add uniform 2px padding around the edges: .. code:: css - VteTerminal, vte-terminal { + .termite { padding: 2px; } diff --git a/termite.cc b/termite.cc index 55c1ca3..77cc15e 100644 --- a/termite.cc +++ b/termite.cc @@ -1624,6 +1624,7 @@ int main(int argc, char **argv) { VteTerminal *vte = VTE_TERMINAL(vte_widget); GtkWidget *hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + gtk_style_context_add_class(gtk_widget_get_style_context(hbox),"termite"); GtkWidget *scrollbar = gtk_scrollbar_new(GTK_ORIENTATION_VERTICAL, gtk_scrollable_get_vadjustment(GTK_SCROLLABLE(vte_widget))); gtk_box_pack_start(GTK_BOX(hbox), hint_overlay, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(hbox), scrollbar, FALSE, FALSE, 0);