diff options
| author | ailurux <ailuruxx@gmail.com> | 2024-03-20 13:42:03 +1100 |
|---|---|---|
| committer | ailurux <ailuruxx@gmail.com> | 2024-03-20 13:42:03 +1100 |
| commit | 51dfb5b3e30caf823c2355ff957c01864f35f9f6 (patch) | |
| tree | 1f0e41397259c6e206aba136ad5070b9de30e1b1 /lua/licenses.lua | |
| parent | 170c23b832eed6dad2b118e50164464cc93e5c4c (diff) | |
| parent | a05d93a1e26181237a76da5ce398c6b08497d591 (diff) | |
| download | tangara-fw-51dfb5b3e30caf823c2355ff957c01864f35f9f6.tar.gz | |
Merge branch 'main' into themes
Diffstat (limited to 'lua/licenses.lua')
| -rw-r--r-- | lua/licenses.lua | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/lua/licenses.lua b/lua/licenses.lua index b5d1ae88..1fa392cf 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 styles = require("styles") +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 |
