summaryrefslogtreecommitdiff
path: root/lua/widgets.lua
diff options
context:
space:
mode:
authorailurux <ailuruxx@gmail.com>2024-08-15 16:14:18 +1000
committerailurux <ailuruxx@gmail.com>2024-08-15 16:14:18 +1000
commit0662bb037b94ffc50ee7ce313c348cbe6b7f6e4c (patch)
treeeaad426a454c098be46ef7c8f04f7af8db4574ec /lua/widgets.lua
parent98cc3edb015bad08485da47e60c2b84896dc458b (diff)
downloadtangara-fw-0662bb037b94ffc50ee7ce313c348cbe6b7f6e4c.tar.gz
Some UI/themes tweaks
Diffstat (limited to 'lua/widgets.lua')
-rw-r--r--lua/widgets.lua9
1 files changed, 6 insertions, 3 deletions
diff --git a/lua/widgets.lua b/lua/widgets.lua
index f830390f..2eab3af6 100644
--- a/lua/widgets.lua
+++ b/lua/widgets.lua
@@ -8,6 +8,7 @@ local styles = require("styles")
local database = require("database")
local theme = require("theme")
local screen = require("screen")
+local images = require("images")
local img = {
db = lvgl.ImgData("//lua/img/db.png"),
@@ -112,10 +113,11 @@ function widgets.StatusBar(parent, opts)
if opts.back_cb then
local back = root:Button {
w = lvgl.SIZE_CONTENT,
- h = 12,
+ h = lvgl.SIZE_CONTENT,
}
- local label = back:Label({ text = "<", align = lvgl.ALIGN.CENTER })
- widgets.Description(label, "Back")
+ back:Image{src=images.back}
+ theme.set_style(back, "back_button")
+ widgets.Description(back, "Back")
back:onClicked(opts.back_cb)
back:onevent(lvgl.EVENT.FOCUSED, function()
local first_view = parent.content
@@ -136,6 +138,7 @@ function widgets.StatusBar(parent, opts)
text = "",
align = lvgl.ALIGN.CENTER,
flex_grow = 1,
+ pad_left = 2,
}
if opts.title then
title:set { text = opts.title }