From ba6f9491b4c2037e6b003b104732cb39ce345d50 Mon Sep 17 00:00:00 2001 From: wrp <1041589370@qq.com> Date: Wed, 11 Jun 2025 11:46:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9led=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E7=9A=84=E8=93=9D=E8=89=B2=E8=89=B2=E5=9D=97=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B8=BA=E9=BB=84=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- panels/led.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/panels/led.py b/panels/led.py index 78843332..784f5c7d 100644 --- a/panels/led.py +++ b/panels/led.py @@ -217,7 +217,11 @@ class ColorPreviewArea(Gtk.DrawingArea): self.queue_draw() def on_draw(self, da, ctx): - ctx.set_source_rgb(*self.color) + use_yellow_instead_of_blue = True + r, g, b = self.color + if use_yellow_instead_of_blue and r < 0.1 and g < 0.1 and b > 0.9: + r, g, b = 1.0, 1.0, 0.0 + ctx.set_source_rgb(r, g, b) # Set the size of the rectangle width = da.get_allocated_width() * .9 height = da.get_allocated_height() * .9