From d41f9f703375171d5766840c9edec32ff47bb25d Mon Sep 17 00:00:00 2001 From: jacqueline Date: Thu, 29 Feb 2024 12:08:12 +1100 Subject: Use drflac instead of miniflac This one is fast as hell! Does seeking really good too. Thank u Doctor Flac. --- lua/licenses.lua | 3 --- 1 file changed, 3 deletions(-) (limited to 'lua/licenses.lua') diff --git a/lua/licenses.lua b/lua/licenses.lua index 38e58678..83437454 100644 --- a/lua/licenses.lua +++ b/lua/licenses.lua @@ -149,9 +149,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 ") - end) library("ogg", "BSD", function() xiphbsd("Copyright (c) 2002, Xiph.org Foundation") end) -- cgit v1.2.3 From ef72b25660912ff247997089abfb93e9f0b52809 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Thu, 7 Mar 2024 10:59:03 +1100 Subject: use prototype inheritance for lua screens, rather than functions this gives us a way to give each screen nice little hooks, like 'onShown' and 'onHidden'. later we can use these hooks to disable bindings for screens that aren't in-use. --- lua/licenses.lua | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'lua/licenses.lua') 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 -- cgit v1.2.3 From a78614a5806c9800956f10f993e1c70b74fbf323 Mon Sep 17 00:00:00 2001 From: ailurux Date: Thu, 7 Mar 2024 12:12:32 +1100 Subject: WIP: Getting styles from lua --- lua/licenses.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lua/licenses.lua') diff --git a/lua/licenses.lua b/lua/licenses.lua index 83437454..b5d1ae88 100644 --- a/lua/licenses.lua +++ b/lua/licenses.lua @@ -1,7 +1,7 @@ local backstack = require("backstack") local widgets = require("widgets") local font = require("font") -local theme = require("theme") +local styles = require("styles") local function show_license(text) backstack.push(function() @@ -100,7 +100,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 } -- cgit v1.2.3