mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-08-01 14:16:47 +08:00
Make sliders children
This commit is contained in:
@@ -72,9 +72,9 @@ class BigConfirmationDialog(BigDialogBase):
|
||||
|
||||
self._slider: BigSlider | RedBigSlider
|
||||
if red:
|
||||
self._slider = RedBigSlider(title, icon, confirm_callback=self._on_confirm)
|
||||
self._slider = self._child(RedBigSlider(title, icon, confirm_callback=self._on_confirm))
|
||||
else:
|
||||
self._slider = BigSlider(title, icon, confirm_callback=self._on_confirm)
|
||||
self._slider = self._child(BigSlider(title, icon, confirm_callback=self._on_confirm))
|
||||
self._slider.set_enabled(lambda: self.enabled and not self.is_dismissing) # for nav stack + NavWidget
|
||||
|
||||
def _on_confirm(self):
|
||||
|
||||
@@ -130,9 +130,9 @@ class SoftwareSelectionPage(NavWidget):
|
||||
use_custom_software_callback: Callable):
|
||||
super().__init__()
|
||||
|
||||
self._openpilot_slider = LargerSlider("slide to install\nopenpilot", use_openpilot_callback)
|
||||
self._openpilot_slider = self._child(LargerSlider("slide to install\nopenpilot", use_openpilot_callback))
|
||||
self._openpilot_slider.set_enabled(lambda: self.enabled and not self.is_dismissing)
|
||||
self._custom_software_slider = LargerSlider("slide to install\ncustom software", use_custom_software_callback, green=False)
|
||||
self._custom_software_slider = self._child(LargerSlider("slide to install\ncustom software", use_custom_software_callback, green=False))
|
||||
self._custom_software_slider.set_enabled(lambda: self.enabled and not self.is_dismissing)
|
||||
|
||||
def show_event(self):
|
||||
@@ -478,7 +478,6 @@ class Setup(Widget):
|
||||
self._network_monitor.start()
|
||||
|
||||
def getting_started_button_callback():
|
||||
self._software_selection_page.reset()
|
||||
gui_app.push_widget(self._software_selection_page)
|
||||
|
||||
self._start_page = StartPage()
|
||||
|
||||
Reference in New Issue
Block a user