From 4c3c071e7b8f34d3b77a0232ef907350a992a49e Mon Sep 17 00:00:00 2001 From: Julian Hurst Date: Sat, 22 Mar 2025 18:39:17 +0100 Subject: Refactor styles to be widget specific (except border) --- cmd/list_strictsz.ha | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'cmd/list_strictsz.ha') diff --git a/cmd/list_strictsz.ha b/cmd/list_strictsz.ha index e0a371d..6802387 100644 --- a/cmd/list_strictsz.ha +++ b/cmd/list_strictsz.ha @@ -10,14 +10,17 @@ use time; export fn main() void = { const state = tui::init()!; defer tui::finish(&state); - let li = list::newlist(&state, (1, 1), tty::ttysize { + let li = list::newscrolllist(&state, (1, 1), tty::ttysize { rows = 3, columns = 4, - }, &widget::style { - border = true, - colorfg = widget::color::BLUEFG, - colorbg = widget::color::BLUEBG, - }, "hello", "world", "bye", "world")!; + }, &list::liststyle { + style = &widget::style { + border = true, + }, + normal = widget::color::DEFAULTFG, + marked = widget::color::DEFAULTBG, + }, + "hel🎉", "world", "bye", "world")!; let l = layout::newvlayout(&li); l.layout.print(&l); }; -- cgit v1.2.3