Move sidebar into account tabs
This is accomplished through a bit of a hack, the statusbar is able to be a child of multiple dudes
This commit is contained in:
parent
e463c38476
commit
1c41b63f08
2 changed files with 34 additions and 21 deletions
lib/ui
|
@ -8,7 +8,7 @@ import (
|
|||
|
||||
type Stack struct {
|
||||
children []Drawable
|
||||
onInvalidate func(d Drawable)
|
||||
onInvalidate []func(d Drawable)
|
||||
}
|
||||
|
||||
func NewStack() *Stack {
|
||||
|
@ -16,12 +16,12 @@ func NewStack() *Stack {
|
|||
}
|
||||
|
||||
func (stack *Stack) OnInvalidate(onInvalidate func (d Drawable)) {
|
||||
stack.onInvalidate = onInvalidate
|
||||
stack.onInvalidate = append(stack.onInvalidate, onInvalidate)
|
||||
}
|
||||
|
||||
func (stack *Stack) Invalidate() {
|
||||
if stack.onInvalidate != nil {
|
||||
stack.onInvalidate(stack)
|
||||
for _, fn := range stack.onInvalidate {
|
||||
fn(stack)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue