Center pagenum/pagemax with a button

This commit is contained in:
Jean-Patrick Guerrero 2020-06-11 15:58:47 +02:00
parent 35021a6f0b
commit 4ff1fd15b8

@ -1123,6 +1123,7 @@ local function make_fs(data)
style[clear;fgimg=%s;fgimg_hovered=%s] style[clear;fgimg=%s;fgimg_hovered=%s]
style[prev_page;fgimg=%s;fgimg_hovered=%s;fgimg_pressed=%s] style[prev_page;fgimg=%s;fgimg_hovered=%s;fgimg_pressed=%s]
style[next_page;fgimg=%s;fgimg_hovered=%s;fgimg_pressed=%s] style[next_page;fgimg=%s;fgimg_hovered=%s;fgimg_pressed=%s]
style[pagenum;border=false]
]], ]],
PNG.selected, PNG.selected, PNG.selected, PNG.selected,
PNG.search, PNG.search_hover, PNG.search, PNG.search_hover,
@ -1138,9 +1139,9 @@ local function make_fs(data)
data.pagemax = max(1, ceil(#data.items / IPP)) data.pagemax = max(1, ceil(#data.items / IPP))
fs[#fs + 1] = fmt("label[%f,%f;%s / %u]", fs[#fs + 1] = fmt(FMT.button,
sfinv_only and 6.35 or (9 * 7.85) / 11, sfinv_only and 5.85 or 6, -0.1, sfinv_only and 1.82 or 1.62, 1, "pagenum",
0.06, clr("#ff0", data.pagenum), data.pagemax) fmt("%u / %u", data.pagenum, data.pagemax))
if #data.items == 0 then if #data.items == 0 then
local no_item = ES"No item to show" local no_item = ES"No item to show"