summaryrefslogtreecommitdiff
path: root/lua/licenses.lua
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2024-03-07 11:23:31 +1100
committerjacqueline <me@jacqueline.id.au>2024-03-07 11:23:31 +1100
commitbeb1f654958c28429323fcb9622c9c8d206979a3 (patch)
tree2e81e643a6099e5a9e884dbe2346dd2e761751e1 /lua/licenses.lua
parent14552881900bb3ed0e9ed2d4a732e4104b32ccfa (diff)
parenteba5adeb8cc606b4d685132248c6481c0aca53f6 (diff)
downloadtangara-fw-beb1f654958c28429323fcb9622c9c8d206979a3.tar.gz
Merge branch 'main' of git.sr.ht:~jacqueline/tangara-fw
Diffstat (limited to 'lua/licenses.lua')
-rw-r--r--lua/licenses.lua29
1 files changed, 17 insertions, 12 deletions
diff --git a/lua/licenses.lua b/lua/licenses.lua
index 83437454..fb0e5702 100644
--- a/lua/licenses.lua
+++ b/lua/licenses.lua
@@ -2,20 +2,23 @@ local backstack = require("backstack")
local widgets = require("widgets")
local font = require("font")
local theme = require("theme")
+local screen = require("screen")
local function show_license(text)
- backstack.push(function()
- local screen = widgets.MenuScreen {
- show_back = true,
- title = "Licenses",
- }
- screen.root:Label {
- w = lvgl.PCT(100),
- h = lvgl.SIZE_CONTENT,
- text_font = font.fusion_10,
- text = text,
- }
- end)
+ backstack.push(screen:new {
+ createUi = function(self)
+ self.menu = widgets.MenuScreen {
+ show_back = true,
+ title = "Licenses",
+ }
+ self.menu.root:Label {
+ w = lvgl.PCT(100),
+ h = lvgl.SIZE_CONTENT,
+ text_font = font.fusion_10,
+ text = text,
+ }
+ end
+ })
end
local function gpl(copyright)
@@ -175,4 +178,6 @@ return function()
library("tremor", "bsd", function()
xiphbsd("Copyright (c) 2002, Xiph.org Foundation")
end)
+
+ return menu
end