Mac: More accurate focus mask
Small artifacts were visible when tabing in and out QLineEdits several times. Change-Id: I56334e0534c67c94d357e3517d2470adcc1d8a1c Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
This commit is contained in:
parent
d91c1422a9
commit
e5eeffbf8b
@ -2585,10 +2585,11 @@ int QMacStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w
|
|||||||
srow = sptr+((y*sbpl)/4);
|
srow = sptr+((y*sbpl)/4);
|
||||||
drow = dptr+((y*dbpl)/4);
|
drow = dptr+((y*dbpl)/4);
|
||||||
for (int x = 0; x < w; ++x) {
|
for (int x = 0; x < w; ++x) {
|
||||||
const int diff = (((qRed(*srow)-fillR)*(qRed(*srow)-fillR)) +
|
const int redDiff = qRed(*srow) - fillR;
|
||||||
((qGreen(*srow)-fillG)*((qGreen(*srow)-fillG))) +
|
const int greenDiff = qGreen(*srow) - fillG;
|
||||||
((qBlue(*srow)-fillB)*((qBlue(*srow)-fillB))));
|
const int blueDiff = qBlue(*srow) - fillB;
|
||||||
(*drow++) = (diff < 100) ? 0xffffffff : 0xff000000;
|
const int diff = (redDiff * redDiff) + (greenDiff * greenDiff) + (blueDiff * blueDiff);
|
||||||
|
(*drow++) = (diff < 10) ? 0xffffffff : 0xff000000;
|
||||||
++srow;
|
++srow;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user