U
    P’“eF  ã                   @   s(   d Z dZddlmZ G dd„ deƒZdS )zÂ
Opacity scroll effect
=====================

Based on the :class:`~kivy.effects.damped.DampedScrollEffect`, this one will
also decrease the opacity of the target widget during the overscroll.

)ÚOpacityScrollEffecté    )ÚDampedScrollEffectc                   @   s   e Zd ZdZdd„ ZdS )r   z³OpacityScrollEffect class. Uses the overscroll
    information to reduce the opacity of the scrollview widget. When the user
    stops the drag, the opacity is set back to 1.
    c                 G   sF   | j r:| j jdkr:dt| jt| j jƒ ƒ }td|ƒ| j _|  ¡  d S )Nr   g      ð?é   )Ztarget_widgetÚheightÚabsZ
overscrollÚfloatÚminZopacityZtrigger_velocity_update)ÚselfÚargsÚalpha© r   ú>/tmp/pip-unpacked-wheel-xzebddm3/kivy/effects/opacityscroll.pyÚon_overscroll   s    ÿz!OpacityScrollEffect.on_overscrollN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r      s   r   N)r   Ú__all__Zkivy.effects.dampedscrollr   r   r   r   r   r   Ú<module>   s   	