Add specific parameter for redraw timeout + increase timeouts
This commit is contained in:
parent
b59e7476c2
commit
04d4423bcb
8
clock.py
8
clock.py
|
@ -533,7 +533,10 @@ class MyClockWidget(FloatLayout):
|
|||
# ugly workaround for issue where input is processed twice (specifically:
|
||||
# pressing Ok in wake up sound view switches to settings view but also
|
||||
# adjusts display brightness slider)
|
||||
time_to_ignore_inputs_after_view_change = 0.1
|
||||
time_to_ignore_inputs_after_view_change = 0.5
|
||||
|
||||
# ugly workaround for issue where graphics are not drawn correctly after view change
|
||||
time_to_force_redraws_after_view_change = 0.5
|
||||
|
||||
# we need a dirty hack to sensure that radio button is always in sync with selected setting
|
||||
settings_menu_wake_up_sound_select_button_cb_hack = False
|
||||
|
@ -961,7 +964,7 @@ class MyClockWidget(FloatLayout):
|
|||
|
||||
def draw_display(self):
|
||||
t = time.time()
|
||||
if (self.view != self.view_prev) or (t - self.view_active_since < self.time_to_ignore_inputs_after_view_change):
|
||||
if (self.view != self.view_prev) or (t - self.view_active_since < self.time_to_force_redraws_after_view_change):
|
||||
self.draw_list_last_frame = [] # force redraw when view has changed
|
||||
self.view_prev = self.view
|
||||
|
||||
|
@ -1340,6 +1343,7 @@ class MyClockWidget(FloatLayout):
|
|||
if len(self.light_button_move_init) == 0:
|
||||
self.light_button_move_init = touch_curr.spos
|
||||
|
||||
|
||||
d = touch_curr.spos[0] - self.light_button_move_init[0]
|
||||
threshold = 0.05
|
||||
|
||||
|
|
Loading…
Reference in New Issue