diff --git a/src/ui/audio/Audio.cpp b/src/ui/audio/Audio.cpp index 32274ac3..d1675ff9 100644 --- a/src/ui/audio/Audio.cpp +++ b/src/ui/audio/Audio.cpp @@ -44,6 +44,7 @@ _playQueue(nullptr) { Wt::WGridLayout *mainLayout = new Wt::WGridLayout(); this->setLayout(mainLayout); + mainLayout->setContentsMargins(9,4,9,9); // Filters Wt::WHBoxLayout *filterLayout = new Wt::WHBoxLayout(); @@ -122,14 +123,16 @@ _playQueue(nullptr) downBtn->setStyleClass("btn-sm"); playlistControls->addWidget(downBtn); Wt::WPushButton *delBtn = new Wt::WPushButton("DEL"); - delBtn->setStyleClass("btn-sm"); + delBtn->setStyleClass("btn-sm btn-warning"); playlistControls->addWidget(delBtn); + Wt::WPushButton *clearBtn = new Wt::WPushButton("CLR"); + clearBtn->setStyleClass("btn-sm btn-danger"); + playlistControls->addWidget(clearBtn); delBtn->clicked().connect(_playQueue, &PlayQueue::delSelected); upBtn->clicked().connect(_playQueue, &PlayQueue::moveSelectedUp); downBtn->clicked().connect(_playQueue, &PlayQueue::moveSelectedDown); - - playlistControls->addWidget(new Wt::WText("Duration:"), 1); + clearBtn->clicked().connect(_playQueue, &PlayQueue::delAll); // Load menu { @@ -160,7 +163,7 @@ _playQueue(nullptr) mainLayout->setRowStretch(1, 1); mainLayout->setRowResizable(0, true, Wt::WLength(200, Wt::WLength::Pixel)); - mainLayout->setColumnResizable(0, true, Wt::WLength(400, Wt::WLength::Pixel)); + mainLayout->setColumnResizable(0, true, Wt::WLength(350, Wt::WLength::Pixel)); // Double click on track // Set the selected tracks to the play queue diff --git a/src/ui/audio/PlayQueue.cpp b/src/ui/audio/PlayQueue.cpp index ed392bad..13f313e3 100644 --- a/src/ui/audio/PlayQueue.cpp +++ b/src/ui/audio/PlayQueue.cpp @@ -502,7 +502,13 @@ PlayQueue::delSelected(void) _trackSelector->setSize(_model->rowCount()); renumber(minId, _model->rowCount() - 1); +} +void +PlayQueue::delAll(void) +{ + _model->removeRows(0, _model->rowCount()); + _trackSelector->setSize(0); } void diff --git a/src/ui/audio/PlayQueue.hpp b/src/ui/audio/PlayQueue.hpp index 1f968353..003e8518 100644 --- a/src/ui/audio/PlayQueue.hpp +++ b/src/ui/audio/PlayQueue.hpp @@ -53,6 +53,7 @@ class PlayQueue : public Wt::WTableView // List manipulations void delSelected(void); + void delAll(void); void moveSelectedUp(void); void moveSelectedDown(void); diff --git a/src/ui/docroot/css/lms.css b/src/ui/docroot/css/lms.css index 7b8dfaa2..23c78024 100644 --- a/src/ui/docroot/css/lms.css +++ b/src/ui/docroot/css/lms.css @@ -20,15 +20,19 @@ div.contents { } .playqueue-playing { - background-color: rgba(202, 167, 66, 1); + background-color: #4A42CA; } .Wt-tableview .playqueue-playing { color: #FFF; } +.Wt-tableview div.playqueue-playing { + background-color: #4A42CA; +} + .Wt-tableview .Wt-tv-contents.Wt-striped div.playqueue-playing:nth-child(odd) { - background-color: rgba(202, 167, 66, 1); + background-color: #4A42CA; } .playqueue-track {