33from ..config import SharedPreferences
44from ..app .activity import Activity
55from .display import DisplayMetrics
6- from . import anim
6+ from .widget_animator import WidgetAnimator
77
88class CameraSettingsActivity (Activity ):
99
@@ -354,11 +354,11 @@ def create_advanced_tab(self, tab, prefs):
354354 def exposure_ctrl_changed (e = None ):
355355 is_auto = aec_checkbox .get_state () & lv .STATE .CHECKED
356356 if is_auto :
357- anim .smooth_hide (me_cont , duration = 1000 )
358- anim .smooth_show (ae_cont , delay = 1000 )
357+ WidgetAnimator .smooth_hide (me_cont , duration = 1000 )
358+ WidgetAnimator .smooth_show (ae_cont , delay = 1000 )
359359 else :
360- anim .smooth_hide (ae_cont , duration = 1000 )
361- anim .smooth_show (me_cont , delay = 1000 )
360+ WidgetAnimator .smooth_hide (ae_cont , duration = 1000 )
361+ WidgetAnimator .smooth_show (me_cont , delay = 1000 )
362362
363363 aec_checkbox .add_event_cb (exposure_ctrl_changed , lv .EVENT .VALUE_CHANGED , None )
364364 exposure_ctrl_changed ()
@@ -382,9 +382,9 @@ def gain_ctrl_changed(e=None):
382382 is_auto = agc_checkbox .get_state () & lv .STATE .CHECKED
383383 gain_slider = self .ui_controls ["agc_gain" ]
384384 if is_auto :
385- anim .smooth_hide (agc_cont , duration = 1000 )
385+ WidgetAnimator .smooth_hide (agc_cont , duration = 1000 )
386386 else :
387- anim .smooth_show (agc_cont , duration = 1000 )
387+ WidgetAnimator .smooth_show (agc_cont , duration = 1000 )
388388
389389 agc_checkbox .add_event_cb (gain_ctrl_changed , lv .EVENT .VALUE_CHANGED , None )
390390 gain_ctrl_changed ()
@@ -414,9 +414,9 @@ def gain_ctrl_changed(e=None):
414414 def whitebal_changed (e = None ):
415415 is_auto = wbcheckbox .get_state () & lv .STATE .CHECKED
416416 if is_auto :
417- anim .smooth_hide (wb_cont , duration = 1000 )
417+ WidgetAnimator .smooth_hide (wb_cont , duration = 1000 )
418418 else :
419- anim .smooth_show (wb_cont , duration = 1000 )
419+ WidgetAnimator .smooth_show (wb_cont , duration = 1000 )
420420 wbcheckbox .add_event_cb (whitebal_changed , lv .EVENT .VALUE_CHANGED , None )
421421 whitebal_changed ()
422422
0 commit comments