Commit 5c81d1ef authored by Andrea Scarpino's avatar Andrea Scarpino

Preview song text in the cover

parent 690eb785
...@@ -27,8 +27,47 @@ import Sailfish.Silica 1.0 ...@@ -27,8 +27,47 @@ import Sailfish.Silica 1.0
CoverBackground { CoverBackground {
Connections {
target: manager
onSearchResult: {
placeholder.visible = !found;
if (found) {
title.text = lyric.artist + " - " + lyric.song;
songText.text = lyric.text;
}
songInfo.visible = found;
}
}
CoverPlaceholder { CoverPlaceholder {
id: placeholder
text: "Lyrics" text: "Lyrics"
icon.source: "/usr/share/icons/hicolor/86x86/apps/harbour-lyrics.png" icon.source: "/usr/share/icons/hicolor/86x86/apps/harbour-lyrics.png"
} }
Column {
id: songInfo
anchors.centerIn: parent
x: Theme.paddingSmall
width: parent.width - Theme.paddingSmall * 2
Label {
id: title
width: parent.width
wrapMode: Text.Wrap
font.pixelSize: Theme.fontSizeMedium
horizontalAlignment: Text.AlignHCenter
}
Label {
id: songText
width: parent.width
wrapMode: Text.Wrap
maximumLineCount: 10
elide: Text.ElideRight
font.pixelSize: Theme.fontSizeExtraSmall
}
}
} }
...@@ -4,37 +4,37 @@ ...@@ -4,37 +4,37 @@
<context> <context>
<name>MainPage</name> <name>MainPage</name>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="65"/> <location filename="../qml/pages/MainPage.qml" line="76"/>
<source>Clear</source> <source>Clear</source>
<translation>محو</translation> <translation>محو</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="59"/> <location filename="../qml/pages/MainPage.qml" line="70"/>
<source>Settings</source> <source>Settings</source>
<translation>الإعدادات</translation> <translation>الإعدادات</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="165"/> <location filename="../qml/pages/MainPage.qml" line="179"/>
<source>Powered by %1</source> <source>Powered by %1</source>
<translation>مشغل بواسطة %1</translation> <translation>مشغل بواسطة %1</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="108"/> <location filename="../qml/pages/MainPage.qml" line="119"/>
<source>Artist</source> <source>Artist</source>
<translation>الفنان</translation> <translation>الفنان</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="78"/> <location filename="../qml/pages/MainPage.qml" line="89"/>
<source>Copy to clipboard</source> <source>Copy to clipboard</source>
<translation>انسخ إلى الحافظة</translation> <translation>انسخ إلى الحافظة</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="119"/> <location filename="../qml/pages/MainPage.qml" line="131"/>
<source>Song</source> <source>Song</source>
<translation>الأغنية</translation> <translation>الأغنية</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="135"/> <location filename="../qml/pages/MainPage.qml" line="148"/>
<source>Search</source> <source>Search</source>
<translation>بحث</translation> <translation>بحث</translation>
</message> </message>
...@@ -52,7 +52,17 @@ ...@@ -52,7 +52,17 @@
<translation>موفر</translation> <translation>موفر</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/Settings.qml" line="64"/> <location filename="../qml/pages/Settings.qml" line="66"/>
<source>Enable Media Player scanner</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="67"/>
<source>Checks Media Player to get song info. Do not focus any field to allow text substitution.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="76"/>
<source>Clear cache</source> <source>Clear cache</source>
<translation>امسح الخابية</translation> <translation>امسح الخابية</translation>
</message> </message>
......
...@@ -4,37 +4,37 @@ ...@@ -4,37 +4,37 @@
<context> <context>
<name>MainPage</name> <name>MainPage</name>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="65"/> <location filename="../qml/pages/MainPage.qml" line="76"/>
<source>Clear</source> <source>Clear</source>
<translation>Neteja</translation> <translation>Neteja</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="59"/> <location filename="../qml/pages/MainPage.qml" line="70"/>
<source>Settings</source> <source>Settings</source>
<translation>Configuració</translation> <translation>Configuració</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="165"/> <location filename="../qml/pages/MainPage.qml" line="179"/>
<source>Powered by %1</source> <source>Powered by %1</source>
<translation>Impulsat per %1</translation> <translation>Impulsat per %1</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="108"/> <location filename="../qml/pages/MainPage.qml" line="119"/>
<source>Artist</source> <source>Artist</source>
<translation>Artista</translation> <translation>Artista</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="78"/> <location filename="../qml/pages/MainPage.qml" line="89"/>
<source>Copy to clipboard</source> <source>Copy to clipboard</source>
<translation>Copia al porta-retalls</translation> <translation>Copia al porta-retalls</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="119"/> <location filename="../qml/pages/MainPage.qml" line="131"/>
<source>Song</source> <source>Song</source>
<translation>Cançó</translation> <translation>Cançó</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="135"/> <location filename="../qml/pages/MainPage.qml" line="148"/>
<source>Search</source> <source>Search</source>
<translation>Cerca</translation> <translation>Cerca</translation>
</message> </message>
...@@ -52,7 +52,17 @@ ...@@ -52,7 +52,17 @@
<translation>Proveïdor</translation> <translation>Proveïdor</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/Settings.qml" line="64"/> <location filename="../qml/pages/Settings.qml" line="66"/>
<source>Enable Media Player scanner</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="67"/>
<source>Checks Media Player to get song info. Do not focus any field to allow text substitution.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="76"/>
<source>Clear cache</source> <source>Clear cache</source>
<translation>Neteja la memòria cau</translation> <translation>Neteja la memòria cau</translation>
</message> </message>
......
...@@ -4,37 +4,37 @@ ...@@ -4,37 +4,37 @@
<context> <context>
<name>MainPage</name> <name>MainPage</name>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="65"/> <location filename="../qml/pages/MainPage.qml" line="76"/>
<source>Clear</source> <source>Clear</source>
<translation>Vyprázdnit</translation> <translation>Vyprázdnit</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="59"/> <location filename="../qml/pages/MainPage.qml" line="70"/>
<source>Settings</source> <source>Settings</source>
<translation>Nastavení</translation> <translation>Nastavení</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="165"/> <location filename="../qml/pages/MainPage.qml" line="179"/>
<source>Powered by %1</source> <source>Powered by %1</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="108"/> <location filename="../qml/pages/MainPage.qml" line="119"/>
<source>Artist</source> <source>Artist</source>
<translation>Umělec</translation> <translation>Umělec</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="78"/> <location filename="../qml/pages/MainPage.qml" line="89"/>
<source>Copy to clipboard</source> <source>Copy to clipboard</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="119"/> <location filename="../qml/pages/MainPage.qml" line="131"/>
<source>Song</source> <source>Song</source>
<translation>Píseň</translation> <translation>Píseň</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="135"/> <location filename="../qml/pages/MainPage.qml" line="148"/>
<source>Search</source> <source>Search</source>
<translation>Hledat</translation> <translation>Hledat</translation>
</message> </message>
...@@ -52,7 +52,17 @@ ...@@ -52,7 +52,17 @@
<translation>Poskytovatel</translation> <translation>Poskytovatel</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/Settings.qml" line="64"/> <location filename="../qml/pages/Settings.qml" line="66"/>
<source>Enable Media Player scanner</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="67"/>
<source>Checks Media Player to get song info. Do not focus any field to allow text substitution.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="76"/>
<source>Clear cache</source> <source>Clear cache</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
......
...@@ -4,37 +4,37 @@ ...@@ -4,37 +4,37 @@
<context> <context>
<name>MainPage</name> <name>MainPage</name>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="65"/> <location filename="../qml/pages/MainPage.qml" line="76"/>
<source>Clear</source> <source>Clear</source>
<translation>Tyhjennä</translation> <translation>Tyhjennä</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="59"/> <location filename="../qml/pages/MainPage.qml" line="70"/>
<source>Settings</source> <source>Settings</source>
<translation>Asetukset</translation> <translation>Asetukset</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="165"/> <location filename="../qml/pages/MainPage.qml" line="179"/>
<source>Powered by %1</source> <source>Powered by %1</source>
<translation>Powered by %1</translation> <translation>Powered by %1</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="108"/> <location filename="../qml/pages/MainPage.qml" line="119"/>
<source>Artist</source> <source>Artist</source>
<translation>Artisti</translation> <translation>Artisti</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="78"/> <location filename="../qml/pages/MainPage.qml" line="89"/>
<source>Copy to clipboard</source> <source>Copy to clipboard</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="119"/> <location filename="../qml/pages/MainPage.qml" line="131"/>
<source>Song</source> <source>Song</source>
<translation>Kappale</translation> <translation>Kappale</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="135"/> <location filename="../qml/pages/MainPage.qml" line="148"/>
<source>Search</source> <source>Search</source>
<translation>Etsi</translation> <translation>Etsi</translation>
</message> </message>
...@@ -52,7 +52,17 @@ ...@@ -52,7 +52,17 @@
<translation>Toimittaja</translation> <translation>Toimittaja</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/Settings.qml" line="64"/> <location filename="../qml/pages/Settings.qml" line="66"/>
<source>Enable Media Player scanner</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="67"/>
<source>Checks Media Player to get song info. Do not focus any field to allow text substitution.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="76"/>
<source>Clear cache</source> <source>Clear cache</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
......
...@@ -4,37 +4,37 @@ ...@@ -4,37 +4,37 @@
<context> <context>
<name>MainPage</name> <name>MainPage</name>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="65"/> <location filename="../qml/pages/MainPage.qml" line="76"/>
<source>Clear</source> <source>Clear</source>
<translation>Effacer</translation> <translation>Effacer</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="59"/> <location filename="../qml/pages/MainPage.qml" line="70"/>
<source>Settings</source> <source>Settings</source>
<translation>Paramètres</translation> <translation>Paramètres</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="165"/> <location filename="../qml/pages/MainPage.qml" line="179"/>
<source>Powered by %1</source> <source>Powered by %1</source>
<translation>Powered by %1</translation> <translation>Powered by %1</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="108"/> <location filename="../qml/pages/MainPage.qml" line="119"/>
<source>Artist</source> <source>Artist</source>
<translation>Artiste</translation> <translation>Artiste</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="78"/> <location filename="../qml/pages/MainPage.qml" line="89"/>
<source>Copy to clipboard</source> <source>Copy to clipboard</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="119"/> <location filename="../qml/pages/MainPage.qml" line="131"/>
<source>Song</source> <source>Song</source>
<translation>Morceau</translation> <translation>Morceau</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="135"/> <location filename="../qml/pages/MainPage.qml" line="148"/>
<source>Search</source> <source>Search</source>
<translation>Recherche</translation> <translation>Recherche</translation>
</message> </message>
...@@ -52,7 +52,17 @@ ...@@ -52,7 +52,17 @@
<translation>Fournisseur</translation> <translation>Fournisseur</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/Settings.qml" line="64"/> <location filename="../qml/pages/Settings.qml" line="66"/>
<source>Enable Media Player scanner</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="67"/>
<source>Checks Media Player to get song info. Do not focus any field to allow text substitution.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="76"/>
<source>Clear cache</source> <source>Clear cache</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
......
...@@ -4,37 +4,37 @@ ...@@ -4,37 +4,37 @@
<context> <context>
<name>MainPage</name> <name>MainPage</name>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="65"/> <location filename="../qml/pages/MainPage.qml" line="76"/>
<source>Clear</source> <source>Clear</source>
<translation>Pulisci</translation> <translation>Pulisci</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="59"/> <location filename="../qml/pages/MainPage.qml" line="70"/>
<source>Settings</source> <source>Settings</source>
<translation>Impostazioni</translation> <translation>Impostazioni</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="165"/> <location filename="../qml/pages/MainPage.qml" line="179"/>
<source>Powered by %1</source> <source>Powered by %1</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="108"/> <location filename="../qml/pages/MainPage.qml" line="119"/>
<source>Artist</source> <source>Artist</source>
<translation>Artista</translation> <translation>Artista</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="78"/> <location filename="../qml/pages/MainPage.qml" line="89"/>
<source>Copy to clipboard</source> <source>Copy to clipboard</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="119"/> <location filename="../qml/pages/MainPage.qml" line="131"/>
<source>Song</source> <source>Song</source>
<translation>Brano</translation> <translation>Brano</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="135"/> <location filename="../qml/pages/MainPage.qml" line="148"/>
<source>Search</source> <source>Search</source>
<translation>Cerca</translation> <translation>Cerca</translation>
</message> </message>
...@@ -52,7 +52,17 @@ ...@@ -52,7 +52,17 @@
<translation>Servizio</translation> <translation>Servizio</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/Settings.qml" line="64"/> <location filename="../qml/pages/Settings.qml" line="66"/>
<source>Enable Media Player scanner</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="67"/>
<source>Checks Media Player to get song info. Do not focus any field to allow text substitution.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="76"/>
<source>Clear cache</source> <source>Clear cache</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
......
...@@ -4,37 +4,37 @@ ...@@ -4,37 +4,37 @@
<context> <context>
<name>MainPage</name> <name>MainPage</name>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="65"/> <location filename="../qml/pages/MainPage.qml" line="76"/>
<source>Clear</source> <source>Clear</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="59"/> <location filename="../qml/pages/MainPage.qml" line="70"/>
<source>Settings</source> <source>Settings</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="165"/> <location filename="../qml/pages/MainPage.qml" line="179"/>
<source>Powered by %1</source> <source>Powered by %1</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="108"/> <location filename="../qml/pages/MainPage.qml" line="119"/>
<source>Artist</source> <source>Artist</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="78"/> <location filename="../qml/pages/MainPage.qml" line="89"/>
<source>Copy to clipboard</source> <source>Copy to clipboard</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="119"/> <location filename="../qml/pages/MainPage.qml" line="131"/>
<source>Song</source> <source>Song</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainPage.qml" line="135"/> <location filename="../qml/pages/MainPage.qml" line="148"/>
<source>Search</source> <source>Search</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
...@@ -52,7 +52,17 @@ ...@@ -52,7 +52,17 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/Settings.qml" line="64"/> <location filename="../qml/pages/Settings.qml" line="66"/>
<source>Enable Media Player scanner</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="67"/>
<source>Checks Media Player to get song info. Do not focus any field to allow text substitution.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="76"/>
<source>Clear cache</source>