Changeset 922343c5


Ignore:
Timestamp:
05/06/14 14:05:46 (10 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, releng/10.0.2, releng/10.0.3, releng/10.1, releng/10.1.1
Children:
c9231c6, c4d8cfb
Parents:
086ab7b
Message:

Make sure to show the rating stars on the app summary widgets too.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/pc-softwaremanager/largeItemWidget.h

    r086ab7b r922343c5  
    6363      //Create the labels 
    6464      QString txt = "<b>"+app.name+"</b>"; 
    65       //if(!app.rating.isEmpty() ){ txt.append( "\t ("+app.rating+"/5)"); } 
     65      QLabel *rating = new QLabel(); 
     66      if(!app.rating.isEmpty() && app.rating!="0.00"){  
     67        rating->setPixmap( QPixmap(":icons/rating-"+QString::number( qRound(app.rating.toDouble()) )+".png").scaled(80,16,Qt::KeepAspectRatio,Qt::SmoothTransformation) );  
     68      } 
    6669      QLabel *appName = new QLabel(txt); 
    6770            appName->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); 
     
    9497      QHBoxLayout *hl = new QHBoxLayout; 
    9598            hl->addWidget(appName); 
     99            hl->addWidget(rating); 
    96100            hl->addWidget(recommend); 
    97101            hl->addWidget(type); 
Note: See TracChangeset for help on using the changeset viewer.