1
0
mirror of https://github.com/clementine-player/Clementine synced 2025-02-02 12:26:48 +01:00

Use UI background colour when in fit width mode

When in fit width mode with the details below the artwork,
drawing the black background is out of place. This uses the ui colour
making it less obtrusive.
This commit is contained in:
Mark Furneaux 2014-05-15 16:39:32 -04:00
parent 1f8fa45da0
commit 971b8ea137

View File

@ -267,11 +267,15 @@ void NowPlayingWidget::UpdateDetailsText() {
case LargeSongDetailsBelow:
details_->setTextWidth(cover_loader_options_.desired_height_);
details_->setDefaultStyleSheet(
"p {"
" font-size: small;"
" color: white;"
"}");
if (fit_width_) {
details_->setDefaultStyleSheet("");
} else {
details_->setDefaultStyleSheet(
"p {"
" font-size: small;"
" color: white;"
"}");
}
html += "<p align=center>";
break;
}
@ -437,9 +441,11 @@ void NowPlayingWidget::DrawContents(QPainter* p) {
const int x_offset =
(width() - cover_loader_options_.desired_height_) / 2;
// Draw the black background
p->fillRect(QRect(0, kTopBorder, width(), height() - kTopBorder),
Qt::black);
if (!fit_width_) {
// Draw the black background
p->fillRect(QRect(0, kTopBorder, width(), height() - kTopBorder),
Qt::black);
}
// Draw the cover
if (hypnotoad_) {