summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/Music.cpp
diff options
context:
space:
mode:
authorJean-François Milants <jf@codingfield.com>2021-04-09 21:16:21 +0200
committerJean-François Milants <jf@codingfield.com>2021-04-09 21:16:21 +0200
commit15b3b8e282dd5b2132b0095716cd9d88740d4579 (patch)
treec26870103f8baaa933399cfb86cca25aa7e60d8b /src/displayapp/screens/Music.cpp
parent9ac4be8b759bb2cedeb999ce5e87d983261beded (diff)
parent57b4c3f0edc6acfa31bd2160abdcd6091920ba63 (diff)
Merge branch 'develop' into motion-sensor
# Conflicts: # src/CMakeLists.txt # src/displayapp/Apps.h # src/displayapp/DisplayApp.cpp # src/displayapp/DisplayApp.h # src/displayapp/lv_pinetime_theme.c # src/displayapp/screens/ApplicationList.cpp # src/drivers/TwiMaster.cpp # src/systemtask/SystemTask.h
Diffstat (limited to 'src/displayapp/screens/Music.cpp')
-rw-r--r--src/displayapp/screens/Music.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/displayapp/screens/Music.cpp b/src/displayapp/screens/Music.cpp
index b68f3781..373d084e 100644
--- a/src/displayapp/screens/Music.cpp
+++ b/src/displayapp/screens/Music.cpp
@@ -98,24 +98,28 @@ Music::Music(Pinetime::Applications::DisplayApp *app, Pinetime::Controllers::Mus
lv_label_set_text(txtTrackDuration, "--:--/--:--");
lv_label_set_align(txtTrackDuration, LV_ALIGN_IN_LEFT_MID);
lv_obj_set_width(txtTrackDuration, LV_HOR_RES);
-
+
constexpr uint8_t FONT_HEIGHT = 12;
constexpr uint8_t LINE_PAD = 15;
constexpr int8_t MIDDLE_OFFSET = -25;
txtArtist = lv_label_create(lv_scr_act(), nullptr);
- lv_label_set_long_mode(txtArtist, LV_LABEL_LONG_SROLL);
+ lv_label_set_long_mode(txtArtist, LV_LABEL_LONG_SROLL_CIRC);
+ lv_label_set_anim_speed(txtArtist, 1);
lv_obj_align(txtArtist, nullptr, LV_ALIGN_IN_LEFT_MID, 12, MIDDLE_OFFSET + 1 * FONT_HEIGHT);
- lv_label_set_text(txtArtist, "Artist Name");
lv_label_set_align(txtArtist, LV_ALIGN_IN_LEFT_MID);
- lv_obj_set_width(txtArtist, LV_HOR_RES);
-
+ lv_obj_set_width(txtArtist, LV_HOR_RES-12);
+ lv_label_set_text(txtArtist, "Artist Name");
+
+
txtTrack = lv_label_create(lv_scr_act(), nullptr);
- lv_label_set_long_mode(txtTrack, LV_LABEL_LONG_SROLL);
+ lv_label_set_long_mode(txtTrack, LV_LABEL_LONG_SROLL_CIRC);
+ lv_label_set_anim_speed(txtTrack, 1);
lv_obj_align(txtTrack, nullptr, LV_ALIGN_IN_LEFT_MID, 12, MIDDLE_OFFSET + 2 * FONT_HEIGHT + LINE_PAD);
- lv_label_set_text(txtTrack, "This is a very long getTrack name");
+
lv_label_set_align(txtTrack, LV_ALIGN_IN_LEFT_MID);
- lv_obj_set_width(txtTrack, LV_HOR_RES);
-
+ lv_obj_set_width(txtTrack, LV_HOR_RES-12);
+ lv_label_set_text(txtTrack, "This is a very long getTrack name");
+
/** Init animation */
imgDisc = lv_img_create(lv_scr_act(), nullptr);
lv_img_set_src_arr(imgDisc, &disc);
@@ -134,11 +138,6 @@ Music::~Music() {
lv_obj_clean(lv_scr_act());
}
-bool Music::OnButtonPushed() {
- running = false;
- return true;
-}
-
bool Music::Refresh() {
if (artist != musicService.getArtist()) {
artist = musicService.getArtist();