lipgloss icon indicating copy to clipboard operation
lipgloss copied to clipboard

feature request: support Grid layout

Open Ehco1996 opened this issue 3 years ago • 3 comments

as title

Ehco1996 avatar Jan 25 '22 07:01 Ehco1996

Hi! Would you mind elaborating so we can understand exactly what you mean?

meowgorithm avatar Feb 08 '22 21:02 meowgorithm

sorry for late reply, what i mean is i need a UI grid layout frame (which looks like css)

https://github.com/gizak/termui have already impl this feature

exapme looks like this link

	grid := ui.NewGrid()
	termWidth, termHeight := ui.TerminalDimensions()
	grid.SetRect(0, 0, termWidth, termHeight)

	grid.Set(
		ui.NewRow(1.0/2,
			ui.NewCol(1.0/2, slg),
			ui.NewCol(1.0/2, lc),
		),
		ui.NewRow(1.0/2,
			ui.NewCol(1.0/4, ls),
			ui.NewCol(1.0/4,
				ui.NewRow(.9/3, gs[0]),
				ui.NewRow(.9/3, gs[1]),
				ui.NewRow(1.2/3, gs[2]),
			),
			ui.NewCol(1.0/2, p),
		),
	)

	ui.Render(grid)

Ehco1996 avatar Feb 10 '22 00:02 Ehco1996