KivyMD
KivyMD copied to clipboard
kivymd MDDialog not ching its size
Code and Logs
from kivymd.uix.widget import MDWidget
from kivymd.app import MDApp
from kivymd.uix.button import MDButton, MDButtonText
from kivymd.uix.dialog import MDDialog, MDDialogHeadlineText, MDDialogButtonContainer
class Example(MDApp):
def build(self):
return MDWidget(md_bg_color=self.theme_cls.backgroundColor)
def on_start(self):
super().on_start()
MDDialog(
MDDialogHeadlineText(
text="Discard draft?",
halign="left",
),
MDDialogButtonContainer(
Widget(),
MDButton(
MDButtonText(text="Cancel"),
style="text",
),
MDButton(
MDButtonText(text="Discard"),
style="text",
),
spacing="8dp",)
,width_offset='0dp').open()
Example().run()
Screenshots
Add images to explain us this bug. Paste urls here.
Remove this section if
no images here
Versions
- OS:
- Python: 3.10
- Kivy: v2.3.0
- KivyMD: 2.0.1.dev0,
You don't change the size of the directory anywhere in the code
see how it is working in android . i want to reduce some size of MDDialog
https://kivymd.readthedocs.io/en/latest/components/dialog/#kivymd.uix.dialog.dialog.MDDialog.width_offset https://m3.material.io/components/dialogs/specs https://github.com/kivymd/KivyMD/blob/master/kivymd/uix/dialog/dialog.kv#L3
See the behaviour of mddialog in Android
https://github.com/kivymd/KivyMD/assets/57060638/83c9375a-c930-47a1-bf0a-44a8e2818c99
is this solved or not ?
The issue is open, so it has not been solved yet