diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp index 9c2163a..963471e 100644 --- a/src/widgets/styles/qcommonstyle.cpp +++ b/src/widgets/styles/qcommonstyle.cpp @@ -574,11 +574,14 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q #ifndef QT_NO_LINEEDIT case PE_PanelLineEdit: if (const QStyleOptionFrame *panel = qstyleoption_cast(opt)) { + p->fillRect(panel->rect.adjusted(panel->lineWidth, panel->lineWidth, -panel->lineWidth, -panel->lineWidth), panel->palette.brush(QPalette::Base)); + qDebug() << __FUNCTION__ << widget << "filling" << panel->palette.brush(QPalette::Base).color(); - if (panel->lineWidth > 0) + if (panel->lineWidth > 0) { proxy()->drawPrimitive(PE_FrameLineEdit, panel, p, widget); + } } break; #endif // QT_NO_LINEEDIT @@ -1183,6 +1186,7 @@ void QCommonStylePrivate::_q_removeAnimation() void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt, QPainter *p, const QWidget *widget) const { + qDebug() << __FUNCTION__ << element << widget; Q_D(const QCommonStyle); switch (element) { diff --git a/src/widgets/styles/qstyleanimation.cpp b/src/widgets/styles/qstyleanimation.cpp index 85dc357..e812e2e 100644 --- a/src/widgets/styles/qstyleanimation.cpp +++ b/src/widgets/styles/qstyleanimation.cpp @@ -43,6 +43,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE @@ -213,6 +214,7 @@ QImage QBlendStyleAnimation::startImage() const void QBlendStyleAnimation::setStartImage(const QImage& image) { + qDebug() << __FUNCTION__ << this << target() << image.size() << image.pixel(0, 0); _start = image; } @@ -223,6 +225,7 @@ QImage QBlendStyleAnimation::endImage() const void QBlendStyleAnimation::setEndImage(const QImage& image) { + qDebug() << __FUNCTION__ << this << target() << image.size() << image.pixel(0, 0); _end = image; } diff --git a/src/widgets/styles/qwindowsstyle.cpp b/src/widgets/styles/qwindowsstyle.cpp index 9ab8f8f..befeed3 100644 --- a/src/widgets/styles/qwindowsstyle.cpp +++ b/src/widgets/styles/qwindowsstyle.cpp @@ -1065,6 +1065,7 @@ void QWindowsStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter *p, const QWidget *widget) const { + qDebug() << __FUNCTION__ << ce << widget; switch (ce) { #ifndef QT_NO_RUBBERBAND case CE_RubberBand: diff --git a/src/widgets/styles/qwindowsvistastyle.cpp b/src/widgets/styles/qwindowsvistastyle.cpp index 9c3e1ea..517cbc6 100644 --- a/src/widgets/styles/qwindowsvistastyle.cpp +++ b/src/widgets/styles/qwindowsvistastyle.cpp @@ -268,6 +268,7 @@ bool QWindowsVistaAnimation::isUpdateNeeded() const void QWindowsVistaAnimation::paint(QPainter *painter, const QStyleOption *option) { + qDebug() << __FUNCTION__ << target() << currentImage().pixel(0, 0); painter->drawImage(option->rect, currentImage()); } @@ -622,11 +623,14 @@ void QWindowsVistaStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt break; case PE_FrameLineEdit: + qDebug() << __FUNCTION__ <(d->animation(styleObject(option)))) { + qDebug() << __FUNCTION__ << "anim"; anim->paint(painter, option); } else { QPainter *p = painter; if (QWindowsXPStylePrivate::isItemViewDelegateLineEdit(widget)) { + qDebug() << __FUNCTION__ << "ITEM VIEW"; // we try to check if this lineedit is a delegate on a QAbstractItemView-derived class. QPen oldPen = p->pen(); // Inner white border @@ -654,6 +658,7 @@ void QWindowsVistaStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt QRegion clipRegion = option->rect; clipRegion -= option->rect.adjusted(2, 2, -2, -2); painter->setClipRegion(clipRegion); + qDebug() << __FUNCTION__ << "d->drawBackground(theme);"; d->drawBackground(theme); painter->restore(); } @@ -862,6 +867,7 @@ void QWindowsVistaStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt void QWindowsVistaStyle::drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const { + qDebug() << __FUNCTION__ << element << widget; QWindowsVistaStylePrivate *d = const_cast(d_func()); if (!QWindowsVistaStylePrivate::useVista()) { diff --git a/src/widgets/styles/qwindowsvistastyle_p_p.h b/src/widgets/styles/qwindowsvistastyle_p_p.h index f2f208f..f137b98 100644 --- a/src/widgets/styles/qwindowsvistastyle_p_p.h +++ b/src/widgets/styles/qwindowsvistastyle_p_p.h @@ -139,7 +139,9 @@ class QWindowsVistaAnimation : public QBlendStyleAnimation { Q_OBJECT public: - QWindowsVistaAnimation(Type type, QObject *target) : QBlendStyleAnimation(type, target) { } + QWindowsVistaAnimation(Type type, QObject *target) : QBlendStyleAnimation(type, target) { + qDebug("%s %d %s", __FUNCTION__, int(type), target->metaObject()->className()); + } virtual bool isUpdateNeeded() const; void paint(QPainter *painter, const QStyleOption *option); @@ -151,7 +153,9 @@ class QWindowsVistaTransition : public QWindowsVistaAnimation { Q_OBJECT public: - QWindowsVistaTransition(QObject *target) : QWindowsVistaAnimation(Transition, target) {} + QWindowsVistaTransition(QObject *target) : QWindowsVistaAnimation(Transition, target) { + qDebug("%s %s", __FUNCTION__, target->metaObject()->className()); + } }; diff --git a/src/widgets/styles/qwindowsxpstyle.cpp b/src/widgets/styles/qwindowsxpstyle.cpp index e694eb4..25fdad5 100644 --- a/src/widgets/styles/qwindowsxpstyle.cpp +++ b/src/widgets/styles/qwindowsxpstyle.cpp @@ -746,6 +746,7 @@ void QWindowsXPStylePrivate::drawBackground(XPThemeData &themeData) */ void QWindowsXPStylePrivate::drawBackgroundDirectly(XPThemeData &themeData) { + qDebug() << __FUNCTION__; QPainter *painter = themeData.painter; HDC dc = 0; if (themeData.widget) @@ -770,7 +771,6 @@ void QWindowsXPStylePrivate::drawBackgroundDirectly(XPThemeData &themeData) qPrintable(themeData.name), themeData.partId, themeData.stateId); showProperties(themeData); #endif - RECT drawRECT = themeData.toRECT(area); DTBGOPTS drawOptions; drawOptions.dwSize = sizeof(drawOptions); @@ -781,6 +781,7 @@ void QWindowsXPStylePrivate::drawBackgroundDirectly(XPThemeData &themeData) | (themeData.mirrorHorizontally ? DTBG_MIRRORDC : 0); if (pDrawThemeBackgroundEx != 0) { + qDebug() << __FUNCTION__ << "pDrawThemeBackgroundEx1" << themeData.partId << themeData.stateId; pDrawThemeBackgroundEx(themeData.handle(), dc, themeData.partId, themeData.stateId, &(drawRECT), &drawOptions); } else { // We are running on a system where the uxtheme.dll does not have @@ -815,6 +816,7 @@ void QWindowsXPStylePrivate::drawBackgroundDirectly(XPThemeData &themeData) } } + qDebug() << __FUNCTION__ << "pDrawThemeBackgroundEx" << themeData.stateId; pDrawThemeBackground(themeData.handle(), dc, themeData.partId, themeData.stateId, &(drawRECT), &(drawOptions.rcClip)); } SelectClipRgn(dc, 0); @@ -1961,6 +1963,7 @@ case PE_Frame: void QWindowsXPStyle::drawControl(ControlElement element, const QStyleOption *option, QPainter *p, const QWidget *widget) const { + qDebug() << __FUNCTION__ << element << widget; QWindowsXPStylePrivate *d = const_cast(d_func()); if (!QWindowsXPStylePrivate::useXP()) { QWindowsStyle::drawControl(element, option, p, widget);