Fix orientation bug

This commit is contained in:
Gabriel Tofvesson 2024-10-11 22:01:33 +02:00
parent 2b24904c6f
commit 25a998a542
2 changed files with 8 additions and 7 deletions

View File

@ -7,6 +7,7 @@ local Event = require("gfx.event")
local Padding = require("gfx.padding") local Padding = require("gfx.padding")
local Container = require("gfx.container") local Container = require("gfx.container")
local Children = require("gfx.prop.children") local Children = require("gfx.prop.children")
local Orientation = require("gfx.prop.orientation")
local CACHE_FILE = "/.storage.cache" local CACHE_FILE = "/.storage.cache"
@ -131,7 +132,7 @@ local function itemList(groups, wBudget, hBudget, savedState, onClick, setPage,
padImport, padImport,
padNext padNext
}, },
vertical = false [Orientation:getId()] = false
} }
local bgColors = { local bgColors = {
@ -178,7 +179,7 @@ local function itemList(groups, wBudget, hBudget, savedState, onClick, setPage,
paddedText, paddedText,
countLabel countLabel
}, },
vertical = false, [Orientation:getId()] = false,
onClick = onClick and function(element, x, y, source) onClick = onClick and function(element, x, y, source)
return onClick(element, x, y, source, group) return onClick(element, x, y, source, group)
end or nil end or nil
@ -195,7 +196,7 @@ local function itemList(groups, wBudget, hBudget, savedState, onClick, setPage,
return List:new{ return List:new{
[Children:getId()] = entries, [Children:getId()] = entries,
vertical = true [Orientation:getId()] = true
}, state }, state
end end