Skip to content

Commit 4921380

Browse files
committed
WCoverArt*: Add tooltip for cover image
1 parent 2893ff3 commit 4921380

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

src/skin/legacy/tooltips.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,6 +1004,8 @@ void Tooltips::addStandardTooltips() {
10041004
<< tr("Audio Latency Overload Indicator")
10051005
<< tr("Indicates that the audio buffer is too small to do all audio processing.");
10061006

1007+
// Note: Some of the coverart strings below are reused in src/widget/wcoverartlabel.cpp.
1008+
// Please sync changes made here to wcoverartlabel.cpp, and vice versa.
10071009
add("coverart")
10081010
<< tr("Cover Art")
10091011
<< tr("Displays cover artwork of the loaded track.")

src/widget/wcoverartlabel.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,20 @@ WCoverArtLabel::WCoverArtLabel(QWidget* pParent, WCoverArtMenu* pCoverMenu)
4848
setFrameShape(QFrame::Box);
4949
setAlignment(Qt::AlignCenter);
5050
setPixmapAndResize(m_defaultCover);
51+
52+
// Note: We reuse existing translation strings from src/skin/legacy/tooltips.cpp
53+
// to avoid having to retranslate basically the same content twice.
54+
// Please sync changes made here to tooltips.cpp, and vice versa.
55+
QString tooltip = QString("%1: %2").arg(
56+
tr("Left-click"),
57+
tr("Opens separate artwork viewer."));
58+
if (m_pCoverMenu) {
59+
tooltip += "\n";
60+
tooltip += QString("%1: %2").arg(
61+
tr("Right-click"),
62+
tr("Displays options for editing cover artwork."));
63+
}
64+
setToolTip(tooltip);
5165
}
5266

5367
WCoverArtLabel::~WCoverArtLabel() = default;

0 commit comments

Comments
 (0)