mirror of
https://github.com/Insality/druid.git
synced 2025-09-28 10:32:20 +02:00
Blocker by default is enabled, update color palette, add rich text split by characters option, able to pass a data to GO widgets
This commit is contained in:
@@ -29,6 +29,7 @@ local function add_word(text, settings, words)
|
||||
end
|
||||
|
||||
words[#words + 1] = data
|
||||
return data
|
||||
end
|
||||
|
||||
|
||||
@@ -44,7 +45,16 @@ local function split_line(line, settings, words)
|
||||
else
|
||||
local wi = #words
|
||||
for word in trimmed_text:gmatch("%S+") do
|
||||
add_word(word .. " ", settings, words)
|
||||
if settings.split_to_characters then
|
||||
for i = 1, #word do
|
||||
local symbol = utf8.sub(word, i, i)
|
||||
local w = add_word(symbol, settings, words)
|
||||
w.nobr = true
|
||||
end
|
||||
add_word(" ", settings, words)
|
||||
else
|
||||
add_word(word .. " ", settings, words)
|
||||
end
|
||||
end
|
||||
local first = words[wi + 1]
|
||||
first.text = ws_start .. first.text
|
||||
|
Reference in New Issue
Block a user