From 354a3c8a0d418d31059172d731735ebd65866e54 Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Tue, 24 Oct 2023 20:36:20 +0800 Subject: [PATCH] sync pyglet --- libs/pyglet/text/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/pyglet/text/__init__.py b/libs/pyglet/text/__init__.py index 0772500..68c45e5 100644 --- a/libs/pyglet/text/__init__.py +++ b/libs/pyglet/text/__init__.py @@ -271,6 +271,8 @@ class DocumentLabel(layout.TextLayout): @color.setter def color(self, color): + r, g, b, *a = color + color = r, g, b, a[0] if a else 255 self.document.set_style(0, len(self.document.text), {'color': color}) @property