(small) Music App Redesign (#2292)

This commit is contained in:
Titus 2025-06-29 16:43:41 +02:00 committed by GitHub
parent c1b9967d92
commit c3afbc59ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 10 deletions

View file

@ -71,9 +71,9 @@ namespace Pinetime {
uint16_t eventHandle {}; uint16_t eventHandle {};
std::string artistName {"Waiting for"}; std::string trackName;
std::string albumName {}; std::string albumName;
std::string trackName {"track information.."}; std::string artistName {"Not Playing"};
bool playing {false}; bool playing {false};

View file

@ -23,6 +23,7 @@
#include "displayapp/icons/music/disc.c" #include "displayapp/icons/music/disc.c"
#include "displayapp/icons/music/disc_f_1.c" #include "displayapp/icons/music/disc_f_1.c"
#include "displayapp/icons/music/disc_f_2.c" #include "displayapp/icons/music/disc_f_2.c"
#include "displayapp/InfiniTimeTheme.h"
using namespace Pinetime::Applications::Screens; using namespace Pinetime::Applications::Screens;
@ -52,8 +53,7 @@ Music::Music(Pinetime::Controllers::MusicService& music) : musicService(music) {
lv_style_init(&btn_style); lv_style_init(&btn_style);
lv_style_set_radius(&btn_style, LV_STATE_DEFAULT, 20); lv_style_set_radius(&btn_style, LV_STATE_DEFAULT, 20);
lv_style_set_bg_color(&btn_style, LV_STATE_DEFAULT, LV_COLOR_AQUA); lv_style_set_bg_color(&btn_style, LV_STATE_DEFAULT, Colors::bgAlt);
lv_style_set_bg_opa(&btn_style, LV_STATE_DEFAULT, LV_OPA_50);
btnVolDown = lv_btn_create(lv_scr_act(), nullptr); btnVolDown = lv_btn_create(lv_scr_act(), nullptr);
btnVolDown->user_data = this; btnVolDown->user_data = this;
@ -114,18 +114,18 @@ Music::Music(Pinetime::Controllers::MusicService& music) : musicService(music) {
constexpr int8_t MIDDLE_OFFSET = -25; constexpr int8_t MIDDLE_OFFSET = -25;
txtArtist = lv_label_create(lv_scr_act(), nullptr); txtArtist = lv_label_create(lv_scr_act(), nullptr);
lv_label_set_long_mode(txtArtist, LV_LABEL_LONG_SROLL_CIRC); lv_label_set_long_mode(txtArtist, LV_LABEL_LONG_SROLL_CIRC);
lv_obj_align(txtArtist, nullptr, LV_ALIGN_IN_LEFT_MID, 12, MIDDLE_OFFSET + 1 * FONT_HEIGHT); lv_obj_align(txtArtist, nullptr, LV_ALIGN_IN_LEFT_MID, 12, MIDDLE_OFFSET + 2 * FONT_HEIGHT + LINE_PAD);
lv_label_set_align(txtArtist, LV_ALIGN_IN_LEFT_MID); lv_label_set_align(txtArtist, LV_ALIGN_IN_LEFT_MID);
lv_obj_set_width(txtArtist, LV_HOR_RES - 12); lv_obj_set_width(txtArtist, LV_HOR_RES - 12);
lv_label_set_text_static(txtArtist, "Artist Name"); lv_label_set_text_static(txtArtist, "");
lv_obj_set_style_local_text_color(txtArtist, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, Colors::lightGray);
txtTrack = lv_label_create(lv_scr_act(), nullptr); txtTrack = lv_label_create(lv_scr_act(), nullptr);
lv_label_set_long_mode(txtTrack, LV_LABEL_LONG_SROLL_CIRC); lv_label_set_long_mode(txtTrack, LV_LABEL_LONG_SROLL_CIRC);
lv_obj_align(txtTrack, nullptr, LV_ALIGN_IN_LEFT_MID, 12, MIDDLE_OFFSET + 2 * FONT_HEIGHT + LINE_PAD); lv_obj_align(txtTrack, nullptr, LV_ALIGN_IN_LEFT_MID, 12, MIDDLE_OFFSET + 1 * FONT_HEIGHT);
lv_label_set_align(txtTrack, LV_ALIGN_IN_LEFT_MID); lv_label_set_align(txtTrack, LV_ALIGN_IN_LEFT_MID);
lv_obj_set_width(txtTrack, LV_HOR_RES - 12); lv_obj_set_width(txtTrack, LV_HOR_RES - 12);
lv_label_set_text_static(txtTrack, "This is a very long getTrack name"); lv_label_set_text_static(txtTrack, "");
/** Init animation */ /** Init animation */
imgDisc = lv_img_create(lv_scr_act(), nullptr); imgDisc = lv_img_create(lv_scr_act(), nullptr);