Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Box/Row/Column background #82

Closed
TWiStErRob opened this issue Nov 8, 2022 · 0 comments · Fixed by #182
Closed

Box/Row/Column background #82

TWiStErRob opened this issue Nov 8, 2022 · 0 comments · Fixed by #182

Comments

@TWiStErRob
Copy link
Contributor

Might be a different solution to the same problem (#81), but probably a capability missing:
image

This knows how large the Column is horizontally, yet I have to give every single Text() a separate background = to make it look like a box (and fail because #81).

Column {
	Text("+----------------+", color = Black, background = Cyan)
	menu.items.forEach { item ->
		if (item.separator) {
			Text("| ${item.name} |", color = Black, background = Cyan)
		} else {
			Text("| ${item.name} |", color = White, background = Cyan)
		}
        }
	Text("+----------------+", color = Black, background = Cyan)
}

I would expect to have some syntax to achieve the same (or even better fully filled box-like) UI:

Column(background = Cyan) {
	Text("+----------------+", color = Black)
	menu.items.forEach { item ->
		if (item.separator) {
			Text("| ${item.name} |", color = Black)
		} else {
			Text("| ${item.name} |", color = White)
		}
        }
	Text("+----------------+", color = Black)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant