Compare commits
2 Commits
5864c74691
...
e4cba4a7c9
Author | SHA1 | Date | |
---|---|---|---|
e4cba4a7c9 | |||
6192a1e9cc |
@ -341,16 +341,22 @@ func (this *Hierarchy) drawBackgroundPart (canvas.Canvas) {
|
|||||||
// if so, windows should be transparent if the color has transparency
|
// if so, windows should be transparent if the color has transparency
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// var minimumSizeCount = 0
|
||||||
func (this *Hierarchy) doMinimumSize () {
|
func (this *Hierarchy) doMinimumSize () {
|
||||||
this.minimumClean = true
|
this.minimumClean = true
|
||||||
|
// println("doMinimumSize", minimumSizeCount)
|
||||||
|
// minimumSizeCount ++
|
||||||
|
|
||||||
|
previousMinimumSize := this.minimumSize
|
||||||
this.minimumSize = image.Point { }
|
this.minimumSize = image.Point { }
|
||||||
if this.root != nil {
|
if this.root != nil {
|
||||||
this.minimumSize = this.root.minimumSize()
|
this.minimumSize = this.root.minimumSize()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if previousMinimumSize != this.minimumSize {
|
||||||
this.link.NotifyMinimumSizeChange()
|
this.link.NotifyMinimumSizeChange()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (this *Hierarchy) newStyleApplicator () *styleApplicator {
|
func (this *Hierarchy) newStyleApplicator () *styleApplicator {
|
||||||
return &styleApplicator {
|
return &styleApplicator {
|
||||||
|
@ -83,6 +83,7 @@ func NewMemo[T any] (update func () T) Memo[T] {
|
|||||||
func (this *Memo[T]) Value () T {
|
func (this *Memo[T]) Value () T {
|
||||||
if !this.valid {
|
if !this.valid {
|
||||||
this.cache = this.update()
|
this.cache = this.update()
|
||||||
|
this.valid = true
|
||||||
}
|
}
|
||||||
return this.cache
|
return this.cache
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user