mirror of
https://github.com/markqvist/Sideband.git
synced 2024-12-28 00:49:32 -05:00
Fixed dialog sizing on mobile
This commit is contained in:
parent
c6f82a917d
commit
66065bc3ef
@ -413,7 +413,7 @@ class MDDialog(BaseDialog):
|
||||
and defaults to `[]`.
|
||||
"""
|
||||
|
||||
width_offset = NumericProperty(dp(48))
|
||||
width_offset = NumericProperty(dp(32))
|
||||
"""
|
||||
Dialog offset from device width.
|
||||
|
||||
@ -601,7 +601,7 @@ class MDDialog(BaseDialog):
|
||||
self.width = min(dp(560), Window.width - self.width_offset)
|
||||
elif self.size_hint == [1, 1] and DEVICE_TYPE == "mobile":
|
||||
self.size_hint = (None, None)
|
||||
self.width = min(dp(280), Window.width - self.width_offset)
|
||||
self.width = min(dp(560), Window.width - self.width_offset)
|
||||
|
||||
if not self.title:
|
||||
self._spacer_top = 0
|
||||
@ -634,7 +634,7 @@ class MDDialog(BaseDialog):
|
||||
self.width = max(
|
||||
self.height + self.width_offset,
|
||||
min(
|
||||
dp(560) if DEVICE_TYPE != "mobile" else dp(280),
|
||||
dp(560) if DEVICE_TYPE != "mobile" else dp(560),
|
||||
Window.width - self.width_offset,
|
||||
),
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user