kivymd/KivyMD

MDTabsPrimary switch animation duration hardcoded and impossible to disable

ddauer opened this issue · 0 comments

Description of the Bug

In function set_active_item

def set_active_item(self, item: MDTabsItem) -> None:
the animation duration is hardcoded to 0.2:

but should respect anim_duration

anim_duration = NumericProperty(0.2)

as it is used in

d=0 if not self.indicator_anim else self.indicator_duration,

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)