Changeset 478


Ignore:
Timestamp:
Jan 27, 2010, 8:42:38 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

gui: Fixed QPixmap::toPmHPOINTER(): 1) Correct the hot spot when centering a smaller pixmap within the system rectangle; 2) ignore the mini mode since there are no mini pointers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gui/image/qpixmap_pm.cpp

    r455 r478  
    336336    after use.
    337337
     338
     339
    338340    \warning This function is only available on OS/2.
    339341
     
    351353    int w = WinQuerySysValue(HWND_DESKTOP, isPointer ? SV_CXPOINTER : SV_CXICON);
    352354    int h = WinQuerySysValue(HWND_DESKTOP, isPointer ? SV_CYPOINTER : SV_CYICON);
    353     if (isMini) {
     355    if (isMini) {
    354356        w = w / 2;
    355357        h = h / 2;
     
    373375        pmNew.fill(Qt::transparent);
    374376        QPainter painter(&pmNew);
    375         painter.drawPixmap((w - pm.width()) / 2, (h - pm.height()) / 2, pm);
     377        int dx = (w - pm.width()) / 2;
     378        int dy = (h - pm.height()) / 2;
     379        painter.drawPixmap(dx, dy, pm);
    376380        pm = pmNew;
     381
     382
    377383    }
    378384
     
    380386    info.fPointer = isPointer;
    381387    info.xHotspot = hotX;
    382     info.yHotspot = hotY;
     388    info.yHotspot = ;
    383389    info.hbmColor = pm.toPmHBITMAP(&info.hbmPointer, embedRealAlpha);
    384390    info.hbmMiniPointer = NULLHANDLE;
Note: See TracChangeset for help on using the changeset viewer.