KivyMD icon indicating copy to clipboard operation
KivyMD copied to clipboard

kivymd MDDialog not ching its size

Open Sahil-pixel opened this issue 11 months ago • 6 comments

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 Screenshot from 2024-03-11 21-52-14 no images here

Versions

  • OS:
  • Python: 3.10
  • Kivy: v2.3.0
  • KivyMD: 2.0.1.dev0,

Sahil-pixel avatar Mar 11 '24 16:03 Sahil-pixel

You don't change the size of the directory anywhere in the code

HeaTTheatR avatar Mar 11 '24 16:03 HeaTTheatR

see how it is working in android . i want to reduce some size of MDDialog Screenshot_2024-03-16-16-56-39-04_6c336dffb0f30eb6cbe8bcc790272271

Sahil-pixel avatar Mar 16 '24 11:03 Sahil-pixel

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

Снимок экрана 2024-03-16 в 15 05 45

HeaTTheatR avatar Mar 16 '24 12:03 HeaTTheatR

See the behaviour of mddialog in Android

https://github.com/kivymd/KivyMD/assets/57060638/83c9375a-c930-47a1-bf0a-44a8e2818c99

Sahil-pixel avatar Mar 18 '24 05:03 Sahil-pixel

is this solved or not ?

Sahil-pixel avatar Mar 29 '24 04:03 Sahil-pixel

The issue is open, so it has not been solved yet

HeaTTheatR avatar Mar 29 '24 13:03 HeaTTheatR