raylib: match QT confirmation dialog size (#36248)

* closer to qt

* this too

* eval
pull/36251/head
Shane Smiskol 4 days ago committed by GitHub
parent 150ff72646
commit 670b6011da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      system/ui/widgets/confirm_dialog.py

@ -5,8 +5,8 @@ from openpilot.system.ui.widgets.button import ButtonStyle, Button
from openpilot.system.ui.widgets.label import Label from openpilot.system.ui.widgets.label import Label
from openpilot.system.ui.widgets import Widget from openpilot.system.ui.widgets import Widget
DIALOG_WIDTH = 1520 DIALOG_WIDTH = 1748
DIALOG_HEIGHT = 600 DIALOG_HEIGHT = 690
BUTTON_HEIGHT = 160 BUTTON_HEIGHT = 160
MARGIN = 50 MARGIN = 50
TEXT_AREA_HEIGHT_REDUCTION = 200 TEXT_AREA_HEIGHT_REDUCTION = 200
@ -16,7 +16,7 @@ BACKGROUND_COLOR = rl.Color(27, 27, 27, 255)
class ConfirmDialog(Widget): class ConfirmDialog(Widget):
def __init__(self, text: str, confirm_text: str, cancel_text: str = "Cancel"): def __init__(self, text: str, confirm_text: str, cancel_text: str = "Cancel"):
super().__init__() super().__init__()
self._label = Label(text, 70, FontWeight.BOLD) self._label = Label(text, 70, FontWeight.BOLD, text_color=rl.Color(201, 201, 201, 255))
self._cancel_button = Button(cancel_text, self._cancel_button_callback) self._cancel_button = Button(cancel_text, self._cancel_button_callback)
self._confirm_button = Button(confirm_text, self._confirm_button_callback, button_style=ButtonStyle.PRIMARY) self._confirm_button = Button(confirm_text, self._confirm_button_callback, button_style=ButtonStyle.PRIMARY)
self._dialog_result = DialogResult.NO_ACTION self._dialog_result = DialogResult.NO_ACTION

Loading…
Cancel
Save