diff options
-rw-r--r-- | core/gui.lua | 4 | ||||
-rw-r--r-- | themes/dark.lua | 12 | ||||
-rw-r--r-- | themes/light.lua | 12 | ||||
-rw-r--r-- | themes/term.lua | 4 |
4 files changed, 15 insertions, 17 deletions
diff --git a/core/gui.lua b/core/gui.lua index dbbab6ce..a8900345 100644 --- a/core/gui.lua +++ b/core/gui.lua @@ -19,6 +19,8 @@ local gui = gui -- The text displayed by the buffer statusbar. module('gui')]] +local theme = _HOME..'/themes/'..(not CURSES and 'light' or 'term')..'.lua' + -- Helper function for printing messages to buffers. -- @see gui._print local function _print(buffer_type, ...) @@ -157,8 +159,6 @@ function gui.goto_file(filename, split, preferred_view, sloppy) io.open_file(filename) end -local theme = _HOME..'/themes/'..(not CURSES and 'light' or 'term')..'.lua' - --- -- Sets the editor theme name to *name* or prompts the user to select one from a -- list of themes found in the *`_USERHOME`/themes/* and *`_HOME`/themes/* diff --git a/themes/dark.lua b/themes/dark.lua index 45764062..763f3831 100644 --- a/themes/dark.lua +++ b/themes/dark.lua @@ -51,15 +51,13 @@ property['color.light_green'] = 0x80CC80 --property['color.light_lavender'] = 0xFFCCCC property['color.light_blue'] = 0xFFCC80 --- Default style. -local font, size = 'Bitstream Vera Sans Mono', 10 +-- Default font. +property['font'], property['fontsize'] = 'Bitstream Vera Sans Mono', 10 if WIN32 then - font = 'Courier New' + property['font'] = 'Courier New' elseif OSX then - font, size = 'Monaco', 12 + property['font'], property['fontsize'] = 'Monaco', 12 end -property['style.default'] = 'font:'..font..',size:'..size.. - ',fore:$(color.light_grey),back:$(color.black)' -- Token styles. property['style.nothing'] = '' @@ -82,6 +80,8 @@ property['style.embedded'] = '$(style.tag),back:$(color.light_black)' property['style.identifier'] = '$(style.nothing)' -- Predefined styles. +property['style.default'] = 'font:$(font),size:$(fontsize)'.. + ',fore:$(color.light_grey),back:$(color.black)' property['style.linenumber'] = 'fore:$(color.dark_grey),back:$(color.black)' property['style.bracelight'] = 'fore:$(color.light_blue)' property['style.bracebad'] = 'fore:$(color.light_red)' diff --git a/themes/light.lua b/themes/light.lua index 6ea1a292..25783a6b 100644 --- a/themes/light.lua +++ b/themes/light.lua @@ -51,15 +51,13 @@ property['color.light_red'] = 0x8080CC --property['color.light_lavender'] = 0xFFCCCC property['color.light_blue'] = 0xFFCC80 --- Default style. -local font, size = 'Bitstream Vera Sans Mono', 10 +-- Default font. +property['font'], property['fontsize'] = 'Bitstream Vera Sans Mono', 10 if WIN32 then - font = 'Courier New' + property['font'] = 'Courier New' elseif OSX then - font, size = 'Monaco', 12 + property['font'], property['fontsize'] = 'Monaco', 12 end -property['style.default'] = 'font:'..font..',size:'..size.. - ',fore:$(color.light_black),back:$(color.white)' -- Token styles. property['style.nothing'] = '' @@ -82,6 +80,8 @@ property['style.embedded'] = '$(style.tag),back:$(color.dark_white)' property['style.identifier'] = '$(style.nothing)' -- Predefined styles. +property['style.default'] = 'font:$(font),size:$(fontsize)'.. + ',fore:$(color.light_black),back:$(color.white)' property['style.linenumber'] = 'fore:$(color.grey),back:$(color.white)' property['style.bracelight'] = 'fore:$(color.light_blue)' property['style.bracebad'] = 'fore:$(color.light_red)' diff --git a/themes/term.lua b/themes/term.lua index 23d06678..43c6cbdc 100644 --- a/themes/term.lua +++ b/themes/term.lua @@ -27,9 +27,6 @@ property['color.light_magenta'] = 0xFF00FF property['color.light_cyan'] = 0xFFFF00 property['color.light_white'] = 0xFFFFFF --- Default style. -property['style.default'] = 'fore:$(color.white),back:$(color.black)' - -- Token styles. property['style.nothing'] = '' property['style.class'] = 'fore:$(color.yellow)' @@ -51,6 +48,7 @@ property['style.embedded'] = '$(style.tag),back:$(color.black),bold' property['style.identifier'] = '$(style.nothing)' -- Predefined styles. +property['style.default'] = 'fore:$(color.white),back:$(color.black)' property['style.linenumber'] = '$(style.default)' property['style.bracelight'] = 'fore:$(color.black),back:$(color.white)' property['style.bracebad'] = 'fore:$(color.red),bold' |