From 7f4f715003c58eefef3227e4203279b38a41e280 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sun, 7 Sep 2025 13:53:59 +0200 Subject: [PATCH] ContextView: Remove EBU R 128 It breaks wordwrap --- src/context/contextview.cpp | 53 +++---------------------------------- src/context/contextview.h | 8 +----- 2 files changed, 4 insertions(+), 57 deletions(-) diff --git a/src/context/contextview.cpp b/src/context/contextview.cpp index 38db1846d..8f4617891 100644 --- a/src/context/contextview.cpp +++ b/src/context/contextview.cpp @@ -1,6 +1,6 @@ /* * Strawberry Music Player - * Copyright 2013-2022, Jonas Kvinge + * Copyright 2013-2025, Jonas Kvinge * * Strawberry is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -100,15 +100,11 @@ ContextView::ContextView(QWidget *parent) label_samplerate_title_(new QLabel(this)), label_bitdepth_title_(new QLabel(this)), label_bitrate_title_(new QLabel(this)), - label_ebur128_integrated_loudness_title_(new QLabel(this)), - label_ebur128_loudness_range_title_(new QLabel(this)), label_filetype_(new QLabel(this)), label_length_(new QLabel(this)), label_samplerate_(new QLabel(this)), label_bitdepth_(new QLabel(this)), label_bitrate_(new QLabel(this)), - label_ebur128_integrated_loudness_(new QLabel(this)), - label_ebur128_loudness_range_(new QLabel(this)), lyrics_tried_(false), lyrics_id_(-1) { @@ -166,24 +162,18 @@ ContextView::ContextView(QWidget *parent) label_samplerate_title_->setText(tr("Samplerate")); label_bitdepth_title_->setText(tr("Bit depth")); label_bitrate_title_->setText(tr("Bitrate")); - label_ebur128_integrated_loudness_title_->setText(tr("EBU R 128 Integrated Loudness")); - label_ebur128_loudness_range_title_->setText(tr("EBU R 128 Loudness Range")); label_filetype_title_->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); label_length_title_->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); label_samplerate_title_->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); label_bitdepth_title_->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); label_bitrate_title_->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - label_ebur128_integrated_loudness_title_->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - label_ebur128_loudness_range_title_->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); label_filetype_->setWordWrap(true); label_length_->setWordWrap(true); label_samplerate_->setWordWrap(true); label_bitdepth_->setWordWrap(true); label_bitrate_->setWordWrap(true); - label_ebur128_integrated_loudness_->setWordWrap(true); - label_ebur128_loudness_range_->setWordWrap(true); layout_play_data_->setContentsMargins(0, 0, 0, 0); layout_play_data_->addWidget(label_filetype_title_, 0, 0); @@ -197,11 +187,6 @@ ContextView::ContextView(QWidget *parent) layout_play_data_->addWidget(label_bitrate_title_, 4, 0); layout_play_data_->addWidget(label_bitrate_, 4, 1); - layout_play_data_->addWidget(label_ebur128_integrated_loudness_title_, 5, 0); - layout_play_data_->addWidget(label_ebur128_integrated_loudness_, 5, 1); - layout_play_data_->addWidget(label_ebur128_loudness_range_title_, 6, 0); - layout_play_data_->addWidget(label_ebur128_loudness_range_, 6, 1); - widget_play_data_->setLayout(layout_play_data_); textedit_play_lyrics_->setReadOnly(true); @@ -218,17 +203,13 @@ ContextView::ContextView(QWidget *parent) << label_length_title_ << label_samplerate_title_ << label_bitdepth_title_ - << label_bitrate_title_ - << label_ebur128_integrated_loudness_title_ - << label_ebur128_loudness_range_title_; + << label_bitrate_title_; labels_play_data_ << label_filetype_ << label_length_ << label_samplerate_ << label_bitdepth_ - << label_bitrate_ - << label_ebur128_integrated_loudness_ - << label_ebur128_loudness_range_; + << label_bitrate_; labels_play_all_ = labels_play_ << labels_play_data_; @@ -493,26 +474,6 @@ void ContextView::SetSong() { label_bitrate_->show(); SetLabelText(label_bitrate_, song_playing_.bitrate(), tr("kbps")); } - if (!song_playing_.ebur128_integrated_loudness_lufs()) { - label_ebur128_integrated_loudness_title_->hide(); - label_ebur128_integrated_loudness_->hide(); - label_ebur128_integrated_loudness_->clear(); - } - else { - label_ebur128_integrated_loudness_title_->show(); - label_ebur128_integrated_loudness_->show(); - label_ebur128_integrated_loudness_->setText(song_playing_.Ebur128LoudnessLUFSToText()); - } - if (!song_playing_.ebur128_loudness_range_lu()) { - label_ebur128_loudness_range_title_->hide(); - label_ebur128_loudness_range_->hide(); - label_ebur128_loudness_range_->clear(); - } - else { - label_ebur128_loudness_range_title_->show(); - label_ebur128_loudness_range_->show(); - label_ebur128_loudness_range_->setText(song_playing_.Ebur128LoudnessRangeLUToText()); - } spacer_play_data_->changeSize(20, 20, QSizePolicy::Fixed); } else { @@ -522,8 +483,6 @@ void ContextView::SetSong() { label_samplerate_->clear(); label_bitdepth_->clear(); label_bitrate_->clear(); - label_ebur128_integrated_loudness_->clear(); - label_ebur128_loudness_range_->clear(); spacer_play_data_->changeSize(0, 0, QSizePolicy::Fixed); } @@ -598,12 +557,6 @@ void ContextView::UpdateSong(const Song &song) { SetLabelText(label_bitrate_, song.bitrate(), tr("kbps")); } } - if (song.ebur128_integrated_loudness_lufs() != song_playing_.ebur128_integrated_loudness_lufs()) { - label_ebur128_integrated_loudness_->setText(song_playing_.Ebur128LoudnessLUFSToText()); - } - if (song.ebur128_loudness_range_lu() != song_playing_.ebur128_loudness_range_lu()) { - label_ebur128_loudness_range_->setText(song_playing_.Ebur128LoudnessRangeLUToText()); - } } song_playing_ = song; diff --git a/src/context/contextview.h b/src/context/contextview.h index dc7c1877b..800a5d683 100644 --- a/src/context/contextview.h +++ b/src/context/contextview.h @@ -1,6 +1,6 @@ /* * Strawberry Music Player - * Copyright 2013-2022, Jonas Kvinge + * Copyright 2013-2025, Jonas Kvinge * * Strawberry is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -135,18 +135,12 @@ class ContextView : public QWidget { QLabel *label_bitdepth_title_; QLabel *label_bitrate_title_; - QLabel *label_ebur128_integrated_loudness_title_; - QLabel *label_ebur128_loudness_range_title_; - QLabel *label_filetype_; QLabel *label_length_; QLabel *label_samplerate_; QLabel *label_bitdepth_; QLabel *label_bitrate_; - QLabel *label_ebur128_integrated_loudness_; - QLabel *label_ebur128_loudness_range_; - Song song_playing_; Song song_prev_; QImage image_original_;