2019-12-28 12:16:32 +01:00
|
|
|
local common = require "core.common"
|
|
|
|
local style = {}
|
|
|
|
|
2020-04-25 10:57:35 +02:00
|
|
|
style.padding = { x = common.round(14 * SCALE), y = common.round(7 * SCALE) }
|
|
|
|
style.divider_size = common.round(1 * SCALE)
|
|
|
|
style.scrollbar_size = common.round(4 * SCALE)
|
2022-04-12 02:49:11 +02:00
|
|
|
style.expanded_scrollbar_size = common.round(12 * SCALE)
|
2020-04-25 10:57:35 +02:00
|
|
|
style.caret_width = common.round(2 * SCALE)
|
|
|
|
style.tab_width = common.round(170 * SCALE)
|
2019-12-28 12:16:32 +01:00
|
|
|
|
2020-12-04 16:15:54 +01:00
|
|
|
-- The function renderer.font.load can accept an option table as a second optional argument.
|
|
|
|
-- It shoud be like the following:
|
|
|
|
--
|
|
|
|
-- {antialiasing= "grayscale", hinting = "full"}
|
|
|
|
--
|
|
|
|
-- The possible values for each option are:
|
2020-12-06 11:23:33 +01:00
|
|
|
-- - for antialiasing: grayscale, subpixel
|
2020-12-04 16:15:54 +01:00
|
|
|
-- - for hinting: none, slight, full
|
|
|
|
--
|
2020-12-06 11:23:33 +01:00
|
|
|
-- The defaults values are antialiasing subpixel and hinting slight for optimal visualization
|
2020-12-04 16:15:54 +01:00
|
|
|
-- on ordinary LCD monitor with RGB patterns.
|
|
|
|
--
|
2020-12-06 11:23:33 +01:00
|
|
|
-- On High DPI monitor or non RGB monitor you may consider using antialiasing grayscale instead.
|
|
|
|
-- The antialiasing grayscale with full hinting is interesting for crisp font rendering.
|
2021-10-02 18:25:52 +02:00
|
|
|
style.font = renderer.font.load(DATADIR .. "/fonts/FiraSans-Regular.ttf", 15 * SCALE)
|
|
|
|
style.big_font = style.font:copy(46 * SCALE)
|
2021-09-07 15:11:20 +02:00
|
|
|
style.icon_font = renderer.font.load(DATADIR .. "/fonts/icons.ttf", 16 * SCALE, {antialiasing="grayscale", hinting="full"})
|
2021-10-02 18:25:52 +02:00
|
|
|
style.icon_big_font = style.icon_font:copy(23 * SCALE)
|
|
|
|
style.code_font = renderer.font.load(DATADIR .. "/fonts/JetBrainsMono-Regular.ttf", 15 * SCALE)
|
2019-12-28 12:16:32 +01:00
|
|
|
|
2021-12-20 13:12:37 +01:00
|
|
|
style.background = { common.color "#2e2e32" } -- Docview
|
|
|
|
style.background2 = { common.color "#252529" } -- Treeview
|
|
|
|
style.background3 = { common.color "#252529" } -- Command view
|
2020-05-09 12:10:19 +02:00
|
|
|
style.text = { common.color "#97979c" }
|
|
|
|
style.caret = { common.color "#93DDFA" }
|
|
|
|
style.accent = { common.color "#e1e1e6" }
|
2021-12-20 13:12:37 +01:00
|
|
|
-- style.dim - text color for nonactive tabs, tabs divider, prefix in log and
|
|
|
|
-- search result, hotkeys for context menu and command view
|
2020-05-09 12:10:19 +02:00
|
|
|
style.dim = { common.color "#525257" }
|
2021-12-20 13:12:37 +01:00
|
|
|
style.divider = { common.color "#202024" } -- Line between nodes
|
2020-05-09 12:10:19 +02:00
|
|
|
style.selection = { common.color "#48484f" }
|
|
|
|
style.line_number = { common.color "#525259" }
|
2021-12-20 13:12:37 +01:00
|
|
|
style.line_number2 = { common.color "#83838f" } -- With cursor
|
2020-05-09 12:10:19 +02:00
|
|
|
style.line_highlight = { common.color "#343438" }
|
|
|
|
style.scrollbar = { common.color "#414146" }
|
2021-12-20 13:12:37 +01:00
|
|
|
style.scrollbar2 = { common.color "#4b4b52" } -- Hovered
|
2022-04-12 02:49:11 +02:00
|
|
|
style.scrollbar_track = { common.color "#252529" }
|
2021-03-13 12:57:52 +01:00
|
|
|
style.nagbar = { common.color "#FF0000" }
|
|
|
|
style.nagbar_text = { common.color "#FFFFFF" }
|
|
|
|
style.nagbar_dim = { common.color "rgba(0, 0, 0, 0.45)" }
|
2021-09-17 02:47:34 +02:00
|
|
|
style.drag_overlay = { common.color "rgba(255,255,255,0.1)" }
|
|
|
|
style.drag_overlay_tab = { common.color "#93DDFA" }
|
2021-12-19 21:27:53 +01:00
|
|
|
style.good = { common.color "#72b886" }
|
2021-12-19 21:46:01 +01:00
|
|
|
style.warn = { common.color "#FFA94D" }
|
|
|
|
style.error = { common.color "#FF3333" }
|
|
|
|
style.modified = { common.color "#1c7c9c" }
|
2019-12-28 12:16:32 +01:00
|
|
|
|
|
|
|
style.syntax = {}
|
2020-05-09 12:10:19 +02:00
|
|
|
style.syntax["normal"] = { common.color "#e1e1e6" }
|
|
|
|
style.syntax["symbol"] = { common.color "#e1e1e6" }
|
|
|
|
style.syntax["comment"] = { common.color "#676b6f" }
|
2021-12-20 13:12:37 +01:00
|
|
|
style.syntax["keyword"] = { common.color "#E58AC9" } -- local function end if case
|
|
|
|
style.syntax["keyword2"] = { common.color "#F77483" } -- self int float
|
2019-12-28 12:16:32 +01:00
|
|
|
style.syntax["number"] = { common.color "#FFA94D" }
|
2021-12-20 13:12:37 +01:00
|
|
|
style.syntax["literal"] = { common.color "#FFA94D" } -- true false nil
|
2020-05-09 12:10:19 +02:00
|
|
|
style.syntax["string"] = { common.color "#f7c95c" }
|
2021-12-20 13:12:37 +01:00
|
|
|
style.syntax["operator"] = { common.color "#93DDFA" } -- = + - / < >
|
2019-12-28 12:16:32 +01:00
|
|
|
style.syntax["function"] = { common.color "#93DDFA" }
|
|
|
|
|
2021-05-26 19:16:56 +02:00
|
|
|
-- This can be used to override fonts per syntax group.
|
|
|
|
-- The syntax highlighter will take existing values from this table and
|
|
|
|
-- override style.code_font on a per-token basis, so you can choose to eg.
|
|
|
|
-- render comments in an italic font if you want to.
|
|
|
|
style.syntax_fonts = {}
|
|
|
|
-- style.syntax_fonts["comment"] = renderer.font.load(path_to_font, size_of_font, rendering_options)
|
|
|
|
|
2021-12-18 03:51:44 +01:00
|
|
|
style.log = {
|
2021-12-21 10:38:25 +01:00
|
|
|
INFO = { icon = "i", color = style.text },
|
2022-05-31 02:26:42 +02:00
|
|
|
WARN = { icon = "!", color = style.warn },
|
2021-12-21 10:36:32 +01:00
|
|
|
ERROR = { icon = "!", color = style.error }
|
2021-12-18 03:51:44 +01:00
|
|
|
}
|
|
|
|
|
2019-12-28 12:16:32 +01:00
|
|
|
return style
|