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

Stretch Text #81

Open
TWiStErRob opened this issue Nov 8, 2022 · 2 comments
Open

Stretch Text #81

TWiStErRob opened this issue Nov 8, 2022 · 2 comments

Comments

@TWiStErRob
Copy link
Contributor

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
			}
		}
	}
}
@JakeWharton
Copy link
Owner

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.

@TWiStErRob
Copy link
Contributor Author

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.

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

No branches or pull requests

2 participants