From e768487fe3ef9ec8f94cea11ad6587c49c32422a Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Tue, 2 Feb 2016 14:42:58 +0100 Subject: Gtk UI: full color scheme support * implemented by exporting the most important Scintilla STYLEs as CSS variables and defining named widgets for the main UI components. * ~/.teco_css will then apply the Scintilla styles to the Gtk UI. This file is also for additional tweaks, e.g. enabling translucency. * A fallback.css is provided which does just that and is able to apply the terminal.tes and solarized.tes color schemes. * Other important aspects of theming like font sizes and names have not yet been dealt with. (We may want to apply the corresponding Scintilla settings to some widgets...) --- src/interface-gtk/interface-gtk.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/interface-gtk/interface-gtk.h') diff --git a/src/interface-gtk/interface-gtk.h b/src/interface-gtk/interface-gtk.h index 4563d5f..eff4597 100644 --- a/src/interface-gtk/interface-gtk.h +++ b/src/interface-gtk/interface-gtk.h @@ -75,6 +75,8 @@ public: } ViewCurrent; typedef class InterfaceGtk : public Interface { + GtkCssProvider *css_var_provider; + GtkWidget *window; GtkWidget *vbox; @@ -102,7 +104,7 @@ typedef class InterfaceGtk : public Interface { GAsyncQueue *event_queue; public: - InterfaceGtk() : Interface(), + InterfaceGtk() : css_var_provider(NULL), window(NULL), vbox(NULL), info_type(INFO_TYPE_BUFFER), info_current(NULL), @@ -170,6 +172,8 @@ public: private: static void widget_set_font(GtkWidget *widget, const gchar *font_name); + void set_css_variables_from_view(ViewGtk *view); + void refresh_info(void); void cmdline_insert_chr(gint &pos, gchar chr); } InterfaceCurrent; -- cgit v1.2.3