Use stock animation distances
This commit is contained in:
+8
-2
@@ -26,6 +26,12 @@ const uint16_t SELECT_Y = 72;
|
|||||||
const uint16_t DOWN_Y = 117;
|
const uint16_t DOWN_Y = 117;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if PBL_ROUND
|
||||||
|
#define ANIM_DISTANCE 4
|
||||||
|
#else
|
||||||
|
#define ANIM_DISTANCE 5
|
||||||
|
#endif
|
||||||
|
|
||||||
static const GRect s_base_grect_rect = GRect(PBL_DISPLAY_WIDTH - ACTION_BAR_WIDTH, 0, ACTION_BAR_WIDTH, PBL_DISPLAY_HEIGHT);
|
static const GRect s_base_grect_rect = GRect(PBL_DISPLAY_WIDTH - ACTION_BAR_WIDTH, 0, ACTION_BAR_WIDTH, PBL_DISPLAY_HEIGHT);
|
||||||
|
|
||||||
static NeatBarLayer *s_current_neat_bar = NULL;
|
static NeatBarLayer *s_current_neat_bar = NULL;
|
||||||
@@ -65,13 +71,13 @@ static Animation *s_animate_move(NeatBarLayer *neat_bar, uint8_t button_index, b
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void s_icon_down_handler(NeatBarLayer *neat_bar, uint8_t button_index) {
|
static void s_icon_down_handler(NeatBarLayer *neat_bar, uint8_t button_index) {
|
||||||
Animation *anim = s_animate_move(neat_bar, button_index, false, -4);
|
Animation *anim = s_animate_move(neat_bar, button_index, false, -ANIM_DISTANCE);
|
||||||
animation_set_duration(anim, 144);
|
animation_set_duration(anim, 144);
|
||||||
animation_schedule(anim);
|
animation_schedule(anim);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void s_icon_up_handler(NeatBarLayer *neat_bar, uint8_t button_index) {
|
static void s_icon_up_handler(NeatBarLayer *neat_bar, uint8_t button_index) {
|
||||||
Animation *anim = s_animate_move(neat_bar, button_index, false, 4);
|
Animation *anim = s_animate_move(neat_bar, button_index, false, ANIM_DISTANCE);
|
||||||
animation_set_duration(anim, 144);
|
animation_set_duration(anim, 144);
|
||||||
animation_schedule(anim);
|
animation_schedule(anim);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user