1
0
Fork 0
forked from len0rd/rockbox

Better hilight detected item after autodetection.

To have a better indication what player has been detected and to keep this
information in view make the entry for the detected player bold. This also
(partly) addresses FS#10694.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29761 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dominik Riebeling 2011-04-22 17:39:05 +00:00
parent 4d25fb8fe1
commit afa6afc3bc

View file

@ -619,9 +619,15 @@ void Config::autodetect()
for(int j=0;j < itmList.at(i)->childCount();j++)
{
QString data = itmList.at(i)->child(j)->data(0, Qt::UserRole).toString();
// unset bold flag
QFont f = itmList.at(i)->child(j)->font(0);
f.setBold(false);
itmList.at(i)->child(j)->setFont(0, f);
if(devicename == data) // item found
{
f.setBold(true);
itmList.at(i)->child(j)->setFont(0, f);
itmList.at(i)->child(j)->setSelected(true); //select the item
itmList.at(i)->setExpanded(true); //expand the platform item
//ui.treeDevices->indexOfTopLevelItem(itmList.at(i)->child(j));