From 971b8ea13744ef60e583da924d801e0df885ef7b Mon Sep 17 00:00:00 2001 From: Mark Furneaux Date: Thu, 15 May 2014 16:39:32 -0400 Subject: [PATCH] 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. --- src/widgets/nowplayingwidget.cpp | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/widgets/nowplayingwidget.cpp b/src/widgets/nowplayingwidget.cpp index 70390235f..d2b398427 100644 --- a/src/widgets/nowplayingwidget.cpp +++ b/src/widgets/nowplayingwidget.cpp @@ -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 += "

"; 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_) {