mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-04 13:02:09 +08:00
BigUI WIP: Size Queen
This commit is contained in:
committed by
firestar5683
parent
261b139bcc
commit
6626202ff1
@@ -12,7 +12,6 @@ from openpilot.system.ui.widgets.option_dialog import MultiOptionDialog
|
||||
from openpilot.selfdrive.ui.lib.starpilot_state import starpilot_state
|
||||
from openpilot.selfdrive.ui.layouts.settings.starpilot.panel import _SettingsPage
|
||||
from openpilot.selfdrive.ui.layouts.settings.starpilot.aethergrid import (
|
||||
AETHER_LIST_METRICS,
|
||||
AetherSliderDialog,
|
||||
DEFAULT_PANEL_STYLE,
|
||||
)
|
||||
@@ -23,8 +22,6 @@ from openpilot.selfdrive.ui.layouts.settings.starpilot.longitudinal import (
|
||||
)
|
||||
|
||||
PANEL_STYLE = DEFAULT_PANEL_STYLE
|
||||
UTILITY_ROW_HEIGHT = AETHER_LIST_METRICS.utility_row_height
|
||||
ROW_HEIGHT = AETHER_LIST_METRICS.row_height
|
||||
|
||||
# ── Theme paths & config (preserved from themes.py) ──
|
||||
|
||||
@@ -170,7 +167,7 @@ class StarPilotAppearancePersonalizeLayout(_SettingsPage):
|
||||
subtitle="",
|
||||
get_value=lambda: self._get_theme_value("WheelIcon"),
|
||||
on_click=lambda: self._show_theme_selector("WheelIcon")),
|
||||
], row_height=UTILITY_ROW_HEIGHT),
|
||||
]),
|
||||
]
|
||||
self._manager_view = AetherSettingsView(
|
||||
self, sections,
|
||||
@@ -277,7 +274,7 @@ class StarPilotAppearanceLayout(_SettingsPage):
|
||||
subtitle="",
|
||||
get_state=lambda: self._params.get_bool("HideAlerts"),
|
||||
set_state=lambda s: self._params.put_bool("HideAlerts", s)),
|
||||
], tab_key="display", column_pair="display", row_height=UTILITY_ROW_HEIGHT),
|
||||
], tab_key="display", column_pair="display"),
|
||||
|
||||
SettingSection(tr_noop("Speed Info"), [
|
||||
SettingRow("HideSpeedLimit", "toggle", tr_noop("Hide Speed Limit"),
|
||||
@@ -293,7 +290,7 @@ class StarPilotAppearanceLayout(_SettingsPage):
|
||||
subtitle="",
|
||||
get_state=lambda: self._params.get_bool("WheelSpeed"),
|
||||
set_state=lambda s: self._params.put_bool("WheelSpeed", s)),
|
||||
], tab_key="display", column_pair="display", row_height=UTILITY_ROW_HEIGHT),
|
||||
], tab_key="display", column_pair="display"),
|
||||
|
||||
# ═══ Tab 2: Widgets — driving screen widget toggles ═══
|
||||
SettingSection(tr_noop("Path Overlays"), [
|
||||
@@ -319,7 +316,7 @@ class StarPilotAppearanceLayout(_SettingsPage):
|
||||
get_state=lambda: self._params.get_bool("BlindSpotPath"),
|
||||
set_state=lambda s: self._params.put_bool("BlindSpotPath", s),
|
||||
visible=bsm),
|
||||
], tab_key="widgets", column_pair="widgets", row_height=UTILITY_ROW_HEIGHT),
|
||||
], tab_key="widgets", column_pair="widgets"),
|
||||
|
||||
SettingSection(tr_noop("Dashboard Controls"), [
|
||||
SettingRow("Compass", "toggle", tr_noop("Compass"),
|
||||
@@ -349,7 +346,7 @@ class StarPilotAppearanceLayout(_SettingsPage):
|
||||
subtitle="",
|
||||
get_state=lambda: self._params.get_bool("RotatingWheel"),
|
||||
set_state=lambda s: self._params.put_bool("RotatingWheel", s)),
|
||||
], tab_key="widgets", column_pair="widgets", row_height=UTILITY_ROW_HEIGHT),
|
||||
], tab_key="widgets", column_pair="widgets"),
|
||||
|
||||
# ═══ Tab 3: Convenience — QOL + Navigation ═══
|
||||
SettingSection(tr_noop("Quality of Life"), [
|
||||
@@ -369,7 +366,7 @@ class StarPilotAppearanceLayout(_SettingsPage):
|
||||
subtitle="",
|
||||
get_state=lambda: self._params.get_bool("StoppedTimer"),
|
||||
set_state=lambda s: self._params.put_bool("StoppedTimer", s)),
|
||||
], tab_key="convenience", column_pair="convenience", row_height=UTILITY_ROW_HEIGHT),
|
||||
], tab_key="convenience", column_pair="convenience"),
|
||||
|
||||
SettingSection(tr_noop("Navigation"), [
|
||||
SettingRow("NavigationUI", "toggle", tr_noop("Navigation Widgets"),
|
||||
@@ -388,7 +385,7 @@ class StarPilotAppearanceLayout(_SettingsPage):
|
||||
subtitle="",
|
||||
get_state=lambda: self._params.get_bool("UseVienna"),
|
||||
set_state=lambda s: self._params.put_bool("UseVienna", s)),
|
||||
], tab_key="convenience", column_pair="convenience", row_height=UTILITY_ROW_HEIGHT),
|
||||
], tab_key="convenience", column_pair="convenience"),
|
||||
|
||||
# ═══ Tab 4: Model — path/lane visualization ═══
|
||||
SettingSection(tr_noop("Path & Lanes"), [
|
||||
@@ -412,7 +409,7 @@ class StarPilotAppearanceLayout(_SettingsPage):
|
||||
subtitle="",
|
||||
get_value=lambda: self._get_path_width_display(),
|
||||
on_click=self._show_path_width_selector),
|
||||
], tab_key="model", column_pair="model", row_height=UTILITY_ROW_HEIGHT),
|
||||
], tab_key="model", column_pair="model"),
|
||||
|
||||
SettingSection(tr_noop("Edges & Colors"), [
|
||||
SettingRow("PathEdgeWidth", "value", tr_noop("Path Edge Width"),
|
||||
@@ -435,7 +432,7 @@ class StarPilotAppearanceLayout(_SettingsPage):
|
||||
subtitle="",
|
||||
get_value=lambda: f"{int(round(self._params.get_float('BorderWidth')))}%",
|
||||
on_click=lambda: self._show_float_selector("BorderWidth", 25, 250, 5, "%")),
|
||||
], tab_key="model", column_pair="model", row_height=UTILITY_ROW_HEIGHT),
|
||||
], tab_key="model", column_pair="model"),
|
||||
|
||||
# ═══ Tab 5: Theme — customization ═══
|
||||
SettingSection(tr_noop("Customization"), [
|
||||
@@ -455,7 +452,7 @@ class StarPilotAppearanceLayout(_SettingsPage):
|
||||
subtitle="",
|
||||
get_state=lambda: self._params.get_bool("RainbowPath"),
|
||||
set_state=lambda s: self._params.put_bool("RainbowPath", s)),
|
||||
], tab_key="theme", column_pair="theme", row_height=UTILITY_ROW_HEIGHT),
|
||||
], tab_key="theme", column_pair="theme"),
|
||||
|
||||
SettingSection(tr_noop("Options"), [
|
||||
SettingRow("RandomEvents", "toggle", tr_noop("Random Events"),
|
||||
@@ -470,7 +467,7 @@ class StarPilotAppearanceLayout(_SettingsPage):
|
||||
subtitle="",
|
||||
get_value=self._get_startup_alert_display,
|
||||
on_click=self._show_startup_alert_selector),
|
||||
], tab_key="theme", column_pair="theme", row_height=UTILITY_ROW_HEIGHT),
|
||||
], tab_key="theme", column_pair="theme"),
|
||||
]
|
||||
|
||||
self._manager_view = AetherSettingsView(
|
||||
|
||||
@@ -19,7 +19,6 @@ from openpilot.selfdrive.ui.layouts.settings.starpilot.aethergrid import (
|
||||
|
||||
|
||||
PANEL_STYLE = DEFAULT_PANEL_STYLE
|
||||
UTILITY_ROW_HEIGHT = AETHER_LIST_METRICS.utility_row_height
|
||||
|
||||
|
||||
def _confirm_reboot_toggle(params, key, state):
|
||||
@@ -112,7 +111,7 @@ class StarPilotAdvancedLateralLayout(_SettingsPage):
|
||||
get_state=lambda: self._params.get_bool("ForceTorqueController"),
|
||||
set_state=lambda s: _confirm_reboot_toggle(self._params, "ForceTorqueController", s),
|
||||
visible=lambda: adv() and not starpilot_state.car_state.isAngleCar and not starpilot_state.car_state.isTorqueCar),
|
||||
], row_height=UTILITY_ROW_HEIGHT),
|
||||
]),
|
||||
]
|
||||
self._manager_view = AetherSettingsView(
|
||||
self, sections,
|
||||
@@ -169,7 +168,7 @@ class StarPilotLateralLayout(_SettingsPage):
|
||||
get_value=lambda: f"{self._params.get_int('PauseLateralSpeed')} mph",
|
||||
on_click=lambda: self._show_slider("PauseLateralSpeed", 0, 100, unit=" mph"),
|
||||
visible=lambda: self._params.get_bool("QOLLateral")),
|
||||
], tab_key="steering", row_height=UTILITY_ROW_HEIGHT),
|
||||
], tab_key="steering"),
|
||||
|
||||
# ── Lane tab ──
|
||||
SettingSection("", [
|
||||
@@ -207,7 +206,7 @@ class StarPilotLateralLayout(_SettingsPage):
|
||||
get_value=lambda: f"{self._params.get_int('LaneChangeSmoothing')}",
|
||||
on_click=self._show_modal_pace_selector,
|
||||
visible=lambda: self._params.get_bool("LaneChanges")),
|
||||
], tab_key="lane", row_height=UTILITY_ROW_HEIGHT),
|
||||
], tab_key="lane"),
|
||||
|
||||
# ── Tune tab ──
|
||||
SettingSection(tr_noop("Advanced Lateral Tuning"), [
|
||||
@@ -221,7 +220,7 @@ class StarPilotLateralLayout(_SettingsPage):
|
||||
navigate_to="advanced_lateral",
|
||||
enabled=lambda: self._params.get_bool("AdvancedLateralTune"),
|
||||
disabled_label=tr_noop("Enable First")),
|
||||
], tab_key="tune", row_height=UTILITY_ROW_HEIGHT),
|
||||
], tab_key="tune"),
|
||||
SettingSection(tr_noop("Lateral Tuning"), [
|
||||
SettingRow("LateralTune", "toggle", tr_noop("Lateral Tuning"),
|
||||
subtitle=tr_noop("Miscellaneous steering control changes such as turn desires and NNFF modes."),
|
||||
@@ -242,7 +241,7 @@ class StarPilotLateralLayout(_SettingsPage):
|
||||
get_state=lambda: self._params.get_bool("NNFFLite"),
|
||||
set_state=lambda s: _confirm_reboot_toggle(self._params, "NNFFLite", s),
|
||||
visible=lambda: self._params.get_bool("LateralTune") and not self._params.get_bool("NNFF") and not starpilot_state.car_state.isAngleCar),
|
||||
], tab_key="tune", row_height=UTILITY_ROW_HEIGHT),
|
||||
], tab_key="tune"),
|
||||
]
|
||||
|
||||
self._manager_view = AetherSettingsView(
|
||||
|
||||
@@ -47,8 +47,6 @@ SECTION_GAP = AETHER_LIST_METRICS.section_gap
|
||||
SECTION_HEADER_HEIGHT = AETHER_LIST_METRICS.section_header_height
|
||||
SECTION_HEADER_GAP = AETHER_LIST_METRICS.section_header_gap
|
||||
ROW_HEIGHT = AETHER_LIST_METRICS.row_height
|
||||
UTILITY_ROW_HEIGHT = AETHER_LIST_METRICS.utility_row_height
|
||||
FADE_HEIGHT = AETHER_LIST_METRICS.fade_height
|
||||
|
||||
ACCELERATION_PROFILE_OPTIONS = [
|
||||
(ACCELERATION_PROFILES["STANDARD"], "Standard"),
|
||||
@@ -266,7 +264,7 @@ class AetherSettingsView(Widget):
|
||||
current=self._active_tab_key == tab["id"],
|
||||
hovered=hovered,
|
||||
pressed=pressed,
|
||||
title_size=24,
|
||||
title_size=26,
|
||||
subtitle_size=17,
|
||||
show_underline=True,
|
||||
style=self._panel_style,
|
||||
@@ -367,6 +365,7 @@ class AetherSettingsView(Widget):
|
||||
pressed=pressed,
|
||||
is_last=is_last,
|
||||
show_chevron=False,
|
||||
title_size=34, subtitle_size=22,
|
||||
style=self._panel_style,
|
||||
)
|
||||
elif row.type == "value":
|
||||
@@ -381,6 +380,7 @@ class AetherSettingsView(Widget):
|
||||
pressed=pressed,
|
||||
is_last=is_last,
|
||||
show_chevron=row.on_click is not None,
|
||||
title_size=34, subtitle_size=22, value_size=28,
|
||||
style=self._panel_style,
|
||||
)
|
||||
elif row.type == "action":
|
||||
@@ -398,6 +398,7 @@ class AetherSettingsView(Widget):
|
||||
pressed=pressed,
|
||||
is_last=is_last,
|
||||
action_pill=True,
|
||||
title_size=34, subtitle_size=22,
|
||||
action_text_color=action_text_color,
|
||||
action_fill=action_fill,
|
||||
action_border=action_border,
|
||||
@@ -477,7 +478,7 @@ class StarPilotLongitudinalLayout(_SettingsPage):
|
||||
navigate_to="tuning",
|
||||
enabled=lambda: self._params.get_bool("LongitudinalTune"),
|
||||
disabled_label=tr_noop("Enable First")),
|
||||
], tab_key="tune", row_height=UTILITY_ROW_HEIGHT),
|
||||
], tab_key="tune"),
|
||||
SettingSection(tr_noop("Advanced"), [
|
||||
SettingRow("AdvancedTune", "toggle", tr_noop("Advanced Longitudinal Tuning"),
|
||||
subtitle=tr_noop("Advanced acceleration and braking changes for refining launch, stopping, and actuator response."),
|
||||
@@ -489,13 +490,13 @@ class StarPilotLongitudinalLayout(_SettingsPage):
|
||||
navigate_to="advanced",
|
||||
enabled=lambda: self._params.get_bool("AdvancedLongitudinalTune"),
|
||||
disabled_label=tr_noop("Enable First")),
|
||||
], tab_key="tune", row_height=UTILITY_ROW_HEIGHT),
|
||||
], tab_key="tune"),
|
||||
SettingSection(tr_noop("Driving Personalities"), [
|
||||
SettingRow("PersonalitiesConfigure", "value", tr_noop("Configure"),
|
||||
subtitle=tr_noop("Customize the Traffic, Aggressive, Standard, and Relaxed profiles to match your driving style."),
|
||||
get_value=lambda: tr_noop("Manage"),
|
||||
navigate_to="personalities"),
|
||||
], tab_key="tune", row_height=UTILITY_ROW_HEIGHT),
|
||||
], tab_key="tune"),
|
||||
|
||||
# ── Adaptive tab ──
|
||||
SettingSection(tr_noop("Adaptive"), [
|
||||
@@ -531,7 +532,7 @@ class StarPilotLongitudinalLayout(_SettingsPage):
|
||||
subtitle=tr_noop("Display options for the speed limit controller."),
|
||||
get_value=lambda: tr_noop("Configure"),
|
||||
navigate_to="slc_visuals"),
|
||||
], tab_key="limits", column_pair="limits", row_height=UTILITY_ROW_HEIGHT),
|
||||
], tab_key="limits", column_pair="limits"),
|
||||
SettingSection(tr_noop("Override & Fallback"), [
|
||||
SettingRow("SLCFallback", "value", tr_noop("Fallback Speed"),
|
||||
subtitle="",
|
||||
@@ -545,7 +546,7 @@ class StarPilotLongitudinalLayout(_SettingsPage):
|
||||
subtitle="",
|
||||
get_value=self._get_priority_value,
|
||||
on_click=self._on_priority_clicked),
|
||||
], tab_key="limits", column_pair="limits", row_height=UTILITY_ROW_HEIGHT),
|
||||
], tab_key="limits", column_pair="limits"),
|
||||
|
||||
# ── Daily tab ──
|
||||
SettingSection(tr_noop("Cruise & Stops"), [
|
||||
@@ -580,7 +581,7 @@ class StarPilotLongitudinalLayout(_SettingsPage):
|
||||
get_value=lambda: f"{self._params.get_int('ForceStopDistanceOffset'):+d} ft",
|
||||
on_click=lambda: self._show_slider("ForceStopDistanceOffset", -20, 20, unit=" ft"),
|
||||
visible=lambda: self._params.get_bool("QOLLongitudinal") and self._params.get_bool("ForceStops")),
|
||||
], tab_key="daily", column_pair="daily", row_height=UTILITY_ROW_HEIGHT),
|
||||
], tab_key="daily", column_pair="daily"),
|
||||
SettingSection(tr_noop("Standstill & Gears"), [
|
||||
SettingRow("ForceStandstill", "toggle", tr_noop("Force Standstill"),
|
||||
subtitle="",
|
||||
@@ -612,7 +613,7 @@ class StarPilotLongitudinalLayout(_SettingsPage):
|
||||
get_state=lambda: self._params.get_bool("MapDeceleration"),
|
||||
set_state=lambda s: self._params.put_bool("MapDeceleration", s),
|
||||
visible=lambda: self._params.get_bool("QOLLongitudinal") and self._params.get_bool("MapGears")),
|
||||
], tab_key="daily", column_pair="daily", row_height=UTILITY_ROW_HEIGHT),
|
||||
], tab_key="daily", column_pair="daily"),
|
||||
]
|
||||
|
||||
self._manager_view = AetherSettingsView(
|
||||
@@ -684,7 +685,7 @@ class StarPilotLongitudinalTuneLayout(_SettingsPage):
|
||||
get_value=self._get_deceleration_profile_label,
|
||||
on_click=self._show_deceleration_profile_selector,
|
||||
visible=self._longitudinal_enabled),
|
||||
], row_height=UTILITY_ROW_HEIGHT),
|
||||
]),
|
||||
SettingSection(tr_noop("Human-Like Driving"), [
|
||||
SettingRow("HumanAcceleration", "toggle", tr_noop("Human-Like Acceleration"),
|
||||
subtitle=tr_noop("Smooth throttle at low speed with stronger takeoff from a stop."),
|
||||
@@ -696,28 +697,28 @@ class StarPilotLongitudinalTuneLayout(_SettingsPage):
|
||||
get_state=lambda: self._params.get_bool("CoastUpToLeads"),
|
||||
set_state=lambda s: self._params.put_bool("CoastUpToLeads", s),
|
||||
visible=self._longitudinal_enabled),
|
||||
], column_pair="human_driving", row_height=UTILITY_ROW_HEIGHT),
|
||||
], column_pair="human_driving"),
|
||||
SettingSection(tr_noop("Lane Changes"), [
|
||||
SettingRow("HumanLaneChanges", "toggle", tr_noop("Human-Like Lane Changes"),
|
||||
subtitle=tr_noop("Radar-informed behavior during lane changes."),
|
||||
get_state=lambda: self._params.get_bool("HumanLaneChanges"),
|
||||
set_state=lambda s: self._params.put_bool("HumanLaneChanges", s),
|
||||
visible=lambda: self._longitudinal_enabled() and starpilot_state.car_state.hasRadar),
|
||||
], column_pair="human_driving", row_height=UTILITY_ROW_HEIGHT),
|
||||
], column_pair="human_driving"),
|
||||
SettingSection(tr_noop("Detection"), [
|
||||
SettingRow("LeadDetection", "value", tr_noop("Lead Detection Sensitivity"),
|
||||
subtitle=tr_noop("Control how aggressively openpilot detects and reacts to vehicles ahead."),
|
||||
get_value=lambda: f"{self._params.get_int('LeadDetectionThreshold')}%",
|
||||
on_click=lambda: self._show_slider("LeadDetectionThreshold", 25, 50, unit="%"),
|
||||
visible=self._longitudinal_enabled),
|
||||
], column_pair="detection_tune", row_height=UTILITY_ROW_HEIGHT),
|
||||
], column_pair="detection_tune"),
|
||||
SettingSection(tr_noop("Tuning"), [
|
||||
SettingRow("TacoTune", "toggle", tr_noop("Taco Bell Run Turn Speed Hack"),
|
||||
subtitle=tr_noop("Slow down more assertively for turns."),
|
||||
get_state=lambda: self._params.get_bool("TacoTune"),
|
||||
set_state=lambda s: self._params.put_bool("TacoTune", s),
|
||||
visible=self._longitudinal_enabled),
|
||||
], column_pair="detection_tune", row_height=UTILITY_ROW_HEIGHT),
|
||||
], column_pair="detection_tune"),
|
||||
]
|
||||
self._manager_view = AetherSettingsView(
|
||||
self, sections,
|
||||
@@ -799,7 +800,7 @@ class StarPilotAdvancedLongitudinalLayout(_SettingsPage):
|
||||
get_value=lambda: f"{self._params.get_float('StartAccel'):.2f}m/s",
|
||||
on_click=lambda: self._show_slider("StartAccel", 0.0, 4.0, step=0.01, unit="m/s", value_type="float"),
|
||||
visible=lambda: adv() and not self._using_human_acceleration()),
|
||||
], row_height=UTILITY_ROW_HEIGHT),
|
||||
]),
|
||||
SettingSection(tr_noop("Braking"), [
|
||||
SettingRow("StopAccel", "value", tr_noop("Stop Acceleration"),
|
||||
subtitle=tr_noop("Brake force to hold the vehicle at a complete stop."),
|
||||
@@ -811,7 +812,7 @@ class StarPilotAdvancedLongitudinalLayout(_SettingsPage):
|
||||
get_value=lambda: f"{self._params.get_float('StoppingDecelRate'):.3f}m/s",
|
||||
on_click=lambda: self._show_slider("StoppingDecelRate", 0.001, 1.0, step=0.001, unit="m/s", value_type="float"),
|
||||
visible=self._show_stop_tuning_values),
|
||||
], column_pair="adv_brake_speed", row_height=UTILITY_ROW_HEIGHT),
|
||||
], column_pair="adv_brake_speed"),
|
||||
SettingSection(tr_noop("Speed"), [
|
||||
SettingRow("StartSpeed", "value", tr_noop("Start Speed"),
|
||||
subtitle=tr_noop("Speed where openpilot exits the stopped state."),
|
||||
@@ -823,7 +824,7 @@ class StarPilotAdvancedLongitudinalLayout(_SettingsPage):
|
||||
get_value=lambda: f"{self._params.get_float('VEgoStopping'):.2f}m/s",
|
||||
on_click=lambda: self._show_slider("VEgoStopping", 0.01, 1.0, step=0.01, unit="m/s", value_type="float"),
|
||||
visible=self._show_stop_tuning_values),
|
||||
], column_pair="adv_brake_speed", row_height=UTILITY_ROW_HEIGHT),
|
||||
], column_pair="adv_brake_speed"),
|
||||
]
|
||||
self._manager_view = AetherSettingsView(
|
||||
self, sections,
|
||||
@@ -890,7 +891,7 @@ class StarPilotConditionalExperimentalLayout(_SettingsPage):
|
||||
get_state=lambda: self._params.get_bool("CELead"),
|
||||
set_state=lambda s: self._params.put_bool("CELead", s),
|
||||
visible=ce_on),
|
||||
], column_pair="ce", row_height=UTILITY_ROW_HEIGHT),
|
||||
], column_pair="ce"),
|
||||
SettingSection(tr_noop("Conditions"), [
|
||||
SettingRow("CESlowerLead", "toggle", tr_noop("Slower Lead"),
|
||||
subtitle="",
|
||||
@@ -927,7 +928,7 @@ class StarPilotConditionalExperimentalLayout(_SettingsPage):
|
||||
get_state=lambda: self._params.get_bool("ShowCEMStatus"),
|
||||
set_state=lambda s: self._params.put_bool("ShowCEMStatus", s),
|
||||
visible=ce_on),
|
||||
], column_pair="ce", row_height=UTILITY_ROW_HEIGHT),
|
||||
], column_pair="ce"),
|
||||
]
|
||||
self._manager_view = AetherSettingsView(
|
||||
self, sections,
|
||||
@@ -1079,7 +1080,7 @@ class StarPilotPersonalityProfileLayout(_SettingsPage):
|
||||
subtitle="",
|
||||
get_value=lambda: f"{self._params.get_int(p + 'JerkDeceleration')}%",
|
||||
on_click=lambda: self._show_slider(p + "JerkDeceleration", 25, 200, step=5, unit="%")),
|
||||
], column_pair=p, row_height=UTILITY_ROW_HEIGHT),
|
||||
], column_pair=p),
|
||||
SettingSection(tr_noop(f"{p} — Behavior"), [
|
||||
SettingRow(f"{p}JerkDanger", "value", tr_noop("Safety Gap Bias"),
|
||||
subtitle="",
|
||||
@@ -1098,7 +1099,7 @@ class StarPilotPersonalityProfileLayout(_SettingsPage):
|
||||
action_text=tr_noop("Reset"),
|
||||
action_danger=True,
|
||||
on_click=lambda: self._reset_profile()),
|
||||
], column_pair=p, row_height=UTILITY_ROW_HEIGHT),
|
||||
], column_pair=p),
|
||||
]
|
||||
self._manager_view = AetherSettingsView(
|
||||
self, sections,
|
||||
@@ -1145,7 +1146,7 @@ class StarPilotSLCOffsetsLayout(_SettingsPage):
|
||||
))
|
||||
|
||||
sections: list[SettingSection] = [
|
||||
SettingSection(tr_noop("SLC Offsets"), rows, row_height=UTILITY_ROW_HEIGHT),
|
||||
SettingSection(tr_noop("SLC Offsets"), rows),
|
||||
]
|
||||
self._manager_view = AetherSettingsView(
|
||||
self, sections,
|
||||
@@ -1197,7 +1198,7 @@ class StarPilotSLCQOLLayout(_SettingsPage):
|
||||
subtitle="",
|
||||
get_state=lambda: self._params.get_bool("SLCMapboxFiller"),
|
||||
set_state=lambda s: self._params.put_bool("SLCMapboxFiller", s)),
|
||||
], row_height=UTILITY_ROW_HEIGHT),
|
||||
]),
|
||||
]
|
||||
self._manager_view = AetherSettingsView(
|
||||
self, sections,
|
||||
|
||||
@@ -12,7 +12,6 @@ from openpilot.system.ui.widgets.label import gui_label
|
||||
from openpilot.system.ui.widgets.option_dialog import MultiOptionDialog
|
||||
from openpilot.selfdrive.ui.layouts.settings.starpilot.panel import StarPilotPanel
|
||||
from openpilot.selfdrive.ui.layouts.settings.starpilot.aethergrid import (
|
||||
AETHER_COMPACT_ROW_HEIGHT,
|
||||
AETHER_LIST_METRICS,
|
||||
AetherListColors,
|
||||
AetherScrollbar,
|
||||
@@ -65,17 +64,16 @@ class VehicleSettingsManagerView(Widget):
|
||||
HEADER_SUBTITLE_HEIGHT = 24
|
||||
HEADER_SUMMARY_GAP = 12
|
||||
HEADER_CARD_HEIGHT = 108
|
||||
TAB_HEIGHT = 52
|
||||
TAB_HEIGHT = 56
|
||||
TAB_GAP = 10
|
||||
TAB_BOTTOM_GAP = 18
|
||||
SECTION_GAP = AETHER_LIST_METRICS.section_gap
|
||||
SECTION_HEADER_HEIGHT = AETHER_LIST_METRICS.section_header_height
|
||||
SECTION_HEADER_GAP = AETHER_LIST_METRICS.section_header_gap
|
||||
ROW_HEIGHT = AETHER_COMPACT_ROW_HEIGHT
|
||||
ROW_HEIGHT = AETHER_LIST_METRICS.row_height
|
||||
FADE_HEIGHT = AETHER_LIST_METRICS.fade_height
|
||||
COLUMN_GAP = 22
|
||||
TWO_COLUMN_BREAKPOINT = 1180
|
||||
ACTION_PILL_WIDTH = 108
|
||||
|
||||
PANEL_STYLE = DEFAULT_PANEL_STYLE
|
||||
|
||||
@@ -332,8 +330,8 @@ class VehicleSettingsManagerView(Widget):
|
||||
current=self._active_tab_key == tab["id"],
|
||||
hovered=hovered,
|
||||
pressed=pressed,
|
||||
title_size=19,
|
||||
subtitle_size=14,
|
||||
title_size=26,
|
||||
subtitle_size=17,
|
||||
show_underline=True,
|
||||
style=self.PANEL_STYLE,
|
||||
)
|
||||
@@ -399,16 +397,16 @@ class VehicleSettingsManagerView(Widget):
|
||||
draw_settings_list_row(
|
||||
rect, title=row["title"], subtitle=row.get("subtitle", ""),
|
||||
toggle_value=row["get_state"](), hovered=hovered, pressed=pressed,
|
||||
is_last=is_last, show_chevron=False, title_size=26, subtitle_size=17,
|
||||
is_last=is_last, show_chevron=False, title_size=34, subtitle_size=22,
|
||||
style=self.PANEL_STYLE,
|
||||
)
|
||||
elif row_type == "select":
|
||||
draw_selection_list_row(
|
||||
rect, title=row["title"], subtitle=row.get("subtitle", ""),
|
||||
action_text=row["get_value"](), hovered=hovered, pressed=pressed,
|
||||
is_last=is_last, action_width=154, action_pill=True,
|
||||
action_pill_width=row.get("pill_width", 108), action_pill_height=40,
|
||||
title_size=26, subtitle_size=17, action_text_size=15,
|
||||
is_last=is_last, action_width=188, action_pill=True,
|
||||
action_pill_width=row.get("pill_width", 108), action_pill_height=44,
|
||||
title_size=34, subtitle_size=22, action_text_size=18,
|
||||
row_separator=self.PANEL_STYLE.divider_color,
|
||||
action_fill=self.PANEL_STYLE.current_fill,
|
||||
action_border=self.PANEL_STYLE.current_border,
|
||||
@@ -418,7 +416,7 @@ class VehicleSettingsManagerView(Widget):
|
||||
draw_settings_list_row(
|
||||
rect, title=row["title"], value=row["get_value"](),
|
||||
hovered=False, pressed=False, is_last=is_last,
|
||||
show_chevron=False, title_size=26, subtitle_size=17,
|
||||
show_chevron=False, title_size=34, subtitle_size=22,
|
||||
style=self.PANEL_STYLE,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user