1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-15 18:57:08 +00:00

ContentDB redesign: Redesign package list dialog

This commit is contained in:
rubenwardy 2024-04-01 02:00:38 +01:00
parent 78aab8c95d
commit 1037ee2a55
9 changed files with 233 additions and 108 deletions

View file

@ -32,11 +32,8 @@ end
local function get_formspec(data)
-- Padding is increased on Android to account for notches
-- TODO: use Android API to determine size of cut outs
local window_padding = { x = PLATFORM == "Android" and 1 or 0.5, y = PLATFORM == "Android" and 0.25 or 0.5 }
local window = core.get_window_info()
local size = { x = window.max_formspec_size.x, y = window.max_formspec_size.y }
local window_padding = contentdb.get_formspec_padding()
local size = contentdb.get_formspec_size()
size.x = math.min(size.x, 20)
local W = size.x - window_padding.x * 2
local H = size.y - window_padding.y * 2