KivyMD icon indicating copy to clipboard operation
KivyMD copied to clipboard

MDTabsPrimary switch animation duration hardcoded and impossible to disable

Open ddauer opened this issue 4 months ago • 0 comments

Description of the Bug

In function set_active_item https://github.com/kivymd/KivyMD/blob/cfe5aac30f50708c6208c8b33b0ef1aa390721e8/kivymd/uix/tab/tab.py#L1114 the animation duration is hardcoded to 0.2:

https://github.com/kivymd/KivyMD/blob/cfe5aac30f50708c6208c8b33b0ef1aa390721e8/kivymd/uix/tab/tab.py#L1132

https://github.com/kivymd/KivyMD/blob/cfe5aac30f50708c6208c8b33b0ef1aa390721e8/kivymd/uix/tab/tab.py#L1140

https://github.com/kivymd/KivyMD/blob/cfe5aac30f50708c6208c8b33b0ef1aa390721e8/kivymd/uix/tab/tab.py#L1149

https://github.com/kivymd/KivyMD/blob/cfe5aac30f50708c6208c8b33b0ef1aa390721e8/kivymd/uix/tab/tab.py#L1154

but should respect anim_duration

https://github.com/kivymd/KivyMD/blob/cfe5aac30f50708c6208c8b33b0ef1aa390721e8/kivymd/uix/tab/tab.py#L839

as it is used in https://github.com/kivymd/KivyMD/blob/cfe5aac30f50708c6208c8b33b0ef1aa390721e8/kivymd/uix/tab/tab.py#L1095

Now I understand that indicator animation is different from active tab switch animation. However, if I set indicator_anim = False I also would expect the tab switch not to animate. If that is intended, then I would expect a new variable to control this behavior, e.g.: tab_swtich_anim = BooleanProperty(True)

ddauer avatar Apr 16 '24 15:04 ddauer