Compare commits
1 Commits
e602a517f6
...
4ba563d48d
Author | SHA1 | Date | |
---|---|---|---|
4ba563d48d |
10
widget.go
10
widget.go
|
@ -1,8 +1,6 @@
|
||||||
package ui
|
package ui
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
|
|
||||||
"git.kirsle.net/go/render"
|
"git.kirsle.net/go/render"
|
||||||
"git.kirsle.net/go/ui/theme"
|
"git.kirsle.net/go/ui/theme"
|
||||||
)
|
)
|
||||||
|
@ -68,7 +66,7 @@ type Widget interface {
|
||||||
// child widgets and the parent.
|
// child widgets and the parent.
|
||||||
Parent() (parent Widget, ok bool)
|
Parent() (parent Widget, ok bool)
|
||||||
SetParent(parent Widget) // for the container to assign itself the parent
|
SetParent(parent Widget) // for the container to assign itself the parent
|
||||||
Children() []Widget // for containers to return their children
|
Children() []Widget // for containers to return their children
|
||||||
|
|
||||||
// Run any render computations; by the end the widget must know its
|
// Run any render computations; by the end the widget must know its
|
||||||
// Width and Height. For example the Label widget will render itself onto
|
// Width and Height. For example the Label widget will render itself onto
|
||||||
|
@ -254,12 +252,6 @@ func (w *BaseWidget) ResizeBy(v render.Rect) {
|
||||||
|
|
||||||
// ResizeAuto sets the size of the widget but doesn't set the fixedSize flag.
|
// ResizeAuto sets the size of the widget but doesn't set the fixedSize flag.
|
||||||
func (w *BaseWidget) ResizeAuto(v render.Rect) {
|
func (w *BaseWidget) ResizeAuto(v render.Rect) {
|
||||||
if w.ID() == "Frame<Window Body>" {
|
|
||||||
fmt.Printf("%s: ResizeAuto Called: %+v\n",
|
|
||||||
w.ID(),
|
|
||||||
v,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
w.width = v.W
|
w.width = v.W
|
||||||
w.height = v.H
|
w.height = v.H
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user