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
I've found a bug in the way the MDCheckbox gets resized. Take the following example:
from kivymd.app import MDApp
from kivymd.uix.selectioncontrol import MDCheckbox
class MainApp(MDApp):
def build(self):
return MDCheckbox(group='test')
if __name__ == '__main__':
MainApp().run()
Make sure that the MDCheckbox has a non-empty group. The group can also be 'root' or 'child', but not ''.
To produce the bug, the checkbox has to be inactive. Then double-click quickly on the checkbox. If timed correctly the box will disappear or will show smaller than usual. To reproduce this issue more easily, you can also set the duration of self.check_anim_in to 1 in the MDCheckbox.__init__ method. If you click on the box while check_anim_in is running then the box will get stuck at the size
it is currently at.
Description of the Bug
I've found a bug in the way the MDCheckbox gets resized. Take the following example:
Make sure that the
MDCheckbox
has a non-empty group. The group can also be'root'
or'child'
, but not''
. To produce the bug, the checkbox has to be inactive. Then double-click quickly on the checkbox. If timed correctly the box will disappear or will show smaller than usual. To reproduce this issue more easily, you can also set theduration
ofself.check_anim_in
to1
in theMDCheckbox.__init__
method. If you click on the box whilecheck_anim_in
is running then the box will get stuck at the size it is currently at.Proposed solution
To fix this issue, the easiest way is to put
at the start of the
MDCheckbox.on_state
method.Versions