mosaic icon indicating copy to clipboard operation
mosaic copied to clipboard

Stretch Text

Open TWiStErRob opened this issue 3 years ago • 2 comments

I played around a bit trying to reproduce image image

I found two things I couldn't do:

  • stretch each item to full width
    I think this is calculatable based on item.name lengths, 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: image image

@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
			}
		}
	}
}

TWiStErRob avatar Nov 08 '22 12:11 TWiStErRob

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.

JakeWharton avatar Jan 26 '23 05:01 JakeWharton

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.

TWiStErRob avatar Jan 26 '23 09:01 TWiStErRob