Image recolouring for database indicator

custom
ailurux 1 year ago
parent 4293c48836
commit f29d31d01c
  1. BIN
      lua/img/db.png
  2. 10
      lua/theme_dark.lua
  3. 2
      lua/widgets.lua

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

@ -17,6 +17,8 @@ local theme_dark = {
{lvgl.PART.MAIN, lvgl.Style { {lvgl.PART.MAIN, lvgl.Style {
bg_opa = lvgl.OPA(100), bg_opa = lvgl.OPA(100),
bg_color = background_color, -- Root background color bg_color = background_color, -- Root background color
bg_grad_dir = 1,
bg_grad_color = "#1d0e38",
text_color = text_color text_color = text_color
}}, }},
}, },
@ -33,11 +35,13 @@ local theme_dark = {
pad_top = 1, pad_top = 1,
pad_bottom = 1, pad_bottom = 1,
bg_color = background_color, bg_color = background_color,
img_opa = 180,
radius = 5, radius = 5,
}}, }},
{lvgl.PART.MAIN | lvgl.STATE.FOCUSED, lvgl.Style { {lvgl.PART.MAIN | lvgl.STATE.FOCUSED, lvgl.Style {
bg_opa = lvgl.OPA(100), bg_opa = lvgl.OPA(100),
bg_color = highlight_color, bg_color = highlight_color,
img_opa = 255,
}}, }},
}, },
listbutton = { listbutton = {
@ -131,6 +135,12 @@ local theme_dark = {
bg_color = highlight_color, bg_color = highlight_color,
}}, }},
}, },
database_indicator = {
{lvgl.PART.MAIN, lvgl.Style {
img_recolor_opa = 180,
img_recolor = highlight_color,
}},
},
settings_title = { settings_title = {
{lvgl.PART.MAIN, lvgl.Style { {lvgl.PART.MAIN, lvgl.Style {
pad_top = 2, pad_top = 2,

@ -94,6 +94,8 @@ function widgets.StatusBar(parent, opts)
status_bar.db_updating = status_bar.root:Image { status_bar.db_updating = status_bar.root:Image {
src = "//lua/img/db.png" src = "//lua/img/db.png"
} }
theme.set_style(status_bar.db_updating, "database_indicator")
status_bar.bluetooth = status_bar.root:Image {} status_bar.bluetooth = status_bar.root:Image {}
status_bar.battery = status_bar.root:Image {} status_bar.battery = status_bar.root:Image {}
status_bar.chg = status_bar.battery:Image { status_bar.chg = status_bar.battery:Image {

Loading…
Cancel
Save