Skip to content

Commit

Permalink
Content store: Fix overlapping labels
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenwardy committed Feb 3, 2019
1 parent cf8b0ed commit 3c7e920
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions builtin/mainmenu/dlg_contentstore.lua
Expand Up @@ -430,24 +430,24 @@ function store.get_formspec()
"button[11.1,0;1,1;pend;>>]",
"container_end[]",
}

if #store.packages == 0 then
formspec[#formspec + 1] = "label[4,3;"
formspec[#formspec + 1] = fgettext("No results")
formspec[#formspec + 1] = "]"
end
else
formspec = {
"size[12,7;true]",
"position[0.5,0.55]",
"label[4,3;No packages could be retrieved]",
"label[4,3;", fgettext("No packages could be retrieved"), "]",

This comment has been minimized.

Copy link
@ClobberXD

ClobberXD Feb 3, 2019

Contributor

Doesn't fgettext work with strings that have been added to translations? Or are the strings automatically added?

"button[-0.1,",
num_per_page + 1.5,
";3,1;back;",
fgettext("Back to Main Menu"), "]",
}
end

if #store.packages == 0 then
formspec[#formspec + 1] = "label[4,3;"
formspec[#formspec + 1] = fgettext("No results")
formspec[#formspec + 1] = "]"
end

local start_idx = (cur_page - 1) * num_per_page + 1
for i=start_idx, math.min(#store.packages, start_idx+num_per_page-1) do
local package = store.packages[i]
Expand Down

0 comments on commit 3c7e920

Please sign in to comment.