From 14d215bdf302e24bf60cfb4fb6b81bfe057b4be4 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sun, 19 Mar 2023 19:32:41 +0100 Subject: [PATCH] ContextView: Add static_cast for font size --- src/context/contextview.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/context/contextview.cpp b/src/context/contextview.cpp index f4e0e7507..782756c70 100644 --- a/src/context/contextview.cpp +++ b/src/context/contextview.cpp @@ -435,7 +435,7 @@ void ContextView::NoSong() { widget_album_->show(); } - textedit_top_->setFont(QFont(font_headline_, font_size_headline_ * 1.6)); + textedit_top_->setFont(QFont(font_headline_, static_cast(font_size_headline_ * 1.6))); textedit_top_->SetText(tr("No song playing")); QString html; @@ -451,14 +451,14 @@ void ContextView::NoSong() { else html += tr("%1 albums").arg(collectionview_->TotalAlbums()); html += "
"; - label_stop_summary_->setFont(QFont(font_normal_, font_size_normal_)); + label_stop_summary_->setFont(QFont(font_normal_, static_cast(font_size_normal_))); label_stop_summary_->setText(html); } void ContextView::UpdateFonts() { - QFont font(font_normal_, font_size_normal_); + QFont font(font_normal_, static_cast(font_size_normal_)); font.setBold(false); for (QLabel *l : labels_play_all_) { l->setFont(font); @@ -471,7 +471,7 @@ void ContextView::UpdateFonts() { void ContextView::SetSong() { - textedit_top_->setFont(QFont(font_headline_, font_size_headline_)); + textedit_top_->setFont(QFont(font_headline_, static_cast(font_size_headline_))); textedit_top_->SetText(QString("%1
%2").arg(Utilities::ReplaceMessage(title_fmt_, song_playing_, "
", true), Utilities::ReplaceMessage(summary_fmt_, song_playing_, "
", true))); label_stop_summary_->clear();