src/gui/kernel/qcursor_win.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
   151 #elif defined(GWES_ICONCURS)
   151 #elif defined(GWES_ICONCURS)
   152     QImage bbits, mbits;
   152     QImage bbits, mbits;
   153     bool invb, invm;
   153     bool invb, invm;
   154     bbits = pixmap.toImage().convertToFormat(QImage::Format_Mono);
   154     bbits = pixmap.toImage().convertToFormat(QImage::Format_Mono);
   155     mbits = pixmap.toImage().convertToFormat(QImage::Format_Mono);
   155     mbits = pixmap.toImage().convertToFormat(QImage::Format_Mono);
   156     invb = bbits.numColors() > 1 && qGray(bbits.color(0)) < qGray(bbits.color(1));
   156     invb = bbits.colorCount() > 1 && qGray(bbits.color(0)) < qGray(bbits.color(1));
   157     invm = mbits.numColors() > 1 && qGray(mbits.color(0)) < qGray(mbits.color(1));
   157     invm = mbits.colorCount() > 1 && qGray(mbits.color(0)) < qGray(mbits.color(1));
   158 
   158 
   159     int sysW = GetSystemMetrics(SM_CXCURSOR);
   159     int sysW = GetSystemMetrics(SM_CXCURSOR);
   160     int sysH = GetSystemMetrics(SM_CYCURSOR);
   160     int sysH = GetSystemMetrics(SM_CYCURSOR);
   161     int sysN = qMax(1, sysW / 8);
   161     int sysN = qMax(1, sysW / 8);
   162     int n = qMax(1, bbits.width() / 8);
   162     int n = qMax(1, bbits.width() / 8);
   394                 hx = hy = 16;
   394                 hx = hy = 16;
   395             invb = invm = false;
   395             invb = invm = false;
   396         } else {
   396         } else {
   397             bbits = bm->toImage().convertToFormat(QImage::Format_Mono);
   397             bbits = bm->toImage().convertToFormat(QImage::Format_Mono);
   398             mbits = bmm->toImage().convertToFormat(QImage::Format_Mono);
   398             mbits = bmm->toImage().convertToFormat(QImage::Format_Mono);
   399             invb = bbits.numColors() > 1 && qGray(bbits.color(0)) < qGray(bbits.color(1));
   399             invb = bbits.colorCount() > 1 && qGray(bbits.color(0)) < qGray(bbits.color(1));
   400             invm = mbits.numColors() > 1 && qGray(mbits.color(0)) < qGray(mbits.color(1));
   400             invm = mbits.colorCount() > 1 && qGray(mbits.color(0)) < qGray(mbits.color(1));
   401         }
   401         }
   402         int n = qMax(1, bbits.width() / 8);
   402         int n = qMax(1, bbits.width() / 8);
   403         int h = bbits.height();
   403         int h = bbits.height();
   404 #if !defined(Q_WS_WINCE)
   404 #if !defined(Q_WS_WINCE)
   405         uchar* xBits = new uchar[h * n];
   405         uchar* xBits = new uchar[h * n];