mirror of
https://github.com/valinet/ExplorerPatcher.git
synced 2025-01-31 03:53:44 +01:00
Explorer: Option to shrink address bar height (thanks @krlvm)
This commit is contained in:
parent
a3cd2a33a9
commit
c96aebee11
@ -70,6 +70,7 @@ DWORD bOldTaskbar = TRUE;
|
||||
DWORD bWasOldTaskbarSet = FALSE;
|
||||
DWORD bAllocConsole = FALSE;
|
||||
DWORD bHideExplorerSearchBar = FALSE;
|
||||
DWORD bShrinkExplorerAdressBar = FALSE;
|
||||
DWORD bMicaEffectOnTitlebar = FALSE;
|
||||
DWORD bHideIconAndTitleInExplorer = FALSE;
|
||||
DWORD bHideControlCenterButton = FALSE;
|
||||
@ -6097,6 +6098,15 @@ void WINAPI LoadSettings(LPARAM lParam)
|
||||
&dwSize
|
||||
);
|
||||
dwSize = sizeof(DWORD);
|
||||
RegQueryValueExW(
|
||||
hKey,
|
||||
TEXT("ShrinkExplorerAddressBar"),
|
||||
0,
|
||||
NULL,
|
||||
&bShrinkExplorerAdressBar,
|
||||
&dwSize
|
||||
);
|
||||
dwSize = sizeof(DWORD);
|
||||
RegQueryValueExW(
|
||||
hKey,
|
||||
TEXT("UseClassicDriveGrouping"),
|
||||
@ -9483,6 +9493,15 @@ HWND Windows11v22H2_explorer_CreateWindowExW(DWORD dwExStyle, LPCWSTR lpClassNam
|
||||
#pragma endregion
|
||||
|
||||
|
||||
#pragma region "Shrink File Explorer address bar height"
|
||||
int explorerframe_GetSystemMetricsForDpi(int nIndex, UINT dpi)
|
||||
{
|
||||
if (bShrinkExplorerAdressBar && nIndex == SM_CYFIXEDFRAME) return 0;
|
||||
return GetSystemMetricsForDpi(nIndex, dpi);
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
|
||||
DWORD InjectBasicFunctions(BOOL bIsExplorer, BOOL bInstall)
|
||||
{
|
||||
//Sleep(150);
|
||||
@ -9571,6 +9590,7 @@ DWORD InjectBasicFunctions(BOOL bIsExplorer, BOOL bInstall)
|
||||
VnPatchIAT(hExplorerFrame, "user32.dll", "SetWindowLongPtrW", SetWindowLongPtrWHook);
|
||||
}
|
||||
VnPatchIAT(hExplorerFrame, "API-MS-WIN-CORE-STRING-L1-1-0.DLL", "CompareStringOrdinal", ExplorerFrame_CompareStringOrdinal);
|
||||
VnPatchIAT(hExplorerFrame, "user32.dll", "GetSystemMetricsForDpi", explorerframe_GetSystemMetricsForDpi);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -9583,6 +9603,7 @@ DWORD InjectBasicFunctions(BOOL bIsExplorer, BOOL bInstall)
|
||||
VnPatchIAT(hExplorerFrame, "user32.dll", "SetWindowLongPtrW", SetWindowLongPtrW);
|
||||
}
|
||||
VnPatchIAT(hExplorerFrame, "API-MS-WIN-CORE-STRING-L1-1-0.DLL", "CompareStringOrdinal", CompareStringOrdinal);
|
||||
VnPatchIAT(hExplorerFrame, "user32.dll", "GetSystemMetricsForDpi", GetSystemMetricsForDpi);
|
||||
FreeLibrary(hExplorerFrame);
|
||||
FreeLibrary(hExplorerFrame);
|
||||
}
|
||||
|
@ -225,6 +225,9 @@
|
||||
;d Disable modern search bar
|
||||
@="{64bc32b5-4eec-4de7-972d-bd8bd0324537}"
|
||||
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
|
||||
;b Shrink address bar height **
|
||||
"ShrinkExplorerAddressBar"=dword:00000000
|
||||
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
|
||||
;b Hide search bar completely **
|
||||
"HideExplorerSearchBar"=dword:00000000
|
||||
;s Explorer_TitlebarSection !IsWindows11Version22H2OrHigher
|
||||
|
@ -169,6 +169,9 @@
|
||||
;d Disable modern search bar
|
||||
@="{64bc32b5-4eec-4de7-972d-bd8bd0324537}"
|
||||
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
|
||||
;b Shrink address bar height **
|
||||
"ShrinkExplorerAddressBar"=dword:00000000
|
||||
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
|
||||
;b Hide search bar completely **
|
||||
"HideExplorerSearchBar"=dword:00000000
|
||||
;p 2
|
||||
|
Loading…
x
Reference in New Issue
Block a user