Commit 3b703e1b authored by Michael Pyne's avatar Michael Pyne

Remove deprecated code, fix NowPlaying bar height.

The NowPlaying bar can be too short on HiDPI screens. I thought I had
fixed this already but it turns out I'm bad at counting. Found this
while I was removing the deprecated usage of QString::null.
parent adf07467
......@@ -73,8 +73,8 @@ NowPlaying::NowPlaying(QWidget *parent, PlaylistCollection *collection) :
const QFont defaultLargeFont(QFontDatabase::systemFont(QFontDatabase::TitleFont));
const QFontMetrics fm(defaultLargeFont, this);
const int coverIconHeight = qMax(64, fm.lineSpacing());
setFixedHeight(coverIconHeight + 2);
const int coverIconHeight = qMax(64, fm.lineSpacing() * 2);
setFixedHeight(coverIconHeight + 4);
layout->addWidget(new CoverItem(this), 0);
layout->addWidget(new TrackItem(this), 2);
......@@ -302,7 +302,9 @@ void TrackItem::slotUpdate()
QString title = m_file.tag()->title().toHtmlEscaped();
QString artist = m_file.tag()->artist().toHtmlEscaped();
QString album = m_file.tag()->album().toHtmlEscaped();
QString separator = (artist.isNull() || album.isNull()) ? QString::null : QString(" - "); //krazy:exclude=nullstrassign for old broken gcc
QString separator =
(artist.isEmpty() || album.isEmpty())
? QString() : QString(" - ");
// This block-o-nastiness makes the font smaller and smaller until it actually fits.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment