pull/36257/head
Shane Smiskol 3 days ago
parent a37901b231
commit 7d446d2a37
  1. 2
      selfdrive/ui/layouts/settings/device.py
  2. 4
      system/ui/widgets/html_render.py

@ -60,7 +60,7 @@ class DeviceLayout(Widget):
button_item("Change Language", "CHANGE", callback=self._show_language_selection, enabled=ui_state.is_offroad),
dual_button_item("Reboot", "Power Off", left_callback=self._reboot_prompt, right_callback=self._power_off_prompt),
]
regulatory_btn.set_visible(TICI)
# regulatory_btn.set_visible(TICI)
return items
def _render(self, rect):

@ -1,4 +1,6 @@
import re
import time
import pyray as rl
from dataclasses import dataclass
from enum import Enum
@ -191,6 +193,7 @@ class HtmlRenderer(Widget):
return current_y - rect.y
def get_total_height(self, content_width: int) -> float:
t = time.monotonic()
total_height = 0.0
padding = 20
usable_width = content_width - (padding * 2)
@ -211,6 +214,7 @@ class HtmlRenderer(Widget):
total_height += element.margin_bottom
print(f"HtmlRenderer.get_total_height took {(time.monotonic() - t) * 1000:.4f}ms")
return total_height
def _get_font(self, weight: FontWeight):

Loading…
Cancel
Save