chore: 统一首页字体大小,免责声明改为红色
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user