diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-07-08 16:16:38 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-07-10 04:09:43 +0000 |
commit | 3719744b395f78baafe5d68bd608745c2a10eb2f (patch) | |
tree | 4df013f15b667214668367879bee52c93b92606e /src/widgets/styles/qwindowsvistastyle.cpp | |
parent | 1443cdcfe03fc07c7718e36b8fdd53ac4b33a5ff (diff) |
Windows XP style: Pass widget to XPThemeData.
Previously, 0 was passed which causes QWindowsXPStylePrivate::winId() to
go on a hunt trying to find a window handle needlessly looping over top
levels, slowing down painting.
Task-number: QTBUG-42245
Change-Id: Ic702d9a73c4f749fd5988950280aef632a3308c4
Reviewed-by: Marko Kangas <marko.kangas@theqtcompany.com>
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/widgets/styles/qwindowsvistastyle.cpp')
-rw-r--r-- | src/widgets/styles/qwindowsvistastyle.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/styles/qwindowsvistastyle.cpp b/src/widgets/styles/qwindowsvistastyle.cpp index daa8ab12a9..d3e7e457ea 100644 --- a/src/widgets/styles/qwindowsvistastyle.cpp +++ b/src/widgets/styles/qwindowsvistastyle.cpp @@ -396,7 +396,7 @@ void QWindowsVistaStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt case PE_IndicatorBranch: { - XPThemeData theme(0, painter, QWindowsXPStylePrivate::TreeViewTheme); + XPThemeData theme(widget, painter, QWindowsXPStylePrivate::TreeViewTheme); static int decoration_size = 0; if (d->initTreeViewTheming() && theme.isValid() && !decoration_size) { XPThemeData themeSize = theme; @@ -710,7 +710,7 @@ void QWindowsVistaStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt state = LISS_HOT; QPainter pixmapPainter(&pixmap); - XPThemeData theme(0, &pixmapPainter, + XPThemeData theme(widget, &pixmapPainter, QWindowsXPStylePrivate::TreeViewTheme, LVP_LISTITEM, state, QRect(0, 0, sectionSize.width(), sectionSize.height())); if (d->initTreeViewTheming() && theme.isValid()) { |