From f17922cf682ea61422ff788937fa13d6474ae002 Mon Sep 17 00:00:00 2001 From: Jean-Patrick Guerrero Date: Sat, 29 Aug 2020 18:34:04 +0200 Subject: [PATCH] Improve header display --- init.lua | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/init.lua b/init.lua index 9fc9b1b..3b34ca8 100644 --- a/init.lua +++ b/init.lua @@ -1191,13 +1191,17 @@ local function get_title_fs(query_item, lang_code, favs, fs, spacing) local desc = ESC(get_desc(query_item, lang_code)) desc = #desc > 33 and fmt("%s...", sub(desc, 1, 30)) or desc local t_desc = query_item - t_desc = #t_desc > 40 and fmt("%s...", sub(t_desc, 1, 37)) or t_desc + t_desc = #t_desc > 35 and fmt("%s...", sub(t_desc, 1, 32)) or t_desc + + fs[#fs + 1] = "style_type[label;font=bold;font_size=22]" + fs[#fs + 1] = fmt(FMT.label, 8.75, spacing - 0.1, desc) + fs[#fs + 1] = "style_type[label;font=mono;font_size=16]" + fs[#fs + 1] = fmt(FMT.label, 8.75, spacing + 0.3, clr("#7bf", t_desc)) + fs[#fs + 1] = "style_type[label;font=normal;font_size=16]" fs[#fs + 1] = fmt(FMT.hypertext, - 9.05, spacing - 0.1, 5.85, 1.2, - fmt("" .. - "%s\n", - query_item, desc, t_desc)) + 13.8, spacing - 0.15, 1.1, 1.3, + fmt("", query_item)) local fav = is_fav(favs, query_item) local nfavs = #favs