ui icon indicating copy to clipboard operation
ui copied to clipboard

`tabs_stack` component does not properly display tabs titles

Open brayevalerien opened this issue 2 years ago • 0 comments

Environnement

V version: V 0.4.3 d577e54 UI version: 0.0.4 OS: Windows 10

What did you do?

Here is my MWE:

import ui
import ui.component as uic

const (
	win_width  = 600
	win_height = 400
)

fn main() {
	window := ui.window(
		width: win_width
		height: win_height
		title: 'Tabs issue'
		mode: .resizable
		children: [
			uic.tabs_stack(
				id: 'tab'
				tabs: ['First tab', 'Second tab', 'Last tab']
				pages: [
					ui.label(text: 'content of tab 1'),
					ui.label(text: 'content of tab 2'),
					ui.label(text: 'content of tab 3')
				]
			),
		]
	)
	ui.run(window)
}

What did you expect to see?

A window with three tabs at the top, with a label on each tab with the name of the tab.

What did you see instead?

All three tabs are displayed, but their names are stacked on top of each others, in the place of the first tab. image

Additionally, it would be nice if the tab size depends on its name. So for instance 'First tab' would appear shorter than 'Second tab'. It would mean a non constant tab width.

brayevalerien avatar Nov 22 '23 14:11 brayevalerien