From 7dc8596bbd26c7c1b07b4edc9c8397472244fbe9 Mon Sep 17 00:00:00 2001 From: mawei Date: Wed, 3 Jun 2026 11:44:18 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E7=BB=9F=E4=B8=80=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E5=AD=97=E4=BD=93=E5=A4=A7=E5=B0=8F=EF=BC=8C=E5=85=8D=E8=B4=A3?= =?UTF-8?q?=E5=A3=B0=E6=98=8E=E6=94=B9=E4=B8=BA=E7=BA=A2=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- selfdrive/ui/layouts/home.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/selfdrive/ui/layouts/home.py b/selfdrive/ui/layouts/home.py index 18c6c235..013a664c 100644 --- a/selfdrive/ui/layouts/home.py +++ b/selfdrive/ui/layouts/home.py @@ -183,25 +183,23 @@ class HomeLayout(Widget): def _render_home_content(self): # Display welcome text centered in content area font = gui_app.font(FontWeight.BOLD) - light_font = gui_app.font(FontWeight.NORMAL) text = "欢迎选用 MR.ONE" subtitle = "这不是自动驾驶,请注意行车安全!" - font_size = 120 - sub_font_size = 50 + font_size = 90 text_size = measure_text_cached(font, text, font_size) - sub_size = measure_text_cached(light_font, subtitle, sub_font_size) + sub_size = measure_text_cached(font, subtitle, font_size) cx = self.content_rect.x + self.content_rect.width / 2 cy = self.content_rect.y + self.content_rect.height / 2 x = int(cx - text_size.x / 2) - y = int(cy - text_size.y) + y = int(cy - text_size.y - sub_size.y / 2 - 15) rl.draw_text_ex(font, text, rl.Vector2(x, y), font_size, 0, rl.WHITE) sx = int(cx - sub_size.x / 2) - sy = y + text_size.y + 30 - rl.draw_text_ex(light_font, subtitle, rl.Vector2(sx, sy), sub_font_size, 0, rl.Color(200, 200, 200, 255)) + sy = int(cy + text_size.y / 2 + 15) + rl.draw_text_ex(font, subtitle, rl.Vector2(sx, sy), font_size, 0, rl.Color(255, 50, 50, 255)) def _render_update_view(self): self.update_alert.render(self.content_rect)