This commit is contained in:
sharandac
2020-08-10 15:28:38 +02:00
9 changed files with 14 additions and 1 deletions

View File

@@ -186,3 +186,8 @@ lv_obj_t * mainbar_obj_create(lv_obj_t *parent)
return child;
}
void mainbar_add_slide_element(lv_obj_t *element)
{
lv_tileview_add_element( mainbar, element );
}

View File

@@ -109,4 +109,6 @@
lv_obj_t * mainbar_obj_create(lv_obj_t *parent);
void mainbar_add_slide_element(lv_obj_t *element);
#endif // _MAINBAR_H

View File

@@ -66,6 +66,7 @@ void battery_settings_tile_setup( void ) {
// register an setup icon an set an callback
battery_setup_icon_cont = setup_tile_register_setup();
lv_obj_t *battery_setup = lv_imgbtn_create ( battery_setup_icon_cont, NULL);
mainbar_add_slide_element(battery_setup);
lv_imgbtn_set_src( battery_setup, LV_BTN_STATE_RELEASED, &battery_icon_64px);
lv_imgbtn_set_src( battery_setup, LV_BTN_STATE_PRESSED, &battery_icon_64px);
lv_imgbtn_set_src( battery_setup, LV_BTN_STATE_CHECKED_RELEASED, &battery_icon_64px);

View File

@@ -65,6 +65,7 @@ void display_settings_tile_setup( void ) {
// register an setup icon an set an callback
display_setup_icon_cont = setup_tile_register_setup();
lv_obj_t *display_setup_icon = lv_imgbtn_create ( display_setup_icon_cont, NULL);
mainbar_add_slide_element(display_setup_icon);
lv_imgbtn_set_src( display_setup_icon, LV_BTN_STATE_RELEASED, &brightness_64px);
lv_imgbtn_set_src( display_setup_icon, LV_BTN_STATE_PRESSED, &brightness_64px);
lv_imgbtn_set_src( display_setup_icon, LV_BTN_STATE_CHECKED_RELEASED, &brightness_64px);

View File

@@ -55,6 +55,7 @@ void move_settings_tile_setup( void ) {
// register an setup icon an set an callback
lv_obj_t *move_setup = lv_imgbtn_create ( setup_tile_register_setup(), NULL);
mainbar_add_slide_element(move_setup);
lv_imgbtn_set_src( move_setup, LV_BTN_STATE_RELEASED, &move_64px);
lv_imgbtn_set_src( move_setup, LV_BTN_STATE_PRESSED, &move_64px);
lv_imgbtn_set_src( move_setup, LV_BTN_STATE_CHECKED_RELEASED, &move_64px);

View File

@@ -42,7 +42,7 @@ void setup_tile_setup( void ) {
setup_entry[ setup ].y = SETUP_FIRST_Y_POS + ( ( setup / MAX_SETUP_ICON_HORZ ) * ( SETUP_ICON_Y_SIZE + SETUP_ICON_Y_CLEARENCE ) );
setup_entry[ setup ].active = false;
// create app icon container
setup_entry[ setup ].setup = lv_obj_create( setup_cont, NULL );
setup_entry[ setup ].setup = mainbar_obj_create( setup_cont );
lv_obj_reset_style_list( setup_entry[ setup ].setup, LV_OBJ_PART_MAIN );
lv_obj_add_style( setup_entry[ setup ].setup, LV_OBJ_PART_MAIN, &setup_style );
lv_obj_set_size( setup_entry[ setup ].setup, SETUP_ICON_X_SIZE, SETUP_ICON_Y_SIZE );

View File

@@ -59,6 +59,7 @@ void time_settings_tile_setup( void ) {
// register an setup icon an set an callback
lv_obj_t *move_setup = lv_imgbtn_create ( setup_tile_register_setup(), NULL);
mainbar_add_slide_element(move_setup);
lv_imgbtn_set_src( move_setup, LV_BTN_STATE_RELEASED, &time_64px);
lv_imgbtn_set_src( move_setup, LV_BTN_STATE_PRESSED, &time_64px);
lv_imgbtn_set_src( move_setup, LV_BTN_STATE_CHECKED_RELEASED, &time_64px);

View File

@@ -74,6 +74,7 @@ void update_tile_setup( void ) {
// register an setup icon an set an callback
update_setup_icon_cont = setup_tile_register_setup();
lv_obj_t *update_setup = lv_imgbtn_create ( update_setup_icon_cont, NULL);
mainbar_add_slide_element(update_setup);
lv_imgbtn_set_src( update_setup, LV_BTN_STATE_RELEASED, &update_64px);
lv_imgbtn_set_src( update_setup, LV_BTN_STATE_PRESSED, &update_64px);
lv_imgbtn_set_src( update_setup, LV_BTN_STATE_CHECKED_RELEASED, &update_64px);

View File

@@ -83,6 +83,7 @@ void wlan_settings_tile_setup( void ) {
// register an setup icon an set an callback
lv_obj_t *wifi_setup = lv_imgbtn_create ( setup_tile_register_setup(), NULL);
mainbar_add_slide_element(wifi_setup);
lv_imgbtn_set_src( wifi_setup, LV_BTN_STATE_RELEASED, &wifi_64px);
lv_imgbtn_set_src( wifi_setup, LV_BTN_STATE_PRESSED, &wifi_64px);
lv_imgbtn_set_src( wifi_setup, LV_BTN_STATE_CHECKED_RELEASED, &wifi_64px);