KivyMD icon indicating copy to clipboard operation
KivyMD copied to clipboard

MDSwitch misbehaves on clicking on certain regions and while holding the button

Open MohamedFarhan23 opened this issue 4 months ago • 0 comments

On trying to switch the switchbox , it sometimes gets stuck in the middle part and while holding the button, it gets enlarged and goes out of the box. Also, currently to switch the user has to particularly click the inside circle , I personally feel it would be nice if it could change state on clicking on the anywhere on the button.

from kivymd.app import MDApp
from kivy.lang import Builder
KV="""
MDFloatLayout:
    MDSwitch:
        active:True

        pos_hint: {'center_x': 0.5,'center_y': 0.5}
    
"""
class SwitchButton(MDApp):
    def build(self):
        return Builder.load_string(KV)

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

MohamedFarhan23 avatar Mar 01 '24 13:03 MohamedFarhan23