Have the theme INI file parsed upon theme activation and not just when
the first theme data is requested; that way, the themed system colors are set correctly from the start, and not just after some theme data was requested.
This commit is contained in:
parent
2adcf68331
commit
db56189f24
|
@ -45,6 +45,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(uxtheme);
|
||||||
|
|
||||||
BOOL MSSTYLES_GetNextInteger(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR *lpValEnd, int *value);
|
BOOL MSSTYLES_GetNextInteger(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR *lpValEnd, int *value);
|
||||||
BOOL MSSTYLES_GetNextToken(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR *lpValEnd, LPWSTR lpBuff, DWORD buffSize);
|
BOOL MSSTYLES_GetNextToken(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR *lpValEnd, LPWSTR lpBuff, DWORD buffSize);
|
||||||
|
void MSSTYLES_ParseThemeIni(PTHEME_FILE tf);
|
||||||
|
|
||||||
extern HINSTANCE hDllInst;
|
extern HINSTANCE hDllInst;
|
||||||
|
|
||||||
|
@ -229,7 +230,11 @@ HRESULT MSSTYLES_SetActiveTheme(PTHEME_FILE tf)
|
||||||
MSSTYLES_CloseThemeFile(tfActiveTheme);
|
MSSTYLES_CloseThemeFile(tfActiveTheme);
|
||||||
tfActiveTheme = tf;
|
tfActiveTheme = tf;
|
||||||
if (tfActiveTheme)
|
if (tfActiveTheme)
|
||||||
|
{
|
||||||
tfActiveTheme->dwRefCount++;
|
tfActiveTheme->dwRefCount++;
|
||||||
|
if(!tfActiveTheme->classes)
|
||||||
|
MSSTYLES_ParseThemeIni(tfActiveTheme);
|
||||||
|
}
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -784,8 +789,6 @@ PTHEME_CLASS MSSTYLES_OpenThemeClass(LPCWSTR pszAppName, LPCWSTR pszClassList)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if(!tfActiveTheme->classes) {
|
if(!tfActiveTheme->classes) {
|
||||||
MSSTYLES_ParseThemeIni(tfActiveTheme);
|
|
||||||
if(!tfActiveTheme->classes)
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue