diff options
author | 2013-06-21 12:56:24 -0400 | |
---|---|---|
committer | 2013-06-21 12:56:24 -0400 | |
commit | 587431211265436e38ce7ec78bf30237541b0f97 (patch) | |
tree | 67b945c2710d4ebcd6c87289e8af5923f8a5e2fc /doc | |
parent | 0edd39f543d01a4757e3a128f67b3870c7ff2bc1 (diff) | |
download | textadept-587431211265436e38ce7ec78bf30237541b0f97.tar.gz textadept-587431211265436e38ce7ec78bf30237541b0f97.zip |
`gui.set_theme()` accepts key-value argument pairs for theme properties to set.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/09_Themes.md | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/doc/09_Themes.md b/doc/09_Themes.md index b98d763c..ccdbf85e 100644 --- a/doc/09_Themes.md +++ b/doc/09_Themes.md @@ -49,17 +49,24 @@ There are two ways to go about customizing themes. You can create a new one from scratch or tweak an existing one. Creating a new one is straightforward -- all you need to do is define a set of colors and a set of styles. Just follow the example of existing themes. If instead you want to use an existing theme like -"light" but only change the font face and font size, you do not have to copy the -whole theme to your *~/.textadept/themes/light.lua* before changing the font -settings. Tweaking themes is very simple with Lua's `dofile()` function. In your -*~/.textadept/themes/light.lua*, put: +"light" but only change the font face and font size, you have two options: call +[`gui.set_theme()`][] with additional parameters from your +*~/.textadept/init.lua* or create an abbreviated *~/.textadept/themes/light.lua* +using Lua's `dofile()` function. For example: + -- File *~/.textadept/init.lua* + gui.set_theme('light', 'font', 'Monospace', 'fontsize', 12) + + -- File *~/.textadept/themes/light.lua* dofile(_HOME..'/themes/light.lua') - buffer.property['font'] = 'font face' + buffer.property['font'] = 'Monospace' buffer.property['fontsize'] = size -This loads Textadept's "light" theme, but applies your font preferences. The -same technique works for tweaking individual theme colors and/or styles. +Either one loads Textadept's "light" theme, but applies your font preferences. +The same techniques work for tweaking individual theme colors and/or styles, but +managing more changes is probably easier with the latter. + +[`gui.set_theme()`]: api/gui.html#set_theme ### Language-Specific |