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.26k stars 674 forks source link

MDDialog hover state change disregards custom md_bg_color #1684

Open ddauer opened 7 months ago

ddauer commented 7 months ago

When opening a simple dialog with a custom md_bg_color, a mouse exit will kill the md_bg_color (by setting it to transparent or something).

MDDialog(            
    MDDialogContentContainer(
        MDIcon(icon="weight")
    ),
    theme_bg_color = "Custom",
    md_bg_color = "red",
).open()

This is due to https://github.com/kivymd/KivyMD/blob/cfe5aac30f50708c6208c8b33b0ef1aa390721e8/kivymd/uix/card/card.py#L682

Disable this line, and the md_bg_color will stay red onMouseOut (as expected)

cdavidson-project-canary commented 7 months ago

This sounds similar to the bug i wrote yesterday: https://github.com/kivymd/KivyMD/issues/1681. However, I only experienced issues with the bg color when using the @mainthread decorator.