summaryrefslogtreecommitdiffstats
path: root/win/ttkWinXPTheme.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-04-03 12:53:21 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-04-03 12:53:21 (GMT)
commitd0f56684e57c15c590975be1a7f608b170a3ee40 (patch)
treec675e961c86f200609fcc46dca9b26867ded81bf /win/ttkWinXPTheme.c
parente4aba9d0cdd24b1e25108d18d4a41e2d8e44c2bd (diff)
downloadtk-d0f56684e57c15c590975be1a7f608b170a3ee40.zip
tk-d0f56684e57c15c590975be1a7f608b170a3ee40.tar.gz
tk-d0f56684e57c15c590975be1a7f608b170a3ee40.tar.bz2
Split (internal) TK_THEME_WIN_CLASSIC into two different symbols: TK_THEME_WIN_CLASSIC/TK_THEME_WIN_VISTA
Diffstat (limited to 'win/ttkWinXPTheme.c')
-rw-r--r--win/ttkWinXPTheme.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/win/ttkWinXPTheme.c b/win/ttkWinXPTheme.c
index 8f071d5..4391fdd 100644
--- a/win/ttkWinXPTheme.c
+++ b/win/ttkWinXPTheme.c
@@ -1289,10 +1289,6 @@ MODULE_SCOPE int TtkXPTheme_Init(Tcl_Interp *interp, HWND hwnd)
HINSTANCE hlibrary;
Ttk_Theme themePtr, parentPtr, vistaPtr;
ElementInfo *infoPtr;
- OSVERSIONINFOW os;
-
- os.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW);
- GetVersionExW(&os);
procs = LoadXPThemeProcs(&hlibrary);
if (!procs)
@@ -1325,7 +1321,7 @@ MODULE_SCOPE int TtkXPTheme_Init(Tcl_Interp *interp, HWND hwnd)
* enable function. The theme itself is defined in script.
*/
- if (os.dwPlatformId == VER_PLATFORM_WIN32_NT && os.dwMajorVersion > 5) {
+ if (TkWinGetPlatformTheme() == TK_THEME_WIN_VISTA) {
vistaPtr = Ttk_CreateTheme(interp, "vista", themePtr);
if (vistaPtr) {
Ttk_SetThemeEnabledProc(vistaPtr, XPThemeEnabled, themeData);