File 0258-windowsxpstyle-qbrush.diff of Package libqt4-sql-plugins
qt-bugs@ issue : N234506
Trolltech task ID : 234932
applied: yes
author: Patrick Spendrin <ps_ml@gmx.de>
This makes windows style paint a frame and not a rect for QStyle::PE_Frame
Index: src/gui/styles/qwindowsxpstyle.cpp
===================================================================
--- src/gui/styles/qwindowsxpstyle.cpp (revision 880116)
+++ src/gui/styles/qwindowsxpstyle.cpp (working copy)
@@ -1426,16 +1426,19 @@
COLORREF bcRef;
pGetThemeColor(theme.handle(), partId, stateId, TMT_BORDERCOLOR, &bcRef);
QColor bordercolor(qRgb(GetRValue(bcRef), GetGValue(bcRef), GetBValue(bcRef)));
+ QBrush oldBrush = p->brush();
QPen oldPen = p->pen();
// int borderSize = 1;
// pGetThemeInt(theme.handle(), partId, stateId, TMT_BORDERCOLOR, &borderSize);
// Inner white border
+ p->setBrush(Qt::NoBrush);
p->setPen(QPen(option->palette.base().color(), 1));
p->drawRect(option->rect.adjusted(1, 1, -2, -2));
// Outer dark border
p->setPen(QPen(bordercolor, 1));
p->drawRect(option->rect.adjusted(0, 0, -1, -1));
+ p->setBrush(oldBrush);
p->setPen(oldPen);
return;
} else if (fillType == BT_NONE) {