feat: support adding entirely new themes via the config
This commit is contained in:
parent
d53d155c6d
commit
310221bb26
5 changed files with 126 additions and 71 deletions
|
|
@ -33,7 +33,8 @@ pub fn load_entries(palette: *Type) !usize {
|
|||
var longest_hint: usize = 0;
|
||||
var idx: usize = 0;
|
||||
try set_previous_theme(palette, tui.theme().name);
|
||||
for (Widget.themes) |theme| {
|
||||
for (Widget.list_themes()) |theme_name_| {
|
||||
const theme = Widget.get_theme_by_name(palette.allocator, theme_name_) orelse continue;
|
||||
idx += 1;
|
||||
(try palette.entries.addOne(palette.allocator)).* = .{
|
||||
.label = theme.description,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue