forked from len0rd/rockbox
Trim description text before displaying and display newlines as line breaks.
Trim themes titles before displaying in the list to remove stray whitespace. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20810 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
0d6a28edc3
commit
40137a9c07
1 changed files with 3 additions and 1 deletions
|
|
@ -129,7 +129,7 @@ void ThemesInstallWindow::downloadDone(bool error)
|
|||
}
|
||||
qDebug() << "adding theme:" << tl.at(i);
|
||||
QListWidgetItem *w = new QListWidgetItem;
|
||||
w->setData(Qt::DisplayRole, iniDetails.value("name").toString());
|
||||
w->setData(Qt::DisplayRole, iniDetails.value("name").toString().trimmed());
|
||||
w->setData(Qt::UserRole, tl.at(i));
|
||||
ui.listThemes->addItem(w);
|
||||
|
||||
|
|
@ -198,6 +198,8 @@ void ThemesInstallWindow::updateDetails(QListWidgetItem* cur, QListWidgetItem* p
|
|||
text += tr("<b>Description:</b> %1<hr/>").arg(iniDetails.value("about",
|
||||
tr("no description")).toString());
|
||||
|
||||
text.trimmed();
|
||||
text.replace("\n", "<br/>");
|
||||
ui.themeDescription->setHtml(text);
|
||||
iniDetails.endGroup();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue