mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-10-01 01:43:41 +08:00
init
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
from openpilot.system.ui.lib.multilang import tr
|
||||
from openpilot.system.ui.sunnypilot.widgets.list_view import toggle_item_sp
|
||||
from openpilot.system.ui.widgets.scroller import Scroller
|
||||
from openpilot.system.ui.widgets import Widget
|
||||
from openpilot.common.params import Params
|
||||
@@ -12,8 +14,14 @@ class DisplayLayout(Widget):
|
||||
self._scroller = Scroller(items, line_separator=True, spacing=0)
|
||||
|
||||
def _initialize_items(self):
|
||||
self._onroad_brightness_toggle = toggle_item_sp(
|
||||
param="OnroadScreenOffControl",
|
||||
title=tr("Onroad Screen: Reduced Brightness"),
|
||||
description=tr("Turn off device screen or reduce brightness after driving starts. " +
|
||||
"It automatically brightens again when screen is touched or a visible alert is displayed."),
|
||||
)
|
||||
items = [
|
||||
|
||||
self._onroad_brightness_toggle,
|
||||
]
|
||||
return items
|
||||
|
||||
|
||||
Reference in New Issue
Block a user