- int size = m_size->value();
- int x0 = qMax(0, pos.x() - size / 2);
- int y0 = qMax(0, pos.y() - size / 2);
- int x1 = qMin(qApp->desktop()->geometry().width(), pos.x() + size / 2);
- int y1 = qMin(qApp->desktop()->geometry().height(), pos.y() + size / 2);
-
- // take care of loss when dividing odd sizes
- if (size % 2 != 0) {
- if (x1 < qApp->desktop()->geometry().width()) ++x1;
- if (y1 < qApp->desktop()->geometry().height()) ++y1;
- }
+ disconnect(m_grabRectFrame, SIGNAL(getColor()), this, SLOT(slotGetAverageColor()));
+ m_grabRect = m_grabRect.normalized();