[gnome-builder] terminal: use theme background for vte background



commit b89855d6c7ae3b4d1d7acabaf517c6bd229b5cc6
Author: Carlos Soriano <csoriano gnome org>
Date:   Thu Feb 18 13:52:06 2016 +0100

    terminal: use theme background for vte background
    
    The widget didn't have any background set, which makes the terminal
    have a white background in any theme.
    
    That's a problem when using the dark variant of builder for example.
    
    Fix that applying a style class to the terminal widget, so we can peek
    correctly the background color in order to set it manually to the
    vte widget.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=762263

 data/theme/shared.css               |    4 ++++
 plugins/terminal/gb-terminal-view.c |    1 +
 2 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/data/theme/shared.css b/data/theme/shared.css
index c7b98ac..91febaa 100644
--- a/data/theme/shared.css
+++ b/data/theme/shared.css
@@ -49,3 +49,7 @@ frame.gb-search-frame border {
     margin: 2px;
     padding: 2px;
 }
+
+.terminal {
+  background-color: @theme_base_color;
+}
diff --git a/plugins/terminal/gb-terminal-view.c b/plugins/terminal/gb-terminal-view.c
index 0066297..7368ef0 100644
--- a/plugins/terminal/gb-terminal-view.c
+++ b/plugins/terminal/gb-terminal-view.c
@@ -580,6 +580,7 @@ gb_terminal_view_init (GbTerminalView *self)
   g_settings_bind (settings, "font-name", self, "font-name", G_SETTINGS_BIND_GET);
 
   style_context = gtk_widget_get_style_context (GTK_WIDGET (self));
+  gtk_style_context_add_class (style_context, "terminal");
   g_signal_connect_object (style_context,
                            "changed",
                            G_CALLBACK (style_context_changed),


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]