aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2016-02-03 15:20:52 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2016-02-03 15:31:56 +0100
commita1fa7643092ba2e1ee2cbe38392fba3d15c6718d (patch)
tree30c18a875c1d291dac0ff317083489b1b431a087 /lib
parent45413d04eacfd9dc23904cb4893918309d3a6a36 (diff)
downloadsciteco-a1fa7643092ba2e1ee2cbe38392fba3d15c6718d.tar.gz
Gtk UI: automatically configure font of the command line
* This uses the font and size of STYLE_DEFAULT. * We cannot just pass the font down to the user CSS. There are no font variables in Gtk CSS. Therefore we configure the command line widget directly. This can still be overwritten by an user CSS. * Instead of using the deprecated gtk_widget_modify_font(), we generate CSS. Ugly, but still better than writing our own style provider. * Font setting is exposed to the user using a new optional Q-Reg "lexer.font". The numeric part is the point size multiplied with 100 (fractional point size). * Font setting in lexer.auto is skipped in Curses where it is irrelevant anyway to speed up startup. * Perhaps the "Monospace" font name is also a good default value instead of Courier? fixup
Diffstat (limited to 'lib')
-rw-r--r--lib/lexer.tes4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/lexer.tes b/lib/lexer.tes
index af89c0e..89a2fd5 100644
--- a/lib/lexer.tes
+++ b/lib/lexer.tes
@@ -8,6 +8,10 @@
}
@[lexer.auto]{
+ 0EJ-1"> :Q[lexer.font]">
+ 32ESSTYLESETFONTQ[lexer.font]
+ Q[lexer.font],32ESSTYLESETSIZEFRACTIONAL
+ ' '
:M[color.init]
[_
:Q*"= Oend '