gocui: window and tab position kinda correct
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
5146cdfa80
commit
cd8ddbc767
|
@ -48,7 +48,7 @@ func (w *cuiWidget) showWidgetPlacement(b bool, s string) {
|
|||
s1 = fmt.Sprintf("(wId,pId)=(%2d,%2d) ", w.id, pId)
|
||||
s1 += fmt.Sprintf("W,H()=(%2d,%2d) ", w.startW, w.startH)
|
||||
s1 += fmt.Sprintf("size()=(%2d,%2d) ", w.realWidth, w.realHeight)
|
||||
s1 += fmt.Sprintf("real()=(%2d,%2d,%2d,%2d) ", w.gocuiSize.w0, w.gocuiSize.h0, w.gocuiSize.w1, w.gocuiSize.h1)
|
||||
s1 += fmt.Sprintf("gocui()=(%2d,%2d,%2d,%2d) ", w.gocuiSize.w0, w.gocuiSize.h0, w.gocuiSize.w1, w.gocuiSize.h1)
|
||||
|
||||
switch w.widgetType {
|
||||
case toolkit.Grid:
|
||||
|
|
|
@ -58,11 +58,15 @@ func (w *cuiWidget) setTabWH() {
|
|||
startH := 1
|
||||
|
||||
for _, child := range me.rootNode.children {
|
||||
if (child.isFake) {
|
||||
w.showWidgetPlacement(logNow, "SETTABWH:")
|
||||
continue
|
||||
}
|
||||
if (w == child) {
|
||||
w.startW = startW
|
||||
w.startH = startH
|
||||
w.moveTo(w.startW, w.startH)
|
||||
w.showWidgetPlacement(logNow, "setTabWH:")
|
||||
w.setWH()
|
||||
w.showWidgetPlacement(logNow, "setTABWH:")
|
||||
return
|
||||
}
|
||||
startW += child.realWidth
|
||||
|
|
Loading…
Reference in New Issue