kivymd / KivyMD

KivyMD is a collection of Material Design compliant widgets for use with Kivy, a framework for cross-platform, touch-enabled graphical applications. https://youtube.com/c/KivyMD https://twitter.com/KivyMD https://habr.com/ru/users/kivymd https://stackoverflow.com/tags/kivymd
https://kivymd.readthedocs.io
MIT License
2.14k stars 655 forks source link

kivymd MDDialog not ching its size #1641

Open Sahil-pixel opened 3 months ago

Sahil-pixel commented 3 months ago

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

HeaTTheatR commented 3 months ago

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

Sahil-pixel commented 3 months ago

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

HeaTTheatR commented 3 months ago

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

Sahil-pixel commented 3 months ago

See the behaviour of mddialog in Android

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

Sahil-pixel commented 3 months ago

is this solved or not ?

HeaTTheatR commented 3 months ago

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