Skip to content

Commit

Permalink
Change bitmap name to 'star'.
Browse files Browse the repository at this point in the history
  • Loading branch information
qvasic committed Jul 9, 2024
1 parent 16fab32 commit ae6cb1f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions src/image/img_heart.c → src/image/img_star.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
#define LV_ATTRIBUTE_MEM_ALIGN
#endif

#ifndef LV_ATTRIBUTE_IMG_IMG_HEART
#define LV_ATTRIBUTE_IMG_IMG_HEART
#ifndef LV_ATTRIBUTE_IMG_IMG_STAR
#define LV_ATTRIBUTE_IMG_IMG_STAR
#endif

const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_HEART uint8_t img_heart_map[] = {
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_STAR uint8_t img_star_map[] = {
#if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8
/*Pixel format: Red: 3 bit, Green: 3 bit, Blue: 2 bit*/

Expand Down Expand Up @@ -70,12 +70,12 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_HEART
#endif
};

const lv_img_dsc_t img_heart = {
const lv_img_dsc_t img_star = {
.header.cf = LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 32,
.header.h = 32,
.data_size = 1024 * LV_COLOR_SIZE / 8,
.data = img_heart_map,
.data = img_star_map,
};
4 changes: 2 additions & 2 deletions src/ui/page_playback.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#define MEDIA_FILES_DIR REC_diskPATH REC_packPATH // "/mnt/extsd/movies" --> "/mnt/extsd" "/movies/"

LV_IMG_DECLARE(img_heart);
LV_IMG_DECLARE(img_star);
LV_IMG_DECLARE(img_arrow1);

static lv_coord_t col_dsc[] = {320, 320, 320, LV_GRID_TEMPLATE_LAST};
Expand Down Expand Up @@ -62,7 +62,7 @@ static lv_obj_t *page_playback_create(lv_obj_t *parent, panel_arr_t *arr) {
lv_obj_add_flag(pb_ui[pos]._arrow, LV_OBJ_FLAG_HIDDEN);

pb_ui[pos]._heart = lv_img_create(cont);
lv_img_set_src(pb_ui[pos]._heart, &img_heart);
lv_img_set_src(pb_ui[pos]._heart, &img_star);
lv_obj_add_flag(pb_ui[pos]._heart, LV_OBJ_FLAG_HIDDEN);

pb_ui[pos]._label = lv_label_create(cont);
Expand Down
4 changes: 2 additions & 2 deletions src/ui/ui_player.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ player_cmd_t cmd;

LV_IMG_DECLARE(img_Play_0);
LV_IMG_DECLARE(img_Stop_0);
LV_IMG_DECLARE(img_heart);
LV_IMG_DECLARE(img_star);

bool likes_position_on_timeline = false;
size_t likes_count = 0;
Expand Down Expand Up @@ -126,7 +126,7 @@ static void mplayer_create_slider(lv_obj_t *parent, int16_t x, int16_t y) {
for (size_t i = 0; i < likes_count; i++)
{
controller._hearts[i] = lv_img_create(parent);
lv_img_set_src(controller._hearts[i], &img_heart);
lv_img_set_src(controller._hearts[i], &img_star);
lv_obj_set_pos(controller._hearts[i], x, y + 20);
}
}
Expand Down

0 comments on commit ae6cb1f

Please sign in to comment.