summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qwindowsvistastyle_p_p.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2016-04-01 09:25:45 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2016-04-18 13:57:43 +0000
commitf1e0eedcf501936e6b4f77b6fe3ac4997d757d94 (patch)
treed6a007a0fca5e46272643e152d6541f7dbb7fbf2 /src/widgets/styles/qwindowsvistastyle_p_p.h
parent4d10e55d4d666f5557a51d43a1bd4b1f172829ac (diff)
QWindowsXP/VistaStyle: Move the Vista treeview handling to QWindowsXPStylePrivate.
QWindowsXPStylePrivate maintains a list of theme handles for various style items. The derived class QWindowsVistaStylePrivate had logic to use a special helper window with the "explorer" window theme set to obtain the correct treeview arrow branch indicator (arrow shape for Vista as opposed to '+'/'-' on Windows XP) when creating the "TREEVIEW" theme. This required calling the helper function QWindowsVistaStylePrivate::initTreeViewTheming() before QWindowsXPStylePrivate::createTheme(), which is prone to errors and initialization order issues. This could be solved by making QWindowsXPStylePrivate::createTheme() virtual or similar, but since it the fate of QWindowsXPStylePrivate is most likely to be merged into QWindowsVistaStylePrivate; it was decided to move the entire special handling of the Vista treeviews into QWindowsXPStylePrivate. The existing enumeration value QWindowsXPStylePrivate::TreeViewTheme is renamed to QWindowsXPStylePrivate::XpTreeViewTheme and a new value QWindowsXPStylePrivate::VistaTreeViewTheme is added for which QWindowsXPStylePrivate::createTheme() invokes the special handling. This also removes the need to destroy the helper window in unpolish(), which should save some initializations. Task-number: QTBUG-52230 Change-Id: I0492ecf38fb3e5eabc4ecbdef70f0bf05e82e104 Reviewed-by: Adam Light <aclight@gmail.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src/widgets/styles/qwindowsvistastyle_p_p.h')
-rw-r--r--src/widgets/styles/qwindowsvistastyle_p_p.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/widgets/styles/qwindowsvistastyle_p_p.h b/src/widgets/styles/qwindowsvistastyle_p_p.h
index 8a3cbe2b67..871962db0b 100644
--- a/src/widgets/styles/qwindowsvistastyle_p_p.h
+++ b/src/widgets/styles/qwindowsvistastyle_p_p.h
@@ -162,16 +162,10 @@ class QWindowsVistaStylePrivate : public QWindowsXPStylePrivate
public:
QWindowsVistaStylePrivate();
- ~QWindowsVistaStylePrivate();
+
static int fixedPixelMetric(QStyle::PixelMetric pm);
static inline bool useVista();
bool transitionsEnabled() const;
-
-private:
- bool initTreeViewTheming();
- void cleanupTreeViewTheming();
-
- HWND m_treeViewHelper;
};
QT_END_NAMESPACE