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...) --- doc/sciteco.1.in | 13 +++++++++++++ doc/sciteco.7.template | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) (limited to 'doc') diff --git a/doc/sciteco.1.in b/doc/sciteco.1.in index 1d21ecf..0a96cab 100644 --- a/doc/sciteco.1.in +++ b/doc/sciteco.1.in @@ -314,6 +314,19 @@ standard library \fBsession.tes\fP macros. When the \(lqsession.vcs\(rq macro is used, these files will also be created in the roots of Git, Mercurial and Subversion repositories or working copies. +.TP +.B $SCITECOCONFIG/.teco_css +When using the Gtk UI, this will be the location of a +CSS file that can be used to apply \*(ST color schemes +to the entire UI and to do other style customizations. +.TP +.B @pkgdatadir@/fallback.css +When using the Gtk UI, this is a fallback stylesheet +in case +.B $SCITECOCONFIG/.teco_css +does not exist. +It may also be used as a template for +.BR $SCITECOCONFIG/.teco_css . . . .SH SEE ALSO diff --git a/doc/sciteco.7.template b/doc/sciteco.7.template index bdb25bc..9f3ba8f 100644 --- a/doc/sciteco.7.template +++ b/doc/sciteco.7.template @@ -688,6 +688,48 @@ macro or \fBED\fP hook (for syntax highlighting). \*(ST ships with a standard library with color schemes and lexer configurations for a wide range of languages. . +.SS Gtk CSS Styling +. +While the tools mentioned above are sufficient for +Curses UIs, the Gtk+ 3 UI has many more styling possibilities. +The basic color scheme will be automatically effective for +the buffer view since this is handled by Scintilla. +In order to apply the color scheme to the other UI components, +a CSS file must be provided that overrides certain styling +settings of the Gtk theme. +.LP +Therefore \*(ST automatically exports the following Gtk +CSS variables that can be referred to by user-provided +CSS files: +.TP +.B @sciteco_default_fg_color +The foreground color of Scintilla's \fBSTYLE_DEFAULT\fP. +.TP +.B @sciteco_default_bg_color +The background color of Scintilla's \fBSTYLE_DEFAULT\fP. +.TP +.B @sciteco_calltip_fg_color +The foreground color of Scintilla's \fBSTYLE_CALLTIP\fP. +.TP +.B @sciteco_calltip_bg_color +The background color of Scintilla's \fBSTYLE_CALLTIP\fP. +.LP +Furthermore, \*(ST defines the following named widgets for its +main UI components: \fB#sciteco-info-bar\fP, \fB#sciteco-message-bar\fP, +\fB#sciteco-cmdline\fP and \fB#sciteco-info-popup\fP. +.LP +The CSS file is loaded from +.B $SCITECOCONFIG/.teco_css +if it is existing. +Else, \*(ST loads the fallback CSS at +.BR @pkgdatadir@/fallback.css , +which can also be used as a template when writing \fB.teco_css\fP. +The CSS file can be written such that it works for any +\*(ST color scheme and may also be used to tweak other +aspects of \*(ST's user interface. +Please refer to the Gtk documentation for more details on +CSS theming. +. . .SH ARITHMETICS AND EXPRESSIONS . @@ -1792,6 +1834,12 @@ Scinterm manual, documenting the mapping of .UR http://foicica.com/scinterm/manual.html Scinterm manual .UE +.TP +Gtk+ 3 documentation, containg details about +its CSS support and syntax: +.UR https://developer.gnome.org/gtk3/stable/GtkCssProvider.html +GtkCssProvider +.UE . . .SH AUTHOR -- cgit v1.2.3