diff options
| author | ailurux <ailuruxx@gmail.com> | 2024-04-02 11:13:50 +1100 |
|---|---|---|
| committer | ailurux <ailuruxx@gmail.com> | 2024-04-02 11:13:50 +1100 |
| commit | e20ebe7574db5aedc73f07b7bb3a0a01eae93c84 (patch) | |
| tree | 34c93ec8a80e282f3ce3e47dd60c41e46de0f8b3 /lua/licenses.lua | |
| parent | a750af35aa6afda40aadca8f7cf8db75f41a43b2 (diff) | |
| parent | 0d0c4b2307cac8436fea7276956f293262b265ed (diff) | |
| download | tangara-fw-e20ebe7574db5aedc73f07b7bb3a0a01eae93c84.tar.gz | |
Merge branch 'main' into lua-volume
Diffstat (limited to 'lua/licenses.lua')
| -rw-r--r-- | lua/licenses.lua | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/lua/licenses.lua b/lua/licenses.lua index 38e58678..1fa392cf 100644 --- a/lua/licenses.lua +++ b/lua/licenses.lua @@ -1,21 +1,24 @@ local backstack = require("backstack") local widgets = require("widgets") local font = require("font") -local theme = require("theme") +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) @@ -100,7 +103,7 @@ return function() w = lvgl.PCT(100), h = lvgl.SIZE_CONTENT, } - row:add_style(theme.list_item) + row:add_style(styles.list_item) row:Label { text = name, flex_grow = 1 } local button = row:Button {} button:Label { text = license, text_font = font.fusion_10 } @@ -149,9 +152,6 @@ return function() library("MillerShuffle", "Apache 2.0", function() apache("Copyright 2022 Ronald Ross Miller") end) - library("miniflac", "BSD", function() - bsd("Copyright (C) 2022 John Regan <john@jrjrtech.com>") - end) library("ogg", "BSD", function() xiphbsd("Copyright (c) 2002, Xiph.org Foundation") end) @@ -178,4 +178,6 @@ return function() library("tremor", "bsd", function() xiphbsd("Copyright (c) 2002, Xiph.org Foundation") end) + + return menu end |
