Replace hypertext by buttons

This commit is contained in:
Jean-Patrick Guerrero 2020-11-15 03:26:17 +01:00
parent 6c59066f89
commit 1d2023325d
1 changed files with 4 additions and 11 deletions

View File

@ -116,7 +116,7 @@ local styles = fmt([[
style[filter;border=false]
style_type[label,field;font_size=+0]
style_type[image_button;border=false]
style_type[button;border=false;font=bold;font_size=+2]
style_type[button;border=false;font=bold;font_size=+2;content_offset=0]
style_type[item_image_button;border=false;bgimg_hovered=%s;bgimg_pressed=%s]
style[search;fgimg=%s;fgimg_hovered=%s]
style[clear;fgimg=%s;fgimg_hovered=%s]
@ -1179,7 +1179,7 @@ local function get_title_fs(query_item, favs, fs, spacing)
fs[#fs + 1] = fmt(FMT.label, 8.75, spacing - 0.1, nice_strip(ESC(get_desc(query_item)), 45))
fs[#fs + 1] = "style_type[label;font=mono;font_size=+0]"
fs[#fs + 1] = fmt(FMT.label, 8.75, spacing + 0.3, clr("#7bf", nice_strip(query_item, 35)))
fs[#fs + 1] = "style_type[label;font=normal;font_size=]"
fs[#fs + 1] = "style_type[label;font=normal]"
fs[#fs + 1] = fmt(FMT.hypertext,
13.8, spacing - 0.15, 1.1, 1.3,
@ -1247,10 +1247,7 @@ local function get_panels(data, fs)
if recipe_or_usage and not rn then
local lbl = is_recipe and ES"No recipes" or ES"No usages"
fs[#fs + 1] = fmt(FMT.hypertext,
8.29, YOFFSET + spacing + 0.3, 6.8, 1,
fmt("<center><style size=20><b>%s</b></style></center>", lbl))
fs[#fs + 1] = fmt(FMT.button, 8, YOFFSET + spacing + 0.1, 6.8, 1, "", lbl)
elseif panel.name == "title" then
get_title_fs(data.query_item, data.favs, fs, spacing)
@ -1313,8 +1310,6 @@ local function make_fs(data)
data.pagemax = max(1, ceil(#data.items / IPP))
fs[#fs + 1] = "style[pagenum;content_offset=0]"
fs[#fs + 1] = fmt(FMT.button,
5.97, -0.06, 1.36, 0.85, "pagenum",
fmt("%s / %u", clr("#ff0", data.pagenum), data.pagemax))
@ -1330,9 +1325,7 @@ local function make_fs(data)
lbl = ES"Collect items to reveal more recipes"
end
fs[#fs + 1] = fmt(FMT.hypertext,
0.05, 3, 8.29, 1,
fmt("<center><style size=20><b>%s</b></style></center>", lbl))
fs[#fs + 1] = fmt(FMT.button, -0.25, 3, 8.3, 1, "", lbl)
end
local first_item = (data.pagenum - 1) * IPP