summaryrefslogtreecommitdiff
path: root/lua/licenses.lua
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2024-04-18 11:38:53 +1000
committerjacqueline <me@jacqueline.id.au>2024-04-18 11:38:53 +1000
commitb17f8a3dcc36ec2479412f603c7b5e77003b80a2 (patch)
tree17a73431f0fddd2acd5cd357d782ba86d210198e /lua/licenses.lua
parentcc255f6d779b0478ae3eb795c2cae5ec864d8ef0 (diff)
downloadtangara-fw-b17f8a3dcc36ec2479412f603c7b5e77003b80a2.tar.gz
Merge the StatusBar bindings table with each screen's bindings table
Diffstat (limited to 'lua/licenses.lua')
-rw-r--r--lua/licenses.lua22
1 files changed, 7 insertions, 15 deletions
diff --git a/lua/licenses.lua b/lua/licenses.lua
index 1fa392cf..8d5813c4 100644
--- a/lua/licenses.lua
+++ b/lua/licenses.lua
@@ -5,13 +5,12 @@ local styles = require("styles")
local screen = require("screen")
local function show_license(text)
- backstack.push(screen:new {
+ backstack.push(widgets.MenuScreen:new {
+ show_back = true,
+ title = "Licenses",
createUi = function(self)
- self.menu = widgets.MenuScreen {
- show_back = true,
- title = "Licenses",
- }
- self.menu.root:Label {
+ widgets.MenuScreen.createUi(self)
+ self.root:Label {
w = lvgl.PCT(100),
h = lvgl.SIZE_CONTENT,
text_font = font.fusion_10,
@@ -74,13 +73,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
end
-return function()
- local menu = widgets.MenuScreen({
- show_back = true,
- title = "Licenses"
- })
-
- local container = menu.root:Object {
+return function(self)
+ local container = self.root:Object {
flex = {
flex_direction = "column",
flex_wrap = "nowrap",
@@ -178,6 +172,4 @@ return function()
library("tremor", "bsd", function()
xiphbsd("Copyright (c) 2002, Xiph.org Foundation")
end)
-
- return menu
end