From 14b0300b260ad14b561eb95ac573a796b424fa21 Mon Sep 17 00:00:00 2001 From: Mikalai Turankou Date: Mon, 29 Jun 2026 15:02:49 +0300 Subject: [PATCH] Fixed issue with theme "name" (de-)serialization. --- theme.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/theme.go b/theme.go index 81a2765..73d3664 100644 --- a/theme.go +++ b/theme.go @@ -713,6 +713,12 @@ func (theme *theme) addText(themeText string) bool { for d := range data.Properties() { switch tag := d.Tag(); tag { + case "name": + if d.Type() == TextNode { + if text := d.Text(); text != "" { + theme.name = text + } + } case "constants": if d.Type() == ObjectNode { if obj := d.Object(); obj != nil { @@ -928,6 +934,13 @@ func (theme *theme) String() string { } buffer.WriteString("theme {\n") + + if theme.name != "" { + buffer.WriteString("\tname = ") + writeString(theme.name) + buffer.WriteString(",\n") + } + writeConstants("colors", theme.colors) writeConstants("colors:dark", theme.darkColors) writeConstants("images", theme.images)