diff --git a/src/functions.h b/src/functions.h index 8a72e48..4209ecf 100644 --- a/src/functions.h +++ b/src/functions.h @@ -220,7 +220,7 @@ namespace global { inline QVector currentAction; inline QVector queue; inline QVector fileList; - inline int itemCurrentlyPlaying = -1; // Also indicates in the queue menu which a grey color which is playing + inline int itemCurrentlyPlaying = -1; // Also indicates in the queue menu which a gray color which is playing inline QMutex audioMutex; // These variables will be shared between threads, so here, it's to protect it inline int progressSeconds = -5; // -5 at default to avoid cutting song too early... yea inline bool paused = false; diff --git a/src/widgets/dialogs/audio/audiodialog.cpp b/src/widgets/dialogs/audio/audiodialog.cpp index a617758..4455014 100644 --- a/src/widgets/dialogs/audio/audiodialog.cpp +++ b/src/widgets/dialogs/audio/audiodialog.cpp @@ -62,7 +62,7 @@ audioDialog::audioDialog(QWidget *parent) : ui->fileNameLabel->setWordWrap(true); // Default "page" - ui->libraryBtn->setStyleSheet("background: grey;"); + ui->libraryBtn->setStyleSheet("background: #aeadac;"); ui->refreshBtn->setIcon(QIcon(":/resources/refresh-small.png")); ui->refreshBtn->hide(); ui->lineRefresh->hide(); @@ -114,7 +114,7 @@ void audioDialog::changeMenu() { ui->lineRefresh->show(); ui->refreshBtn->setIcon(QIcon(":/resources/clean.png")); ui->libraryBtn->setStyleSheet("background: white;"); - ui->queueBtn->setStyleSheet("background: grey;"); + ui->queueBtn->setStyleSheet("background: #aeadac;"); refreshAudioFileWidgetsQueue(); } else if(currentMenu != Library){ @@ -122,7 +122,7 @@ void audioDialog::changeMenu() { emit deleteItself(); ui->refreshBtn->hide(); ui->lineRefresh->hide(); - ui->libraryBtn->setStyleSheet("background: grey;"); + ui->libraryBtn->setStyleSheet("background: #aeadac;"); ui->queueBtn->setStyleSheet("background: white;"); refreshAudioFileWidgets(); } @@ -152,7 +152,7 @@ void audioDialog::refreshFileList() { } // For example in this path: /mnt/onboard/onboard/music/ ( with / at the end ) QString path = readFile(".config/e-2-audio/path").replace("\n", ""); - log("Path for audio files: " + path, className); + log("Path for audio files: '" + path + "'", className); QDir dir{path}; // Other file formats could be added, by building more libraries // https://github.com/arnavyc/sndfile-alsa-example/blob/main/src/sndfile-alsa.c @@ -248,12 +248,12 @@ void audioDialog::refreshAudioFileWidgetsQueue() { for(int i = 0; i < global::audio::queue.size(); i++) { log("Adding new item: " + QString::number(i), className); audiofilequeue* newAudioFileQueue = new audiofilequeue(this); - bool grey = false; + bool gray = false; if(global::audio::isSomethingCurrentlyPlaying == true && global::audio::itemCurrentlyPlaying == i) { - grey = true; + gray = true; } global::audio::queue[i].id = i; // Give them invidual ID once more, because files can repeat - newAudioFileQueue->provideData(global::audio::queue[i], grey); + newAudioFileQueue->provideData(global::audio::queue[i], gray); QObject::connect(this, &audioDialog::deleteItself, newAudioFileQueue, &audiofilequeue::die); QObject::connect(newAudioFileQueue, &audiofilequeue::playFileChild, this, &audioDialog::playFile); ui->verticalLayout->addWidget(newAudioFileQueue, Qt::AlignTop); diff --git a/src/widgets/dialogs/audio/audiofilequeue.cpp b/src/widgets/dialogs/audio/audiofilequeue.cpp index 1fc089a..5a21144 100644 --- a/src/widgets/dialogs/audio/audiofilequeue.cpp +++ b/src/widgets/dialogs/audio/audiofilequeue.cpp @@ -16,14 +16,14 @@ audiofilequeue::~audiofilequeue() delete ui; } -void audiofilequeue::provideData(global::audio::musicFile fileProvided, bool grey) { +void audiofilequeue::provideData(global::audio::musicFile fileProvided, bool gray) { file = fileProvided; ui->nameLabel->setText(file.name); ui->timeLabel->setText(file.length); - if(grey == true) { - log("Setting background grey", className); - ui->deleteBtn->setStyleSheet("background: grey;"); - ui->playButton->setStyleSheet("background: grey;"); + if(gray == true) { + log("Setting background gray", className); + ui->deleteBtn->setStyleSheet("background: #aeadac;"); + ui->playButton->setStyleSheet("background: #aeadac;"); isPlaying = true; } } diff --git a/src/widgets/dialogs/audio/audiofilequeue.h b/src/widgets/dialogs/audio/audiofilequeue.h index d101cd5..6087784 100644 --- a/src/widgets/dialogs/audio/audiofilequeue.h +++ b/src/widgets/dialogs/audio/audiofilequeue.h @@ -18,7 +18,7 @@ public: QString className = this->metaObject()->className(); bool isPlaying = false; - void provideData(global::audio::musicFile fileProvided, bool grey); + void provideData(global::audio::musicFile fileProvided, bool gray); global::audio::musicFile file; public slots: