intruduce `.termite` CSS class
This commit is contained in:
parent
9521dc3b11
commit
d83ba0052d
|
@ -167,13 +167,13 @@ unique match.
|
||||||
PADDING
|
PADDING
|
||||||
=======
|
=======
|
||||||
|
|
||||||
Internal padding can be added by using CSS to style the VTE widget. Adding the
|
Internal padding can be added by using CSS to style Termite. Adding
|
||||||
following snippet to ``$XDG_CONFIG_HOME/gtk-3.0/gtk.css`` (or
|
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:
|
``~/.config/gtk-3.0/gtk.css``) will add uniform 2px padding around the edges:
|
||||||
|
|
||||||
.. code:: css
|
.. code:: css
|
||||||
|
|
||||||
VteTerminal, vte-terminal {
|
.termite {
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1624,6 +1624,7 @@ int main(int argc, char **argv) {
|
||||||
VteTerminal *vte = VTE_TERMINAL(vte_widget);
|
VteTerminal *vte = VTE_TERMINAL(vte_widget);
|
||||||
|
|
||||||
GtkWidget *hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
|
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)));
|
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), hint_overlay, TRUE, TRUE, 0);
|
||||||
gtk_box_pack_start(GTK_BOX(hbox), scrollbar, FALSE, FALSE, 0);
|
gtk_box_pack_start(GTK_BOX(hbox), scrollbar, FALSE, FALSE, 0);
|
||||||
|
|
Loading…
Reference in New Issue