Make it possible to change the font size of the song/artist info views.

This commit is contained in:
David Sansome 2010-10-16 13:56:49 +00:00
parent c2c0eac13b
commit 07f181cc2b
44 changed files with 483 additions and 9 deletions

View File

@ -274,5 +274,6 @@
<file>providers/mtvmusic.png</file> <file>providers/mtvmusic.png</file>
<file>providers/cdbaby.png</file> <file>providers/cdbaby.png</file>
<file>providers/echonest.png</file> <file>providers/echonest.png</file>
<file>lumberjacksong.txt</file>
</qresource> </qresource>
</RCC> </RCC>

49
data/lumberjacksong.txt Normal file
View File

@ -0,0 +1,49 @@
Leaping from tree to tree! As they float down the mighty rivers
of British Columbia! With my best girl by my side!
The Larch!
The Pine!
The Giant Redwood tree!
The Sequoia!
The Little Whopping Rule Tree!
We'd sing! Sing! Sing!
Oh, I'm a lumberjack, and I'm okay,
I sleep all night and I work all day.
CHORUS: He's a lumberjack, and he's okay,
He sleeps all night and he works all day.
I cut down trees, I eat my lunch,
I go to the lavatree.
On Wednesdays I go shoppin'
And have buttered scones for tea.
Mounties: He cuts down trees, he eats his lunch,
He goes to the lavatree.
On Wednesdays he goes shoppin'
And has buttered scones for tea.
CHORUS
I cut down trees, I skip and jump,
I like to press wild flowers.
I put on women's clothing,
And hang around in bars.
Mounties: He cuts down trees, he skips and jumps,
He likes to press wild flowers.
He puts on women's clothing
And hangs around.... In bars???????
CHORUS
I chop down trees, I wear high heels,
Suspenders and a bra.
I wish I'd been a girlie
Just like my dear papa.
Mounties: He cuts down trees, he wears high heels
Suspenders and a .... a Bra????
(mounties break off song, and begin insulting lumberjack)
Girl: I thought you were so rugged!

View File

@ -193,3 +193,13 @@ void SongInfoBase::SectionToggled(bool value) {
s.beginGroup(kSettingsGroup); s.beginGroup(kSettingsGroup);
s.setValue(pane->data().id_, value); s.setValue(pane->data().id_, value);
} }
void SongInfoBase::ReloadSettings() {
foreach (CollapsibleInfoPane* pane, sections_) {
QWidget* contents = pane->data().contents_;
if (!contents)
continue;
QMetaObject::invokeMethod(contents, "ReloadSettings");
}
}

View File

@ -42,7 +42,7 @@ public:
public slots: public slots:
void SongChanged(const Song& metadata); void SongChanged(const Song& metadata);
void SongFinished(); void SongFinished();
virtual void ReloadSettings() {} virtual void ReloadSettings();
protected: protected:
void showEvent(QShowEvent* e); void showEvent(QShowEvent* e);

View File

