mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-26 19:33:31 +00:00
[EXPLORER][COMCTL32][SHELL32] Enable SPI_SETICONTITLELOGFONT (#7783)
Enable desktop icon title font setting. JIRA issue: CORE-13601 - Forward WM_SETTINGCHANGE message up to ListView. - ListView accepts WM_SETTINGCHANGE message. - Enable icon spacing.
This commit is contained in:
@@ -2454,6 +2454,9 @@ ChangePos:
|
||||
CheckTrayWndPosition();
|
||||
}
|
||||
|
||||
if (m_DesktopWnd)
|
||||
::SendMessageW(m_DesktopWnd, uMsg, wParam, lParam);
|
||||
|
||||
if (m_StartMenuPopup && lstrcmpiW((LPCWSTR)lParam, L"TraySettings") == 0)
|
||||
{
|
||||
HideStartMenu();
|
||||
|
||||
@@ -12001,7 +12001,36 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
return DefWindowProcW(hwnd, uMsg, wParam, lParam);
|
||||
|
||||
#ifdef __REACTOS__
|
||||
case WM_SETTINGCHANGE: /* Same as WM_WININICHANGE */
|
||||
if (wParam == SPI_SETICONMETRICS ||
|
||||
wParam == SPI_SETICONTITLELOGFONT ||
|
||||
wParam == SPI_SETNONCLIENTMETRICS ||
|
||||
(!wParam && !lParam))
|
||||
{
|
||||
BOOL bDefaultOrNullFont = (infoPtr->hDefaultFont == infoPtr->hFont || !infoPtr->hFont);
|
||||
LOGFONTW logFont;
|
||||
SystemParametersInfoW(SPI_GETICONTITLELOGFONT, 0, &logFont, 0);
|
||||
|
||||
if (infoPtr->autoSpacing)
|
||||
LISTVIEW_SetIconSpacing(infoPtr, -1, -1);
|
||||
|
||||
if (infoPtr->hDefaultFont)
|
||||
DeleteObject(infoPtr->hDefaultFont);
|
||||
infoPtr->hDefaultFont = CreateFontIndirectW(&logFont);
|
||||
|
||||
if (bDefaultOrNullFont)
|
||||
infoPtr->hFont = infoPtr->hDefaultFont;
|
||||
|
||||
LISTVIEW_SaveTextMetrics(infoPtr);
|
||||
LISTVIEW_UpdateItemSize(infoPtr);
|
||||
LISTVIEW_UpdateScroll(infoPtr);
|
||||
LISTVIEW_InvalidateRect(infoPtr, NULL);
|
||||
}
|
||||
return 0;
|
||||
#else
|
||||
/* case WM_WININICHANGE: */
|
||||
#endif
|
||||
|
||||
default:
|
||||
if ((uMsg >= WM_USER) && (uMsg < WM_APP) && !COMCTL32_IsReflectedMessage(uMsg))
|
||||
|
||||
@@ -3008,6 +3008,7 @@ LRESULT CDefView::OnSettingChange(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL
|
||||
if (wParam == SPI_SETDESKWALLPAPER || wParam == 0)
|
||||
UpdateListColors();
|
||||
|
||||
m_ListView.SendMessage(uMsg, wParam, lParam);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user