This commit is contained in:
Alexander Heldt
2025-12-05 20:00:36 +01:00
parent 6a4486c407
commit fff9e32895
3 changed files with 61 additions and 81 deletions

View File

@@ -5,7 +5,7 @@ import gleeunit
import gleeunit/should
import musicplayer/ui/virtual_ansi
import musicplayer/ui/layout.{Layout, Node, Section, Style}
import musicplayer/ui/layout.{Layout, Section, Style}
pub fn main() -> Nil {
gleeunit.main()
@@ -19,8 +19,7 @@ pub fn foo_test() {
nodes: dict.from_list([
#(
Section("Root"),
Node(
t: layout.Container,
layout.Row(
content: "container",
style: Style(width_percent: 100, height_percent: 100),
children: [
@@ -31,8 +30,7 @@ pub fn foo_test() {
),
#(
Section("Row1"),
Node(
t: layout.Row,
layout.Row(
content: "row 1",
style: Style(width_percent: 100, height_percent: 50),
children: [
@@ -43,26 +41,21 @@ pub fn foo_test() {
),
#(
Section("A"),
Node(
t: layout.Cell,
layout.Cell(
content: "cell 1",
style: Style(width_percent: 50, height_percent: 100),
children: [],
),
),
#(
Section("B"),
Node(
t: layout.Cell,
layout.Cell(
content: "cell 2",
style: Style(width_percent: 50, height_percent: 100),
children: [],
),
),
#(
Section("Row2"),
Node(
t: layout.Row,
layout.Row(
content: "row 1",
style: Style(width_percent: 100, height_percent: 50),
children: [],