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

Tab contents button shade transition is sticky #1663

Open
RobertFlatt opened this issue Apr 2, 2024 · 0 comments
Open

Tab contents button shade transition is sticky #1663

RobertFlatt opened this issue Apr 2, 2024 · 0 comments
Labels
Type: Bug Bug report/Bug fix

Comments

@RobertFlatt
Copy link

Description of the Bug

Tab contents, button shade transition is sticky

Code and Logs


from kivymd.app import MDApp
from kivymd.uix.label import MDLabel
from kivymd.uix.boxlayout import MDBoxLayout
from kivymd.uix.button import MDButton, MDButtonText
from kivymd.uix.tab import (
    MDTabsItemIcon,
    MDTabsItemText,
    MDTabsItem,
)

KV = '''
MDScreen:
    md_bg_color: self.theme_cls.backgroundColor
    MDBoxLayout:
        orientation:'vertical'
        MDTabsPrimary:
            id: tabs
            pos_hint: {"center_x": .5, "center_y": .5}
            MDDivider:
            MDTabsCarousel:
                id: related_content_container
                size_hint_y: None
                height: dp(320)
        MDLabel:
            text:'Click buttons sequentially \\nIssue: Multiple clicked buttons are a different color from buttons not clicked. Change in button color is sticky.'
            halign:'center'
'''

class Example(MDApp):
    def on_start(self):
        super().on_start()
        self.root.ids.tabs.add_widget(
            MDTabsItem(MDTabsItemText(text='A Tab')))
        
        bl = MDBoxLayout(orientation='vertical',
                         size_hint_y=None)
        bl.bind(minimum_height=bl.setter('height'))
        for i in range(10):
            bl.add_widget(MDButton(MDButtonText(text='Button '+str(i)),
                                   pos_hint={"center_x": .5, "center_y": .5}))

        sv = ScrollView()
        sv.add_widget(bl)
        self.root.ids.related_content_container.add_widget(sv)

    def build(self):
        self.theme_cls.primary_palette = "Olive"
        return Builder.load_string(KV)


Example().run()


Screenshots

issue4

Versions

  • OS: Windows 11
  • Python: 3.11.1
  • Kivy: 2.3.0
  • KivyMD: 2.0.1.dev0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Bug report/Bug fix
Projects
None yet
Development

No branches or pull requests

2 participants