Changeset b0a3bc7 for src/mvc


Ignore:
Timestamp:
01/30/10 14:13:10 (12 years ago)
Author:
pavelpa <pavelpa@…>
Branches:
master, qt5
Children:
a190b81
Parents:
47bfffb
Message:

number of events/alarms/favs is bottom-aligned to the bottom of the icons

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mvc/delegate.cpp

    r47bfffb rb0a3bc7  
    219219        // draw icons
    220220        painter->setFont(fontSmall);
     221        QImage *image = mControls[FavouriteControlOn]->image();
    221222        QPoint drawPoint =
    222223            option.rect.topRight()
    223224            - QPoint(
    224                     spacer + mControls[FavouriteControlOn]->image()->width(),
    225                     - option.rect.height()/2 + mControls[FavouriteControlOn]->image()->height()/2);
    226         painter->drawImage(drawPoint,*mControls[FavouriteControlOn]->image());
    227         painter->drawText(drawPoint+QPoint(mControls[FavouriteControlOn]->image()->width()+2, option.rect.height()/2),
     225                    spacer + image->width(),
     226                    - option.rect.height()/2 + image->height()/2);
     227        painter->drawImage(drawPoint,*image);
     228        painter->drawText(drawPoint+QPoint(image->width()+2, image->height() - 2),
    228229                QString::number(numberOfFavourities(index)));
    229230#ifdef MAEMO
    230         drawPoint.setX(drawPoint.x() - spacer - mControls[FavouriteControlOn]->image()->width());
     231        drawPoint.setX(drawPoint.x() - spacer - image->width());
    231232        painter->drawImage(drawPoint,*mControls[AlarmControlOn]->image());
    232         painter->drawText(drawPoint+QPoint(mControls[FavouriteControlOn]->image()->width()+2, option.rect.height()/2),
     233        painter->drawText(drawPoint+QPoint(image->width()+2, image->height() - 2),
    233234                QString::number(numberOfAlarms(index)));
    234235#endif
     
    236237        QString numEvents = QString::number(index.model()->rowCount(index)).append("/");
    237238        drawPoint.setX(drawPoint.x() - spacer - fmSmall.boundingRect(numEvents).width());
    238         drawPoint.setY(drawPoint.y() + option.rect.height()/2);
     239        drawPoint.setY(drawPoint.y()+image->height() - 2);
    239240        painter->drawText(drawPoint,numEvents);
    240241
Note: See TracChangeset for help on using the changeset viewer.