Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elevation shadow does not vanish nicely for big MDCards #1734

Open
j4ggr opened this issue Sep 5, 2024 · 1 comment
Open

Elevation shadow does not vanish nicely for big MDCards #1734

j4ggr opened this issue Sep 5, 2024 · 1 comment

Comments

@j4ggr
Copy link

j4ggr commented Sep 5, 2024

The larger the MDCard, the larger the shadow becomes, even if I don't change the elevation.
This means that it doesn't vanish nicely, but is cut off.

Here is a small example to reproduce it:

from kivy.lang import Builder
from kivymd.app import MDApp

KV = '''
MDScreen:
    theme_bg_color: "Custom"
    md_bg_color: self.theme_cls.backgroundColor

    MDBoxLayout:
        orientation: 'horizontal'
        padding: 20
        spacing: 20
        MDCard:
            style: 'elevated'
            size_hint: 0.1, 0.25
        MDCard:
            style: 'elevated'
            size_hint: 0.3, 0.5
        MDCard:
            style: 'elevated'
            size_hint: 0.6, 1

'''

class Example(MDApp):
    def build(self):
        return Builder.load_string(KV)

Example().run()

Then you will get something like the following screenshot (You can't see it well in the preview, please open the image):

image

  • The shadow of the first and smallest card looks good
  • The shadow of the middle card looks acceptable
  • The shadow of the large card looks ugly

Here a little closer between the middle and the large:

image

Versions

  • OS: Windows 11
  • Python: 3.12.3
  • Kivy: 2.3.0 (base)
  • KivyMD: 2.0.1.dev0
@HeaTTheatR
Copy link
Member

kivy/kivy#8593

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants