From 80f60b42de1721e9b00f7cba7a58876037c9f222 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Tue, 11 Jun 2024 18:35:40 -0400 Subject: [PATCH] I lied --- internal/system/box.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/internal/system/box.go b/internal/system/box.go index 8e3230d..d34b46e 100644 --- a/internal/system/box.go +++ b/internal/system/box.go @@ -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() }