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/gtk-info-popup.gob | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'src/interface-gtk/gtk-info-popup.gob') diff --git a/src/interface-gtk/gtk-info-popup.gob b/src/interface-gtk/gtk-info-popup.gob index f172de6..6cb1b81 100644 --- a/src/interface-gtk/gtk-info-popup.gob +++ b/src/interface-gtk/gtk-info-popup.gob @@ -44,6 +44,10 @@ enum GTK_INFO_POPUP { DIRECTORY } Gtk:Info:Popup:Entry:Type; +/* + * NOTE: Deriving from GtkEventBox ensures that we can + * set a background on the entire popup widget. + */ class Gtk:Info:Popup from Gtk:Event:Box { public GtkAdjustment *hadjustment; public GtkAdjustment *vadjustment; @@ -92,18 +96,10 @@ class Gtk:Info:Popup from Gtk:Event:Box { gtk_widget_show_all(box); /* - * The top-level widget is a GtkEventBox, so it can have - * a background. We assign a default color since the popup - * will usually be put in an overlay and we don't want it - * to be transparent. - * It can also be styled with rounded corners etc. - * FIXME: This method of setting a background color is - * deprecated. We are supposed to use CSS style providers... + * NOTE: Everything shown except the top-level container. + * Therefore a gtk_widget_show() is enough to show our popup. */ gtk_container_add(GTK_CONTAINER(self), box); - GdkRGBA color = {0.5, 0.5, 0.5, 1.0}; - gtk_widget_override_background_color(GTK_WIDGET(self), GTK_STATE_FLAG_NORMAL, - &color); } /** -- cgit v1.2.3