mod(widget/Text): add alignment options for Text Widget
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 36s

Updated exec example which uses centered text.
This commit is contained in:
2024-11-16 18:12:24 +01:00
parent aeac4bdc83
commit 7c9038fbda
2 changed files with 105 additions and 3 deletions

View File

@@ -44,7 +44,7 @@ pub fn main() !void {
Layout.createFrom(framing: {
var framing = Layout.Framing.init(allocator, .{}, .{
.widget = Widget.createFrom(blk: {
var widget = Widget.Text.init(&[_]Cell{
var widget = Widget.Text.init(.center, &[_]Cell{
.{ .content = "Press " },
.{ .content = "Ctrl+n", .style = .{ .fg = .{ .index = 6 } } },
.{ .content = " to launch $EDITOR" },