KivyMD icon indicating copy to clipboard operation
KivyMD copied to clipboard

Scrollview Interaction with Children Using RGBA Background Color

Open ShazwanX9 opened this issue 4 months ago • 3 comments

Steps to Reproduce:

1. Open the application.
2. Navigate to a screen containing a ScrollView with children that have RGBA background colors.
3. Interact with the ScrollView, such as scrolling up or down.

Description of the Bug

An outline of the children appears beyond the designated ScrollView area during interaction, disrupting the expected layout. I experimented with identical code on two distinct KivyMD versions, and the outcomes varied. This discrepancy could be attributed to potential changes in the newer theming, although I am uncertain about the exact cause.

Code and Logs

from kivymd.app import MDApp
from kivy.core.window import Window
from kivy.lang.builder import Builder
from kivymd.uix.boxlayout import MDBoxLayout

Window.size = (375, 667)

Builder.load_string("""

<SomeCard@MDCard>:
    size_hint_y: None
    height: dp(160)
    md_bg_color: "green"

    MDBoxLayout:
        orientation: "vertical"
        size_hint_y: .45
        padding: dp(16)
        md_bg_color: 0,0,0,.45
        radius: 0, 0, dp(24), dp(24)

<UserInterfaceApp>:
    orientation: 'vertical'
    md_bg_color: "red"

    MDRelativeLayout:
        size_hint: 1, .45
        # md_bg_color: "blue"

        MDLabel:
            text: "KivyMD 2.0.0"

    MDScrollView:
        size_hint_y: 1
        MDBoxLayout:
            orientation: "vertical"
            size_hint_y: None
            height: self.minimum_height
            spacing: dp(8)
            SomeCard:
            SomeCard:
            SomeCard:
            SomeCard:
            SomeCard:
            SomeCard:
            SomeCard:
            SomeCard:

    MDRelativeLayout:
        size_hint: 1, .45
        md_bg_color: "blue"
""")

class UserInterfaceApp(MDBoxLayout):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)

    def callback(self, string="Callback"):
        print(string)

class MainApp(MDApp):
    def build(self):
        return UserInterfaceApp()

if __name__ == "__main__":
    MainApp().run()

Screenshots

ss1 ss2

Versions

  • OS: Windows 10
  • Python: 3.9.2
  • Kivy: 2.3.0
  • KivyMD: https://github.com/kivymd/KivyMD/archive/master.zip#sha256=ddb0daedbc69072dfa3a8f899b2571359df88bc243f2455f10357386e567f22e
  • KivyMD (2nd Image): 1.1.1

ShazwanX9 avatar Mar 01 '24 17:03 ShazwanX9