mosaic
mosaic copied to clipboard
Stretch Text
I played around a bit trying to reproduce

I found two things I couldn't do:
- stretch each item to full width
I think this is calculatable based onitem.namelengths, but it feels like that goes against having a "layout system" around you. - stretch the separator and top-bottom adorning box dynamically (right now it's hard-coded)
Also probably related, I managed to shrink the main menu (Left smaller, and Files right next to it, but it feels like I am hacking something mosaic (or maybe a custom layout) should be doing in some way:

@Composable
fun MenuDropdown(menus: List<Menu>, focus: MenuItem) {
Row {
Text(" ") // screen padding
menus.forEach { menu ->
if (focus in menu.items) {
ExpandedMenu(menu, focus)
} else {
Text(" ".repeat(2 + menu.name.length + 2)) // hack to add "just enough" padding
}
}
}
}
That image is a really good north star to strive for. And I don't only mean the menu layout, but the whole thing (layers, the bonkers shadow!!!, borders, dividers, etc.). Not to mention the notion of focus and input. There are already a lot of issues filed for various components needed.
I have some infrastructure changes coming that will more easily allow us to start pursuing it aggressively.
Yeah, Volkov did some crazy good UI back in the day. I recommend setting up DOSBox and playing around with the latest version of Volkov Commander. A rudimentary rewrite of VC with all the fluff you mentioned would be a really good real life example.