@ -130,6 +130,8 @@ void SongInfoView::ReloadSettings() {
provider->set_enabled(false); provider->set_enabled(false);
} }
} }
SongInfoBase::ReloadSettings();
} }
SongInfoProvider* SongInfoView::ProviderByName(const QString& name) const { SongInfoProvider* SongInfoView::ProviderByName(const QString& name) const {

View File

@ -20,6 +20,9 @@ msgstr ""
msgid " ms" msgid " ms"
msgstr "" msgstr ""
msgid " pt"
msgstr ""
msgid " seconds" msgid " seconds"
msgstr "" msgstr ""
@ -256,6 +259,9 @@ msgstr ""
msgid "And:" msgid "And:"
msgstr "" msgstr ""
msgid "Appearance"
msgstr ""
msgid "Append files/URLs to the playlist" msgid "Append files/URLs to the playlist"
msgstr "" msgstr ""
@ -836,6 +842,9 @@ msgstr "المستوى الأول"
msgid "Flac" msgid "Flac"
msgstr "" msgstr ""
msgid "Font size"
msgstr ""
msgid "Forget device" msgid "Forget device"
msgstr "" msgstr ""

View File

@ -21,6 +21,9 @@ msgstr ""
msgid " ms" msgid " ms"
msgstr "" msgstr ""
msgid " pt"
msgstr ""
msgid " seconds" msgid " seconds"
msgstr "" msgstr ""
@ -257,6 +260,9 @@ msgstr ""
msgid "And:" msgid "And:"
msgstr "" msgstr ""
msgid "Appearance"
msgstr ""
msgid "Append files/URLs to the playlist" msgid "Append files/URLs to the playlist"
msgstr "" msgstr ""
@ -837,6 +843,9 @@ msgstr ""
msgid "Flac" msgid "Flac"
msgstr "" msgstr ""
msgid "Font size"
msgstr ""
msgid "Forget device" msgid "Forget device"
msgstr "" msgstr ""

View File

@ -21,6 +21,9 @@ msgstr ""
msgid " ms" msgid " ms"
msgstr " ms" msgstr " ms"
msgid " pt"
msgstr ""
msgid " seconds" msgid " seconds"
msgstr " segons" msgstr " segons"
@ -265,6 +268,9 @@ msgstr "Un error desconegut de last.fm ha ocorregut: %1"
msgid "And:" msgid "And:"
msgstr "I:" msgstr "I:"
msgid "Appearance"
msgstr ""
msgid "Append files/URLs to the playlist" msgid "Append files/URLs to the playlist"
msgstr "Afegir fitxers/URLs a la llista de reproducció" msgstr "Afegir fitxers/URLs a la llista de reproducció"
@ -857,6 +863,9 @@ msgstr "Primer nivell"
msgid "Flac" msgid "Flac"
msgstr "FLAC" msgstr "FLAC"
msgid "Font size"
msgstr ""
msgid "Forget device" msgid "Forget device"
msgstr "Oblidar dispositiu" msgstr "Oblidar dispositiu"

View File

@ -22,6 +22,9 @@ msgstr ""
msgid " ms" msgid " ms"
msgstr " ms" msgstr " ms"
msgid " pt"
msgstr ""
msgid " seconds" msgid " seconds"
msgstr " sekund" msgstr " sekund"
@ -258,6 +261,9 @@ msgstr ""
msgid "And:" msgid "And:"
msgstr "" msgstr ""
msgid "Appearance"
msgstr ""
msgid "Append files/URLs to the playlist" msgid "Append files/URLs to the playlist"
msgstr "" msgstr ""
@ -840,6 +846,9 @@ msgstr "První úroveň"
msgid "Flac" msgid "Flac"
msgstr "Flac" msgstr "Flac"
msgid "Font size"
msgstr ""
msgid "Forget device" msgid "Forget device"
msgstr "" msgstr ""

View File

@ -22,6 +22,9 @@ msgstr ""
msgid " ms" msgid " ms"
msgstr " ms" msgstr " ms"
msgid " pt"
msgstr ""
msgid " seconds" msgid " seconds"
msgstr " sekunder" msgstr " sekunder"
@ -258,6 +261,9 @@ msgstr "Der er sket en ukendt last.fm fejl: %1"
msgid "And:" msgid "And:"
msgstr "Og:" msgstr "Og:"
msgid "Appearance"
msgstr ""
msgid "Append files/URLs to the playlist" msgid "Append files/URLs to the playlist"
msgstr "Tilføj filer/URL'er til spillelisten" msgstr "Tilføj filer/URL'er til spillelisten"
@ -840,6 +846,9 @@ msgstr "Første niveau"
msgid "Flac" msgid "Flac"
msgstr "" msgstr ""
msgid "Font size"
msgstr ""
msgid "Forget device" msgid "Forget device"
msgstr "" msgstr ""

View File

@ -22,6 +22,9 @@ msgstr ""
msgid " ms" msgid " ms"
msgstr " ms" msgstr " ms"
msgid " pt"
msgstr ""
msgid " seconds" msgid " seconds"
msgstr " Sekunden" msgstr " Sekunden"
@ -264,6 +267,9 @@ msgstr "Unbekannter Last.fm Fehler: %1"
msgid "And:" msgid "And:"
msgstr "Und:" msgstr "Und:"
msgid "Appearance"
msgstr ""
msgid "Append files/URLs to the playlist" msgid "Append files/URLs to the playlist"
msgstr "Dateien/URLs an die Wiedergabeliste anhängen" msgstr "Dateien/URLs an die Wiedergabeliste anhängen"
@ -856,6 +862,9 @@ msgstr "Erste Stufe"
msgid "Flac" msgid "Flac"
msgstr "FLAC" msgstr "FLAC"
msgid "Font size"
msgstr ""
msgid "Forget device" msgid "Forget device"
msgstr "Gerät vergessen" msgstr "Gerät vergessen"

View File

@ -23,6 +23,9 @@ msgstr ""
msgid " ms" msgid " ms"
msgstr " ms" msgstr " ms"
msgid " pt"
msgstr ""
msgid " seconds" msgid " seconds"
msgstr " δευτερόλεπτα" msgstr " δευτερόλεπτα"
@ -265,6 +268,9 @@ msgstr "Προέκυψε ένα άγνωστο σφάλμα στο last.fm: %1"
msgid "And:" msgid "And:"
msgstr "Και:" msgstr "Και:"
msgid "Appearance"
msgstr ""
msgid "Append files/URLs to the playlist" msgid "Append files/URLs to the playlist"
msgstr "Προσάρτηση αρχείων/URLs στην λίστα αναπαραγωγής" msgstr "Προσάρτηση αρχείων/URLs στην λίστα αναπαραγωγής"
@ -861,6 +867,9 @@ msgstr "Πρώτο επίπεδο"
msgid "Flac" msgid "Flac"
msgstr "Flac" msgstr "Flac"
msgid "Font size"
msgstr ""
msgid "Forget device" msgid "Forget device"
msgstr "«Ξέχνα» την συσκευή" msgstr "«Ξέχνα» την συσκευή"

View File

@ -20,6 +20,9 @@ msgstr ""
msgid " ms" msgid " ms"
msgstr " ms" msgstr " ms"
msgid " pt"
msgstr ""
msgid " seconds" msgid " seconds"
msgstr " seconds" msgstr " seconds"
@ -256,6 +259,9 @@ msgstr "An unknown Last.fm error occurred: %1"
msgid "And:" msgid "And:"
msgstr "" msgstr ""
msgid "Appearance"
msgstr ""
msgid "Append files/URLs to the playlist" msgid "Append files/URLs to the playlist"
msgstr "Append files/URLs to the playlist" msgstr "Append files/URLs to the playlist"
@ -839,6 +845,9 @@ msgstr "First level"
msgid "Flac" msgid "Flac"
msgstr "" msgstr ""
msgid "Font size"
msgstr ""
msgid "Forget device" msgid "Forget device"
msgstr "" msgstr ""

View File

@ -20,6 +20,9 @@ msgstr ""
msgid " ms" msgid " ms"
msgstr " ms" msgstr " ms"
msgid " pt"
msgstr ""
msgid " seconds" msgid " seconds"
msgstr " seconds" msgstr " seconds"
@ -256,6 +259,9 @@ msgstr ""
msgid "And:" msgid "And:"
msgstr "" msgstr ""
msgid "Appearance"
msgstr ""
msgid "Append files/URLs to the playlist" msgid "Append files/URLs to the playlist"
msgstr "Append files/URLs to the playlist" msgstr "Append files/URLs to the playlist"
@ -837,6 +843,9 @@ msgstr "First level"
msgid "Flac" msgid "Flac"
msgstr "" msgstr ""
msgid "Font size"
msgstr ""
msgid "Forget device" msgid "Forget device"
msgstr "" msgstr ""

View File

@ -22,6 +22,9 @@ msgstr ""
msgid " ms" msgid " ms"
msgstr " ms" msgstr " ms"
msgid " pt"
msgstr ""
msgid " seconds" msgid " seconds"
msgstr " segundos" msgstr " segundos"
@ -265,6 +268,9 @@ msgstr "Un error desconocido de last.fm ha ocurrido: %1"
msgid "And:" msgid "And:"
msgstr "Y:" msgstr "Y:"
msgid "Appearance"
msgstr ""
msgid "Append files/URLs to the playlist" msgid "Append files/URLs to the playlist"
msgstr "Agregar archivos/URLs a la lista de reproducción" msgstr "Agregar archivos/URLs a la lista de reproducción"
@ -859,6 +865,9 @@ msgstr "Primer nivel"
msgid "Flac" msgid "Flac"
msgstr "Flac" msgstr "Flac"
msgid "Font size"
msgstr ""
msgid "Forget device" msgid "Forget device"
msgstr "Olvidar dispositivo" msgstr "Olvidar dispositivo"

View File

@ -21,6 +21,9 @@ msgstr ""
msgid " ms" msgid " ms"
msgstr " ms" msgstr " ms"
msgid " pt"
msgstr ""
msgid " seconds" msgid " seconds"
msgstr " sekuntia" msgstr " sekuntia"
@ -257,6 +260,9 @@ msgstr "Tuntematon last.fm-virhe: %1"
msgid "And:" msgid "And:"
msgstr "" msgstr ""
msgid "Appearance"
msgstr ""
msgid "Append files/URLs to the playlist" msgid "Append files/URLs to the playlist"
msgstr "" msgstr ""
@ -837,6 +843,9 @@ msgstr ""
msgid "Flac" msgid "Flac"
msgstr "" msgstr ""
msgid "Font size"
msgstr ""
msgid "Forget device" msgid "Forget device"
msgstr "" msgstr ""

View File

@ -22,6 +22,9 @@ msgstr ""
msgid " ms" msgid " ms"
msgstr " ms" msgstr " ms"
msgid " pt"
msgstr ""
msgid " seconds" msgid " seconds"
msgstr " secondes" msgstr " secondes"
@ -268,6 +271,9 @@ msgstr "Une erreur inconnue de last.fm est survenue : %1"
msgid "And:" msgid "And:"
msgstr "Et :" msgstr "Et :"
msgid "Appearance"
msgstr ""
msgid "Append files/URLs to the playlist" msgid "Append files/URLs to the playlist"
msgstr "Ajouter des fichiers/URLs à la liste de lecture" msgstr "Ajouter des fichiers/URLs à la liste de lecture"
@ -863,6 +869,9 @@ msgstr "Premier niveau"
msgid "Flac" msgid "Flac"
msgstr "Flac" msgstr "Flac"
msgid "Font size"
msgstr ""
msgid "Forget device" msgid "Forget device"
msgstr "Oublier ce périphérique" msgstr "Oublier ce périphérique"

View File

@ -21,6 +21,9 @@ msgstr ""
msgid " ms" msgid " ms"
msgstr " ms" msgstr " ms"
msgid " pt"
msgstr ""
msgid " seconds" msgid " seconds"
msgstr " segundos" msgstr " segundos"
@ -257,6 +260,9 @@ msgstr "Un erro descoñecido de last.fm aconteceu: %1"
msgid "And:" msgid "And:"
msgstr "E:" msgstr "E:"
msgid "Appearance"
msgstr ""
msgid "Append files/URLs to the playlist" msgid "Append files/URLs to the playlist"
msgstr "Agregar arquivos/URLs á lista de reproducción" msgstr "Agregar arquivos/URLs á lista de reproducción"
@ -841,6 +847,9 @@ msgstr ""
msgid "Flac" msgid "Flac"
msgstr "" msgstr ""
msgid "Font size"
msgstr ""
msgid "Forget device" msgid "Forget device"
msgstr "" msgstr ""

View File

@ -21,6 +21,9 @@ msgstr ""
msgid " ms" msgid " ms"
msgstr " ms" msgstr " ms"
msgid " pt"
msgstr ""
msgid " seconds" msgid " seconds"
msgstr " másodperc" msgstr " másodperc"
@ -262,6 +265,9 @@ msgstr "Ismeretlen Last.fm hiba történt: %1"
msgid "And:" msgid "And:"
msgstr "És:" msgstr "És:"
msgid "Appearance"
msgstr ""
msgid "Append files/URLs to the playlist" msgid "Append files/URLs to the playlist"
msgstr "Fájlok/URL-ek hozzáadása a lejátszási listához" msgstr "Fájlok/URL-ek hozzáadása a lejátszási listához"
@ -856,6 +862,9 @@ msgstr "Első szinten"
msgid "Flac" msgid "Flac"
msgstr "FLAC" msgstr "FLAC"
msgid "Font size"
msgstr ""
msgid "Forget device" msgid "Forget device"
msgstr "Eszköz elfelejtése" msgstr "Eszköz elfelejtése"

View File

@ -22,6 +22,9 @@ msgstr ""
msgid " ms" msgid " ms"
msgstr " ms" msgstr " ms"
msgid " pt"
msgstr ""
msgid " seconds" msgid " seconds"
msgstr " secondi" msgstr " secondi"
@ -269,6 +272,9 @@ msgstr "Si è verificato un errore di last.fm: %1"
msgid "And:" msgid "And:"
msgstr "E:" msgstr "E:"
msgid "Appearance"
msgstr ""
msgid "Append files/URLs to the playlist" msgid "Append files/URLs to the playlist"
msgstr "Aggiungi file/URL alla scaletta" msgstr "Aggiungi file/URL alla scaletta"
@ -861,6 +867,9 @@ msgstr "Primo livello"
msgid "Flac" msgid "Flac"
msgstr "Flac" msgstr "Flac"
msgid "Font size"
msgstr ""
msgid "Forget device" msgid "Forget device"
msgstr "Elimina dispositivo" msgstr "Elimina dispositivo"

View File

@ -20,6 +20,9 @@ msgstr ""
msgid " ms" msgid " ms"
msgstr "" msgstr ""
msgid " pt"
msgstr ""
msgid " seconds" msgid " seconds"
msgstr "" msgstr ""
@ -256,6 +259,9 @@ msgstr ""
msgid "And:" msgid "And:"
msgstr "" msgstr ""
msgid "Appearance"
msgstr ""
msgid "Append files/URLs to the playlist" msgid "Append files/URLs to the playlist"
msgstr "" msgstr ""
@ -836,6 +842,9 @@ msgstr ""
msgid "Flac" msgid "Flac"
msgstr "" msgstr ""
msgid "Font size"
msgstr ""
msgid "Forget device" msgid "Forget device"
msgstr "" msgstr ""

View File

@ -21,6 +21,9 @@ msgstr ""
msgid " ms" msgid " ms"
msgstr " ms" msgstr " ms"
msgid " pt"
msgstr ""
msgid " seconds" msgid " seconds"
msgstr " sekundžių" msgstr " sekundžių"
@ -257,6 +260,9 @@ msgstr ""
msgid "And:" msgid "And:"
msgstr "" msgstr ""
msgid "Appearance"
msgstr ""
msgid "Append files/URLs to the playlist" msgid "Append files/URLs to the playlist"
msgstr "" msgstr ""
@ -837,6 +843,9 @@ msgstr ""
msgid "Flac" msgid "Flac"
msgstr "" msgstr ""
msgid "Font size"
msgstr ""
msgid "Forget device" msgid "Forget device"
msgstr "" msgstr ""

View File

@ -21,6 +21,9 @@ msgstr ""
msgid " ms" msgid " ms"
msgstr " ms" msgstr " ms"
msgid " pt"
msgstr ""
msgid " seconds" msgid " seconds"
msgstr " sekunder" msgstr " sekunder"
@ -257,6 +260,9 @@ msgstr ""
msgid "And:" msgid "And:"
msgstr "" msgstr ""
msgid "Appearance"
msgstr ""
msgid "Append files/URLs to the playlist" msgid "Append files/URLs to the playlist"
msgstr "" msgstr ""
@ -838,6 +844,9 @@ msgstr "Første nivå"
msgid "Flac" msgid "Flac"
msgstr "" msgstr ""
msgid "Font size"
msgstr ""
msgid "Forget device" msgid "Forget device"
msgstr "" msgstr ""

View File

@ -21,6 +21,9 @@ msgstr ""
msgid " ms" msgid " ms"
msgstr " ms" msgstr " ms"
msgid " pt"
msgstr ""
msgid " seconds" msgid " seconds"
msgstr " seconden" msgstr " seconden"
@ -265,6 +268,9 @@ msgstr "Er is een onbekende last.fm fout opgetreden: %1"
msgid "And:" msgid "And:"
msgstr "En:" msgstr "En:"
msgid "Appearance"
msgstr ""
msgid "Append files/URLs to the playlist" msgid "Append files/URLs to the playlist"
msgstr "Bestanden/URLs aan afspeellijst toevoegen" msgstr "Bestanden/URLs aan afspeellijst toevoegen"
@ -857,6 +863,9 @@ msgstr "Eerste niveau"
msgid "Flac" msgid "Flac"
msgstr "Flac" msgstr "Flac"
msgid "Font size"
msgstr ""
msgid "Forget device" msgid "Forget device"
msgstr "Apparaat vergeten" msgstr "Apparaat vergeten"

View File

@ -20,6 +20,9 @@ msgstr ""
msgid " ms" msgid " ms"
msgstr " mseg" msgstr " mseg"
msgid " pt"
msgstr ""
msgid " seconds" msgid " seconds"
msgstr " segondas" msgstr " segondas"
@ -256,6 +259,9 @@ msgstr ""
msgid "And:" msgid "And:"
msgstr "" msgstr ""
msgid "Appearance"
msgstr ""
msgid "Append files/URLs to the playlist" msgid "Append files/URLs to the playlist"
msgstr "" msgstr ""
@ -836,6 +842,9 @@ msgstr "Primièr nivèl"
msgid "Flac" msgid "Flac"
msgstr "" msgstr ""
msgid "Font size"
msgstr ""
msgid "Forget device" msgid "Forget device"
msgstr "" msgstr ""

View File

@ -22,6 +22,9 @@ msgstr ""
msgid " ms" msgid " ms"
msgstr " ms" msgstr " ms"
msgid " pt"
msgstr ""
msgid " seconds" msgid " seconds"
msgstr " sekundy" msgstr " sekundy"
@ -265,6 +268,9 @@ msgstr "Wystąpił nieznany błąd last.fm: %1"
msgid "And:" msgid "And:"
msgstr "I:" msgstr "I:"
msgid "Appearance"
msgstr ""
msgid "Append files/URLs to the playlist" msgid "Append files/URLs to the playlist"
msgstr "Dodaj pliki/adresy URL do listy odtwarzania" msgstr "Dodaj pliki/adresy URL do listy odtwarzania"
@ -856,6 +862,9 @@ msgstr "Pierwszy poziom"
msgid "Flac" msgid "Flac"
msgstr "Flac" msgstr "Flac"
msgid "Font size"
msgstr ""
msgid "Forget device" msgid "Forget device"
msgstr "Zapomnij o urządzeniu" msgstr "Zapomnij o urządzeniu"

View File

@ -23,6 +23,9 @@ msgstr ""
msgid " ms" msgid " ms"
msgstr " ms" msgstr " ms"
msgid " pt"
msgstr ""
msgid " seconds" msgid " seconds"
msgstr " segundos" msgstr " segundos"
@ -264,6 +267,9 @@ msgstr "Ocorreu um erro last.fm desconhecido: %1"
msgid "And:" msgid "And:"
msgstr "E:" msgstr "E:"
msgid "Appearance"
msgstr ""
msgid "Append files/URLs to the playlist" msgid "Append files/URLs to the playlist"
msgstr "Colocar os ficheiros/URLs na lista de reprodução" msgstr "Colocar os ficheiros/URLs na lista de reprodução"
@ -857,6 +863,9 @@ msgstr "Primeiro nível"
msgid "Flac" msgid "Flac"
msgstr "Flac" msgstr "Flac"
msgid "Font size"
msgstr ""
msgid "Forget device" msgid "Forget device"
msgstr "Ignorar dispositivo" msgstr "Ignorar dispositivo"

View File

@ -21,6 +21,9 @@ msgstr ""
msgid " ms" msgid " ms"
msgstr " ms" msgstr " ms"
msgid " pt"
msgstr ""
msgid " seconds" msgid " seconds"
msgstr " segundos" msgstr " segundos"
@ -262,6 +265,9 @@ msgstr "Ocorreu um erro desconhecido no Last.fm %1"
msgid "And:" msgid "And:"
msgstr "E:" msgstr "E:"
msgid "Appearance"
msgstr ""
msgid "Append files/URLs to the playlist" msgid "Append files/URLs to the playlist"
msgstr "Acrescentar arquivos/sites para a lista de reprodução" msgstr "Acrescentar arquivos/sites para a lista de reprodução"
@ -850,6 +856,9 @@ msgstr "Primeiro nível"
msgid "Flac" msgid "Flac"
msgstr "" msgstr ""
msgid "Font size"
msgstr ""
msgid "Forget device" msgid "Forget device"
msgstr "" msgstr ""

View File

@ -20,6 +20,9 @@ msgstr ""
msgid " ms" msgid " ms"
msgstr " ms" msgstr " ms"
msgid " pt"
msgstr ""
msgid " seconds" msgid " seconds"
msgstr " secunde" msgstr " secunde"
@ -256,6 +259,9 @@ msgstr ""
msgid "And:" msgid "And:"
msgstr "" msgstr ""
msgid "Appearance"
msgstr ""
msgid "Append files/URLs to the playlist" msgid "Append files/URLs to the playlist"
msgstr "" msgstr ""
@ -836,6 +842,9 @@ msgstr "Primul nivel"
msgid "Flac" msgid "Flac"
msgstr "" msgstr ""
msgid "Font size"
msgstr ""
msgid "Forget device" msgid "Forget device"
msgstr "" msgstr ""

View File

@ -20,6 +20,9 @@ msgstr ""
msgid " ms" msgid " ms"
msgstr " мс" msgstr " мс"
msgid " pt"
msgstr ""
msgid " seconds" msgid " seconds"
msgstr " секунд" msgstr " секунд"
@ -260,6 +263,9 @@ msgstr "Неизвестная ошибка last.fm: %1"
msgid "And:" msgid "And:"
msgstr "И:" msgstr "И:"
msgid "Appearance"
msgstr ""
msgid "Append files/URLs to the playlist" msgid "Append files/URLs to the playlist"
msgstr "Добавить файлы/URLs в список воспроизведения" msgstr "Добавить файлы/URLs в список воспроизведения"
@ -850,6 +856,9 @@ msgstr "Первый уровень"
msgid "Flac" msgid "Flac"
msgstr "FLAC" msgstr "FLAC"
msgid "Font size"
msgstr ""
msgid "Forget device" msgid "Forget device"
msgstr "\"Забыть\" устройство" msgstr "\"Забыть\" устройство"

View File

@ -22,6 +22,9 @@ msgstr ""
msgid " ms" msgid " ms"
msgstr " ms" msgstr " ms"
msgid " pt"
msgstr ""
msgid " seconds" msgid " seconds"
msgstr " sekundy" msgstr " sekundy"
@ -262,6 +265,9 @@ msgstr "Vyskytla sa neznáma last.fm chyba: %1"
msgid "And:" msgid "And:"
msgstr "A:" msgstr "A:"
msgid "Appearance"
msgstr ""
msgid "Append files/URLs to the playlist" msgid "Append files/URLs to the playlist"
msgstr "Pridať súbory/URLy do playlistu" msgstr "Pridať súbory/URLy do playlistu"
@ -854,6 +860,9 @@ msgstr "Prvá úroveň"
msgid "Flac" msgid "Flac"
msgstr "Flac" msgstr "Flac"
msgid "Font size"
msgstr ""
msgid "Forget device" msgid "Forget device"
msgstr "Zabudnúť na zariadenie" msgstr "Zabudnúť na zariadenie"

View File

@ -21,6 +21,9 @@ msgstr ""
msgid " ms" msgid " ms"
msgstr " ms" msgstr " ms"
msgid " pt"
msgstr ""
msgid " seconds" msgid " seconds"
msgstr " sekund" msgstr " sekund"
@ -261,6 +264,9 @@ msgstr "Zgodila se je neznana napaka last.fm: %1"
msgid "And:" msgid "And:"
msgstr "In:" msgstr "In:"
msgid "Appearance"
msgstr ""
msgid "Append files/URLs to the playlist" msgid "Append files/URLs to the playlist"
msgstr "Pripni datoteke/povezave seznamu predvajanja" msgstr "Pripni datoteke/povezave seznamu predvajanja"
@ -853,6 +859,9 @@ msgstr "Prva raven"
msgid "Flac" msgid "Flac"
msgstr "FLAC" msgstr "FLAC"
msgid "Font size"
msgstr ""
msgid "Forget device" msgid "Forget device"
msgstr "Pozabi napravo" msgstr "Pozabi napravo"

View File

@ -21,6 +21,9 @@ msgstr ""
msgid " ms" msgid " ms"
msgstr " ms" msgstr " ms"
msgid " pt"
msgstr ""
msgid " seconds" msgid " seconds"
msgstr " секунди" msgstr " секунди"
@ -257,6 +260,9 @@ msgstr "Непозната ЛастФМ грешка: %1"
msgid "And:" msgid "And:"
msgstr "И:" msgstr "И:"
msgid "Appearance"
msgstr ""
msgid "Append files/URLs to the playlist" msgid "Append files/URLs to the playlist"
msgstr "Додај нумере/УРЛ токове у листу нумера" msgstr "Додај нумере/УРЛ токове у листу нумера"
@ -840,6 +846,9 @@ msgstr "Први ниво"
msgid "Flac" msgid "Flac"
msgstr "" msgstr ""
msgid "Font size"
msgstr ""
msgid "Forget device" msgid "Forget device"
msgstr "Заборави уређај" msgstr "Заборави уређај"

View File

@ -21,6 +21,9 @@ msgstr ""
msgid " ms" msgid " ms"
msgstr " ms" msgstr " ms"
msgid " pt"
msgstr ""
msgid " seconds" msgid " seconds"
msgstr " sekunder" msgstr " sekunder"
@ -257,6 +260,9 @@ msgstr "Ett okänt last.fm fel inträffade: %1"
msgid "And:" msgid "And:"
msgstr "Och:" msgstr "Och:"
msgid "Appearance"
msgstr ""
msgid "Append files/URLs to the playlist" msgid "Append files/URLs to the playlist"
msgstr "Lägg till filer/webbadresser till spellistan" msgstr "Lägg till filer/webbadresser till spellistan"
@ -843,6 +849,9 @@ msgstr "Första nivån"
msgid "Flac" msgid "Flac"
msgstr "" msgstr ""
msgid "Font size"
msgstr ""
msgid "Forget device" msgid "Forget device"
msgstr "Glöm enhet" msgstr "Glöm enhet"

View File

@ -21,6 +21,9 @@ msgstr ""
msgid " ms" msgid " ms"
msgstr " ms" msgstr " ms"
msgid " pt"
msgstr ""
msgid " seconds" msgid " seconds"
msgstr " saniye" msgstr " saniye"
@ -261,6 +264,9 @@ msgstr "Bilinmeyen bir last.fm hatası oluştu: %1"
msgid "And:" msgid "And:"
msgstr "Ve:" msgstr "Ve:"
msgid "Appearance"
msgstr ""
msgid "Append files/URLs to the playlist" msgid "Append files/URLs to the playlist"
msgstr "Çalma listesine dosya/URL ekle" msgstr "Çalma listesine dosya/URL ekle"
@ -853,6 +859,9 @@ msgstr "İlk Seviye"
msgid "Flac" msgid "Flac"
msgstr "Flac" msgstr "Flac"
msgid "Font size"
msgstr ""
msgid "Forget device" msgid "Forget device"
msgstr "Aygıtı unut" msgstr "Aygıtı unut"

View File

@ -11,6 +11,9 @@ msgstr ""
msgid " ms" msgid " ms"
msgstr "" msgstr ""
msgid " pt"
msgstr ""
msgid " seconds" msgid " seconds"
msgstr "" msgstr ""
@ -247,6 +250,9 @@ msgstr ""
msgid "And:" msgid "And:"
msgstr "" msgstr ""
msgid "Appearance"
msgstr ""
msgid "Append files/URLs to the playlist" msgid "Append files/URLs to the playlist"
msgstr "" msgstr ""
@ -827,6 +833,9 @@ msgstr ""
msgid "Flac" msgid "Flac"
msgstr "" msgstr ""
msgid "Font size"
msgstr ""
msgid "Forget device" msgid "Forget device"
msgstr "" msgstr ""

View File

@ -21,6 +21,9 @@ msgstr ""
msgid " ms" msgid " ms"
msgstr " мс" msgstr " мс"
msgid " pt"
msgstr ""
msgid " seconds" msgid " seconds"
msgstr " секунд" msgstr " секунд"
@ -261,6 +264,9 @@ msgstr "Виникла невідома помилка last.fm: %1"
msgid "And:" msgid "And:"
msgstr "Та:" msgstr "Та:"
msgid "Appearance"
msgstr ""
msgid "Append files/URLs to the playlist" msgid "Append files/URLs to the playlist"
msgstr "Додати файли/адреси до списку відтворення" msgstr "Додати файли/адреси до списку відтворення"
@ -852,6 +858,9 @@ msgstr "Перший рівень"
msgid "Flac" msgid "Flac"
msgstr "Flac" msgstr "Flac"
msgid "Font size"
msgstr ""
msgid "Forget device" msgid "Forget device"
msgstr "Забути пристрій" msgstr "Забути пристрій"

View File

@ -20,6 +20,9 @@ msgstr ""
msgid " ms" msgid " ms"
msgstr "" msgstr ""
msgid " pt"
msgstr ""
msgid " seconds" msgid " seconds"
msgstr "" msgstr ""
@ -256,6 +259,9 @@ msgstr ""
msgid "And:" msgid "And:"
msgstr "" msgstr ""
msgid "Appearance"
msgstr ""
msgid "Append files/URLs to the playlist" msgid "Append files/URLs to the playlist"
msgstr "添加文件/URL 到播放列表" msgstr "添加文件/URL 到播放列表"
@ -836,6 +842,9 @@ msgstr ""
msgid "Flac" msgid "Flac"
msgstr "" msgstr ""
msgid "Font size"
msgstr ""
msgid "Forget device" msgid "Forget device"
msgstr "" msgstr ""

View File

@ -21,6 +21,9 @@ msgstr ""
msgid " ms" msgid " ms"
msgstr " 毫秒" msgstr " 毫秒"
msgid " pt"
msgstr ""
msgid " seconds" msgid " seconds"
msgstr " 秒" msgstr " 秒"
@ -261,6 +264,9 @@ msgstr "一個未知的last.fm錯誤出現: %1"
msgid "And:" msgid "And:"
msgstr "" msgstr ""
msgid "Appearance"
msgstr ""
msgid "Append files/URLs to the playlist" msgid "Append files/URLs to the playlist"
msgstr "附加檔案或URL到播放清單" msgstr "附加檔案或URL到播放清單"
@ -841,6 +847,9 @@ msgstr "第一層次"
msgid "Flac" msgid "Flac"
msgstr "" msgstr ""
msgid "Font size"
msgstr ""
msgid "Forget device" msgid "Forget device"
msgstr "" msgstr ""

View File

@ -21,6 +21,7 @@
#include "ui_settingsdialog.h" #include "ui_settingsdialog.h"
#include "engines/enginebase.h" #include "engines/enginebase.h"
#include "playlist/playlistview.h" #include "playlist/playlistview.h"
#include "widgets/autosizedtextedit.h"
#include "widgets/osd.h" #include "widgets/osd.h"
#include "widgets/osdpretty.h" #include "widgets/osdpretty.h"
@ -36,6 +37,7 @@
#include <QColorDialog> #include <QColorDialog>
#include <QDir> #include <QDir>
#include <QFontDialog>
#include <QSettings> #include <QSettings>
#include <QtDebug> #include <QtDebug>
@ -116,6 +118,13 @@ SettingsDialog::SettingsDialog(QWidget* parent)
qStableSort(names); qStableSort(names);
ui_->language->addItems(names); ui_->language->addItems(names);
// Song info
QFile song_info_preview(":/lumberjacksong.txt");
song_info_preview.open(QIODevice::ReadOnly);
ui_->song_info_font_preview->setText(QString::fromUtf8(song_info_preview.readAll()));
connect(ui_->song_info_font_size, SIGNAL(valueChanged(double)), SLOT(SongInfoFontSizeChanged(double)));
// Global shortcuts // Global shortcuts
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
if (QSysInfo::MacintoshVersion != QSysInfo::MV_SNOWLEOPARD) { if (QSysInfo::MacintoshVersion != QSysInfo::MV_SNOWLEOPARD) {
@ -233,7 +242,11 @@ void SettingsDialog::accept() {
s.endGroup(); s.endGroup();
#endif #endif
// Lyrics // Song info
s.beginGroup(AutoSizedTextEdit::kSettingsGroup);
s.setValue("font_size", ui_->song_info_font_preview->font().pointSizeF());
s.endGroup();
ui_->lyric_settings->Save(); ui_->lyric_settings->Save();
// Wii remotes // Wii remotes
@ -323,7 +336,12 @@ void SettingsDialog::showEvent(QShowEvent*) {
ui_->language->setCurrentIndex(ui_->language->findText(name)); ui_->language->setCurrentIndex(ui_->language->findText(name));
s.endGroup(); s.endGroup();
// Lyrics // Song Info
s.beginGroup(AutoSizedTextEdit::kSettingsGroup);
ui_->song_info_font_size->setValue(
s.value("font_size", AutoSizedTextEdit::kDefaultFontSize).toReal());
s.endGroup();
ui_->lyric_settings->Load(); ui_->lyric_settings->Load();
// Last.fm // Last.fm
@ -515,3 +533,10 @@ void SettingsDialog::OpenAtPage(Page page) {
void SettingsDialog::SetSongInfoView(SongInfoView* view) { void SettingsDialog::SetSongInfoView(SongInfoView* view) {
ui_->lyric_settings->SetSongInfoView(view); ui_->lyric_settings->SetSongInfoView(view);
} }
void SettingsDialog::SongInfoFontSizeChanged(qreal value) {
QFont font;
font.setPointSizeF(value);
ui_->song_info_font_preview->setFont(font);
}

View File

@ -85,6 +85,8 @@ class SettingsDialog : public QDialog {
void FadingOptionsChanged(); void FadingOptionsChanged();
void RgPreampChanged(int value); void RgPreampChanged(int value);
void SongInfoFontSizeChanged(double value);
private: private:
#ifdef ENABLE_WIIMOTEDEV #ifdef ENABLE_WIIMOTEDEV
WiimotedevShortcutsConfig* wiimotedev_config_; WiimotedevShortcutsConfig* wiimotedev_config_;

View File

@ -119,7 +119,7 @@
<item> <item>
<widget class="QStackedWidget" name="stacked_widget"> <widget class="QStackedWidget" name="stacked_widget">
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>2</number>
</property> </property>
<widget class="QWidget" name="playback_page"> <widget class="QWidget" name="playback_page">
<layout class="QVBoxLayout" name="verticalLayout_10"> <layout class="QVBoxLayout" name="verticalLayout_10">
@ -361,7 +361,7 @@
<item row="2" column="1"> <item row="2" column="1">
<widget class="QSpinBox" name="buffer_duration"> <widget class="QSpinBox" name="buffer_duration">
<property name="enabled"> <property name="enabled">
<bool>true</bool> <bool>false</bool>
</property> </property>
<property name="suffix"> <property name="suffix">
<string> ms</string> <string> ms</string>
@ -478,7 +478,68 @@
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="song_info_page"> <widget class="QWidget" name="song_info_page">
<layout class="QVBoxLayout" name="verticalLayout_16"> <layout class="QVBoxLayout" name="verticalLayout_14">
<item>
<widget class="QGroupBox" name="groupBox_5">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Appearance</string>
</property>
<layout class="QFormLayout" name="formLayout_5">
<item row="0" column="0">
<widget class="QLabel" name="label_11">
<property name="text">
<string>Font size</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="song_info_font_size">
<property name="suffix">
<string> pt</string>
</property>
<property name="decimals">
<number>1</number>
</property>
<property name="minimum">
<double>5.000000000000000</double>
</property>
<property name="maximum">
<double>50.000000000000000</double>
</property>
<property name="singleStep">
<double>0.500000000000000</double>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_12">
<property name="text">
<string>Preview</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QTextEdit" name="song_info_font_preview">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>100</height>
</size>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item> <item>
<widget class="QGroupBox" name="groupBox_6"> <widget class="QGroupBox" name="groupBox_6">
<property name="sizePolicy"> <property name="sizePolicy">

View File

@ -16,8 +16,13 @@
#include "autosizedtextedit.h" #include "autosizedtextedit.h"
#include <QApplication>
#include <QSettings>
#include <QWheelEvent> #include <QWheelEvent>
const qreal AutoSizedTextEdit::kDefaultFontSize = 8.5;
const char* AutoSizedTextEdit::kSettingsGroup = "SongInfo";
AutoSizedTextEdit::AutoSizedTextEdit(QWidget* parent) AutoSizedTextEdit::AutoSizedTextEdit(QWidget* parent)
: QTextBrowser(parent), : QTextBrowser(parent),
last_width_(-1) last_width_(-1)
@ -26,10 +31,17 @@ AutoSizedTextEdit::AutoSizedTextEdit(QWidget* parent)
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setOpenExternalLinks(true); setOpenExternalLinks(true);
ReloadSettings();
}
QFont f(font()); void AutoSizedTextEdit::ReloadSettings() {
f.setPointSizeF(8.5); QSettings s;
document()->setDefaultFont(f); s.beginGroup(kSettingsGroup);
qreal size = s.value("font_size", kDefaultFontSize).toReal();
QFont font;
font.setPointSizeF(size);
document()->setDefaultFont(font);
} }
void AutoSizedTextEdit::resizeEvent(QResizeEvent* e) { void AutoSizedTextEdit::resizeEvent(QResizeEvent* e) {

View File

@ -25,8 +25,14 @@ class AutoSizedTextEdit : public QTextBrowser {
public: public:
AutoSizedTextEdit(QWidget* parent = 0); AutoSizedTextEdit(QWidget* parent = 0);
static const qreal kDefaultFontSize;
static const char* kSettingsGroup;
QSize sizeHint() const; QSize sizeHint() const;
public slots:
void ReloadSettings();
protected: protected:
void resizeEvent(QResizeEvent* e); void resizeEvent(QResizeEvent* e);
void wheelEvent(QWheelEvent* e); void wheelEvent(QWheelEvent* e);