From e5392161658e2e6413a5f28dd085cf21447ff45a Mon Sep 17 00:00:00 2001 From: luboslenco Date: Sun, 21 Jan 2024 19:01:08 +0100 Subject: [PATCH] Fix zui theme copy --- Sources/zui/Zui.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Sources/zui/Zui.ts b/Sources/zui/Zui.ts index 4624c10e..713a9029 100644 --- a/Sources/zui/Zui.ts +++ b/Sources/zui/Zui.ts @@ -161,10 +161,8 @@ class Zui { } set t(theme: Theme) { if (this.t != null) { - for (let key in theme) { - if (key == "theme_") continue; - if (key.startsWith("set_")) continue; - if (key.startsWith("get_")) key = key.substr(4); + for (let key of Object.getOwnPropertyNames(Theme.prototype)) { + if (key == "constructor") continue; let t_: any = this.t; let theme_: any = theme; t_[key] = theme_[key];