This commit is contained in:
Sasha Koshka 2024-06-11 18:35:40 -04:00
parent 995e6fd624
commit 80f60b42de

View File

@ -523,11 +523,17 @@ func (this *box) recursiveReApply () {
// style
hierarchyStyleNonce := this.getStyleNonce()
if this.lastStyleNonce != hierarchyStyleNonce {
// remove old style
this.lastStyleNonce = hierarchyStyleNonce
if this.styleCookie != nil {
this.styleCookie.Close()
this.styleCookie = nil
}
// apply new one
if style := this.getStyle(); style != nil {
this.styleCookie = style.Apply(this.outer)
}
this.styleCookie = this.getStyle().Apply(this.outer)
this.on.styleChange.Broadcast()
}