Ignore:
Timestamp:
Aug 2, 2010, 9:27:30 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.3 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/demos/embedded/anomaly/src/ControlStrip.cpp

    r651 r769  
    5151    backPixmap.load(":/images/go-previous.png");
    5252    forwardPixmap.load(":/images/go-next.png");
     53    closePixmap.load(":/images/button-close.png");
    5354}
    5455
     
    6667{
    6768    int h = height();
     69    int spacing = qMin(h, (width() - h * 4) / 3);
    6870    int x = event->pos().x();
    6971
     
    7577
    7678    if (x > width() - h) {
     79        emit closeClicked();
     80        event->accept();
     81        return;
     82    }
     83
     84    if ((x < width() - (h + spacing)) && (x > width() - (h * 2 + spacing))) {
    7785        emit forwardClicked();
    7886        event->accept();
     
    8088    }
    8189
    82     if ((x < width() - 2 * h) && (x > width() - 3 * h)) {
     90    if ((x < width() - (h * 2 + spacing * 2)) && (x > width() - (h * 3 + spacing * 2))) {
    8391        emit backClicked();
    8492        event->accept();
     
    9098{
    9199    int h = height();
    92     int s = (h - menuPixmap.height()) / 2;
     100    int spacing = qMin(h, (width() - h * 4) / 3);
     101    int s = (height() - menuPixmap.height()) / 2;
    93102
    94103    QPainter p(this);
     
    96105    p.setCompositionMode(QPainter::CompositionMode_SourceOver);
    97106    p.drawPixmap(s, s, menuPixmap);
    98     p.drawPixmap(width() - 3 * h + s, s, backPixmap);
    99     p.drawPixmap(width() - h + s, s, forwardPixmap);
     107    p.drawPixmap(width() - h + s, s, closePixmap);
     108    p.drawPixmap(width() - (h * 2 + spacing) + s, s, forwardPixmap);
     109    p.drawPixmap(width() - (h * 3 + spacing * 2) + s, s, backPixmap);
     110
    100111    p.end();
    101112}
Note: See TracChangeset for help on using the changeset viewer.