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