Kivy: Fix MessageBox popups (#5193)

This commit is contained in:
Duck
2025-09-06 11:21:36 -06:00
committed by GitHub
parent c3c517a200
commit 8a091c9e02
2 changed files with 3 additions and 8 deletions

View File

@@ -720,13 +720,11 @@ class MessageBoxLabel(MDLabel):
class MessageBox(Popup):
def __init__(self, title, text, error=False, **kwargs):
label = MessageBoxLabel(text=text)
label = MessageBoxLabel(text=text, padding=("6dp", "0dp"))
separator_color = [217 / 255, 129 / 255, 122 / 255, 1.] if error else [47 / 255., 167 / 255., 212 / 255, 1.]
super().__init__(title=title, content=label, size_hint=(0.5, None), width=max(100, int(label.width) + 40),
separator_color=separator_color, **kwargs)
self.height += max(0, label.height - 18)
class MDNavigationItemBase(MDNavigationItem):