intruduce `.termite` CSS class

This commit is contained in:
Albert Safin 2017-08-12 15:50:12 +07:00
parent 9521dc3b11
commit d83ba0052d
2 changed files with 4 additions and 3 deletions

View File

@ -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;
}

View File

@ -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);