Show song name when editing
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#include "network.h"
|
||||
#include "settings.h"
|
||||
#include "mainwindow.h"
|
||||
#include "squeezedtextlabel.h"
|
||||
#include <QtCore/QFuture>
|
||||
#include <QtCore/QFutureWatcher>
|
||||
#include <QtCore/QSettings>
|
||||
@@ -407,6 +408,12 @@ void LyricsPage::setMode(Mode m)
|
||||
editAction->setEnabled(editable);
|
||||
delAction->setEnabled(editable && !Settings::self()->mpdDir().isEmpty() && QFile::exists(changeExt(Settings::self()->mpdDir()+currentSong.file, constExtension)));
|
||||
text->setReadOnly(Mode_Edit!=m);
|
||||
songLabel->setVisible(Mode_Edit==m);
|
||||
#ifdef ENABLE_KDE_SUPPORT
|
||||
songLabel->setText(Mode_Edit==m ? i18nc("title, by artist", "%1, by %2", currentSong.title, currentSong.artist) : QString());
|
||||
#else
|
||||
songLabel->setText(Mode_Edit==m ? tr("%1, by %2").arg(currentSong.title).arg(currentSong.artist) : QString());
|
||||
#endif
|
||||
}
|
||||
|
||||
bool LyricsPage::setLyricsFromFile(const QString &filePath) const
|
||||
|
||||
@@ -24,10 +24,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item row="1" column="0" colspan="6">
|
||||
<widget class="SqueezedTextLabel" name="songLabel"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QToolButton" name="refreshBtn"/>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<item row="2" column="1">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
@@ -40,21 +43,26 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<item row="2" column="2">
|
||||
<widget class="QToolButton" name="editBtn"/>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<item row="2" column="3">
|
||||
<widget class="QToolButton" name="saveBtn"/>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<item row="2" column="4">
|
||||
<widget class="QToolButton" name="cancelBtn"/>
|
||||
</item>
|
||||
<item row="1" column="5">
|
||||
<item row="2" column="5">
|
||||
<widget class="QToolButton" name="delBtn"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>SqueezedTextLabel</class>
|
||||
<extends>QLabel</extends>
|
||||
<header>squeezedtextlabel.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>TextBrowser</class>
|
||||
<extends>QTextBrowser</extends>
|
||||
|
||||
Reference in New Issue
Block a user