Fix tooltip

This commit is contained in:
Jean-Patrick Guerrero 2020-08-31 15:07:39 +02:00
parent 8c3efefd92
commit ce59bd35d4

@ -830,10 +830,6 @@ local function strip_newline(str)
return match(str, "[^\n]*") return match(str, "[^\n]*")
end end
local function strip_prefix(str)
return match(str, ".*@.*%)(.*)()") or str
end
local function get_desc(item) local function get_desc(item)
if sub(item, 1, 1) == "_" then if sub(item, 1, 1) == "_" then
item = sub(item, 2) item = sub(item, 2)
@ -846,7 +842,6 @@ local function get_desc(item)
if true_str(desc) then if true_str(desc) then
desc = desc:trim() desc = desc:trim()
desc = strip_newline(desc) desc = strip_newline(desc)
desc = strip_prefix(desc)
if not find(desc, "%u") then if not find(desc, "%u") then
desc = toupper(desc) desc = toupper(desc)
@ -1109,13 +1104,7 @@ local function get_grid_fs(fs, rcp, spacing)
fs[#fs + 1] = fmt(FMT.image, X, Y, btn_size, btn_size, PNG.selected) fs[#fs + 1] = fmt(FMT.image, X, Y, btn_size, btn_size, PNG.selected)
end end
local btn_name = "" local btn_name = groups and fmt("group|%s|%s", groups[1], item) or item
if groups then
btn_name = fmt("group|%s|%s", groups[1], item)
elseif item ~= "" then
btn_name = item
end
fs[#fs + 1] = fmt(FMT.item_image_button, fs[#fs + 1] = fmt(FMT.item_image_button,
X, Y, btn_size, btn_size, item, btn_name, label) X, Y, btn_size, btn_size, item, btn_name, label)