Beispiel #1
0
func (t *tab) xpreferredSize(d *sizing) (width, height int) {
	for _, c := range t.children {
		w, h := c.preferredSize(d)
		if width < w {
			width = w
		}
		if height < h {
			height = h
		}
	}
	return width, height + int(C.tabGetTabHeight(t.hwnd))
}
Beispiel #2
0
func (t *tab) preferredSize(d *sizing) (width, height int) {
	for _, s := range t.tabs {
		w, h := s.child.preferredSize(d)
		if width < w {
			width = w
		}
		if height < h {
			height = h
		}
	}
	return width, height + int(C.tabGetTabHeight(t._hwnd))
}
Beispiel #3
0
func (t *tab) preferredSize(d *sizing) (width, height int) {
	// TODO only consider the size of the current tab?
	for _, s := range t.tabs {
		w, h := s.child.preferredSize(d)
		if width < w {
			width = w
		}
		if height < h {
			height = h
		}
	}
	return width, height + int(C.tabGetTabHeight(t._hwnd))
}