Author: hbelusca
Date: Sat May 28 16:59:55 2016
New Revision: 71441
URL:
http://svn.reactos.org/svn/reactos?rev=71441&view=rev
Log:
[SHELL32]: Always paint the desktop listview transparent. This allows explorer to display
the default desktop background color set by win32k as well as the ReactOS version on the
desktop.
See also r66271 and r66752.
Modified:
trunk/reactos/dll/win32/shell32/CDefView.cpp
Modified: trunk/reactos/dll/win32/shell32/CDefView.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CDefView…
==============================================================================
--- trunk/reactos/dll/win32/shell32/CDefView.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/CDefView.cpp [iso-8859-1] Sat May 28 16:59:55 2016
@@ -582,20 +582,27 @@
DWORD cbDropShadow = sizeof(bDropShadow);
WCHAR wszBuf[16] = L"";
+ /*
+ * The desktop ListView always take the default desktop colours, by
+ * remaining transparent and letting user32/win32k paint itself the
+ * desktop background color, if any.
+ */
+ m_ListView.SetBkColor(CLR_NONE);
+
RegGetValueW(HKEY_CURRENT_USER,
L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
L"ListviewShadow", RRF_RT_DWORD, NULL, &bDropShadow,
&cbDropShadow);
if (bDropShadow && SystemParametersInfoW(SPI_GETDESKWALLPAPER,
_countof(wszBuf), wszBuf, 0) && wszBuf[0])
{
+ /* Set the icon background transparent */
m_ListView.SetTextBkColor(CLR_NONE);
- m_ListView.SetBkColor(CLR_NONE);
m_ListView.SetTextColor(RGB(255, 255, 255));
m_ListView.SetExtendedListViewStyle(LVS_EX_TRANSPARENTSHADOWTEXT,
LVS_EX_TRANSPARENTSHADOWTEXT);
}
else
{
+ /* Set the icon background as the same colour as the desktop */
COLORREF crDesktop = GetSysColor(COLOR_DESKTOP);
m_ListView.SetTextBkColor(crDesktop);
- m_ListView.SetBkColor(crDesktop);
if (GetRValue(crDesktop) + GetGValue(crDesktop) + GetBValue(crDesktop) >
128 * 3)
m_ListView.SetTextColor(RGB(0, 0, 0));
else