mirror of
https://github.com/Open-Shell/Open-Shell-Menu.git
synced 2026-04-12 18:07:24 +10:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e2758ec376 | ||
|
|
dd57854da1 | ||
|
|
40d8f5b119 | ||
|
|
4ebeadd949 | ||
|
|
dc1994e713 | ||
|
|
8c713cc5fd |
@@ -23,8 +23,11 @@ You can find the latest stable version here:
|
|||||||
|
|
||||||
[](https://github.com/Open-Shell/Open-Shell-Menu/releases/latest)
|
[](https://github.com/Open-Shell/Open-Shell-Menu/releases/latest)
|
||||||
|
|
||||||
### ⚠️ Windows for ARM compatibility ⚠️
|
> [!IMPORTANT]
|
||||||
Open-Shell is not compatible with Windows for ARM. If you install it on a Windows for ARM installation (ex. using Parallels Desktop on an Apple Silicon Mac), you will no longer be able to log into your account the next time you reboot. Please refrain from installing Open-Shell on Windows for ARM.
|
> #### Windows for ARM compatibility
|
||||||
|
> Open-Shell is compatible with Windows for ARM since version [4.4.196](https://github.com/Open-Shell/Open-Shell-Menu/releases/tag/v4.4.196).
|
||||||
|
>
|
||||||
|
> If you install older one on a Windows for ARM installation (ex. using Parallels Desktop on an Apple Silicon Mac), you will no longer be able to log into your account the next time you reboot. Please refrain from installing Open-Shell on Windows for ARM.
|
||||||
|
|
||||||
### Temporary Translation/Language Solution
|
### Temporary Translation/Language Solution
|
||||||
1. Download [language DLL](https://coddec.github.io/Classic-Shell/www.classicshell.net/translations/index.html)
|
1. Download [language DLL](https://coddec.github.io/Classic-Shell/www.classicshell.net/translations/index.html)
|
||||||
|
|||||||
@@ -384,14 +384,14 @@ HICON CreateDisabledIcon( HICON hIcon, int iconSize )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Loads an image file into a bitmap and optionally resizes it
|
// Loads an image file into a bitmap and optionally resizes it
|
||||||
HBITMAP LoadImageFile( const wchar_t *path, const SIZE *pSize, bool bUseAlpha, bool bPremultiply, std::vector<unsigned int> *pButtonAnim )
|
HBITMAP LoadImageFile( const wchar_t *path, const SIZE *pSize, bool bUseAlpha, bool bPremultiply, std::vector<unsigned int> *pButtonAnim, UINT dpi )
|
||||||
{
|
{
|
||||||
HBITMAP srcBmp=NULL;
|
HBITMAP srcBmp=NULL;
|
||||||
if (_wcsicmp(PathFindExtension(path),L".bmp")==0)
|
if (_wcsicmp(PathFindExtension(path),L".bmp")==0)
|
||||||
{
|
{
|
||||||
srcBmp=(HBITMAP)LoadImage(NULL,path,IMAGE_BITMAP,0,0,LR_CREATEDIBSECTION|LR_LOADFROMFILE);
|
srcBmp=(HBITMAP)LoadImage(NULL,path,IMAGE_BITMAP,0,0,LR_CREATEDIBSECTION|LR_LOADFROMFILE);
|
||||||
}
|
}
|
||||||
if (srcBmp && !pSize)
|
if (srcBmp && !pSize && !dpi)
|
||||||
return srcBmp;
|
return srcBmp;
|
||||||
CComPtr<IWICImagingFactory> pFactory;
|
CComPtr<IWICImagingFactory> pFactory;
|
||||||
if (FAILED(pFactory.CoCreateInstance(CLSID_WICImagingFactory)))
|
if (FAILED(pFactory.CoCreateInstance(CLSID_WICImagingFactory)))
|
||||||
@@ -482,6 +482,12 @@ HBITMAP LoadImageFile( const wchar_t *path, const SIZE *pSize, bool bUseAlpha, b
|
|||||||
else
|
else
|
||||||
frameHeightD=frameWidthD*frameHeightS/frameWidthS;
|
frameHeightD=frameWidthD*frameHeightS/frameWidthS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dpi)
|
||||||
|
{
|
||||||
|
frameWidthD=ScaleForDpi(dpi,frameWidthD);
|
||||||
|
frameHeightD=ScaleForDpi(dpi,frameHeightD);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BITMAPINFO bi={0};
|
BITMAPINFO bi={0};
|
||||||
@@ -946,7 +952,12 @@ UINT GetDpi(HWND hwnd)
|
|||||||
return dpi;
|
return dpi;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ScaleForDpi(UINT dpi, int value)
|
||||||
|
{
|
||||||
|
return MulDiv(value, dpi, USER_DEFAULT_SCREEN_DPI);
|
||||||
|
}
|
||||||
|
|
||||||
int ScaleForDpi(HWND hwnd, int value)
|
int ScaleForDpi(HWND hwnd, int value)
|
||||||
{
|
{
|
||||||
return MulDiv(value, GetDpi(hwnd), USER_DEFAULT_SCREEN_DPI);
|
return ScaleForDpi(GetDpi(hwnd), value);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ HICON ShExtractIcon( const char *path, int index, int iconSize );
|
|||||||
HBITMAP BitmapFromIcon( HICON hIcon, int iconSize, unsigned int **pBits, bool bDestroyIcon );
|
HBITMAP BitmapFromIcon( HICON hIcon, int iconSize, unsigned int **pBits, bool bDestroyIcon );
|
||||||
|
|
||||||
// Loads an image file into a bitmap and optionally resizes it
|
// Loads an image file into a bitmap and optionally resizes it
|
||||||
HBITMAP LoadImageFile( const wchar_t *path, const SIZE *pSize, bool bUseAlpha, bool bPremultiply, std::vector<unsigned int> *pButtonAnim );
|
HBITMAP LoadImageFile( const wchar_t *path, const SIZE *pSize, bool bUseAlpha, bool bPremultiply, std::vector<unsigned int> *pButtonAnim, UINT dpi=0 );
|
||||||
|
|
||||||
// Loads a bitmap from a IMAGE resource
|
// Loads a bitmap from a IMAGE resource
|
||||||
HBITMAP LoadImageResource( HMODULE hModule, const wchar_t *name, bool bTopDown, bool bPremultiply );
|
HBITMAP LoadImageResource( HMODULE hModule, const wchar_t *name, bool bTopDown, bool bPremultiply );
|
||||||
@@ -88,6 +88,8 @@ HFONT CreateFontSetting( const wchar_t *fontStr, int dpi );
|
|||||||
// Return DPI of given window (or system DPI on older systems)
|
// Return DPI of given window (or system DPI on older systems)
|
||||||
UINT GetDpi(HWND hwnd = nullptr);
|
UINT GetDpi(HWND hwnd = nullptr);
|
||||||
|
|
||||||
|
// Scale given value according to given DPI
|
||||||
|
int ScaleForDpi(UINT dpi, int value);
|
||||||
// Scale given value according to DPI of window
|
// Scale given value according to DPI of window
|
||||||
int ScaleForDpi(HWND hwnd, int value);
|
int ScaleForDpi(HWND hwnd, int value);
|
||||||
|
|
||||||
|
|||||||
@@ -526,16 +526,16 @@ void CStartButton::LoadBitmap( void )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
int dpi=GetDpi(GetParent());
|
||||||
bool bResource=false;
|
bool bResource=false;
|
||||||
std::vector<unsigned int> buttonAnim;
|
std::vector<unsigned int> buttonAnim;
|
||||||
if (*path)
|
if (*path)
|
||||||
{
|
{
|
||||||
m_Bitmap=LoadImageFile(path,&size,true,true,&buttonAnim);
|
m_Bitmap=LoadImageFile(path,&size,true,true,&buttonAnim,dpi);
|
||||||
}
|
}
|
||||||
if (!m_Bitmap)
|
if (!m_Bitmap)
|
||||||
{
|
{
|
||||||
int id;
|
int id;
|
||||||
int dpi=GetDpi(GetParent());
|
|
||||||
if (dpi<120)
|
if (dpi<120)
|
||||||
id=IDB_BUTTON96;
|
id=IDB_BUTTON96;
|
||||||
else if (dpi<144)
|
else if (dpi<144)
|
||||||
|
|||||||
@@ -1624,7 +1624,7 @@ static void ComputeTaskbarColors( int *data )
|
|||||||
{
|
{
|
||||||
bool bDefLook;
|
bool bDefLook;
|
||||||
int look=GetSettingInt(L"TaskbarLook",bDefLook);
|
int look=GetSettingInt(L"TaskbarLook",bDefLook);
|
||||||
if (GetWinVersion()<WIN_VER_WIN10 || look==TASKBAR_AEROGLASS || (look==TASKBAR_TRANSPARENT && g_TaskbarTexture))
|
if (GetWinVersion()<WIN_VER_WIN10 || !IsAppThemed() || look==TASKBAR_AEROGLASS || (look==TASKBAR_TRANSPARENT && g_TaskbarTexture))
|
||||||
{
|
{
|
||||||
memset(data,0,16);
|
memset(data,0,16);
|
||||||
}
|
}
|
||||||
@@ -1872,6 +1872,7 @@ static LRESULT CALLBACK SubclassTaskBarProc( HWND hWnd, UINT uMsg, WPARAM wParam
|
|||||||
ComputeTaskbarColors(data);
|
ComputeTaskbarColors(data);
|
||||||
WINCOMPATTRDATA attrData={0x13,&data,sizeof(data)};
|
WINCOMPATTRDATA attrData={0x13,&data,sizeof(data)};
|
||||||
SetWindowCompositionAttribute(hWnd,&attrData);
|
SetWindowCompositionAttribute(hWnd,&attrData);
|
||||||
|
UpdateTaskBars(TASKBAR_UPDATE_TEXTURE);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
if ((uMsg==WM_DWMCOLORIZATIONCOLORCHANGED || uMsg==WM_SETTINGCHANGE) && taskBar && taskBar->bCustomLook && SetWindowCompositionAttribute && GetWinVersion()<WIN_VER_WIN10)
|
if ((uMsg==WM_DWMCOLORIZATIONCOLORCHANGED || uMsg==WM_SETTINGCHANGE) && taskBar && taskBar->bCustomLook && SetWindowCompositionAttribute && GetWinVersion()<WIN_VER_WIN10)
|
||||||
@@ -1932,7 +1933,7 @@ static LRESULT CALLBACK SubclassTaskBarProc( HWND hWnd, UINT uMsg, WPARAM wParam
|
|||||||
WINCOMPATTRDATA attrData={0x13,&data,sizeof(data)};
|
WINCOMPATTRDATA attrData={0x13,&data,sizeof(data)};
|
||||||
SetWindowCompositionAttribute(hWnd,&attrData);
|
SetWindowCompositionAttribute(hWnd,&attrData);
|
||||||
}
|
}
|
||||||
if (g_TaskbarTexture && IsAppThemed())
|
if (g_TaskbarTexture)
|
||||||
{
|
{
|
||||||
// draw taskbar background (behind start button and separators)
|
// draw taskbar background (behind start button and separators)
|
||||||
PAINTSTRUCT ps;
|
PAINTSTRUCT ps;
|
||||||
@@ -2383,12 +2384,19 @@ void UpdateTaskBars( TUpdateTaskbar update )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (GetWinVersion()<WIN_VER_WIN10 && (!bDefColor || !bDefOpacity))
|
else if ((GetWinVersion()<WIN_VER_WIN10 && (!bDefColor || !bDefOpacity)) || !IsAppThemed())
|
||||||
{
|
{
|
||||||
if (bDefColor && GetWinVersion()>WIN_VER_WIN7)
|
if (bDefColor && GetWinVersion()>WIN_VER_WIN7)
|
||||||
{
|
{
|
||||||
color=GetSystemGlassColor8();
|
if (IsAppThemed())
|
||||||
color=((color&0xFF)<<16)|(color&0xFF00)|((color>>16)&0xFF);
|
{
|
||||||
|
color=GetSystemGlassColor8();
|
||||||
|
color=((color&0xFF)<<16)|(color&0xFF00)|((color>>16)&0xFF);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
color=GetSysColor(COLOR_BTNFACE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
BITMAPINFO bi={0};
|
BITMAPINFO bi={0};
|
||||||
bi.bmiHeader.biSize=sizeof(BITMAPINFOHEADER);
|
bi.bmiHeader.biSize=sizeof(BITMAPINFOHEADER);
|
||||||
@@ -3012,7 +3020,10 @@ static void InitStartMenuDLL( void )
|
|||||||
if (GetWinVersion()<=WIN_VER_WIN81)
|
if (GetWinVersion()<=WIN_VER_WIN81)
|
||||||
g_DrawThemeBackgroundHook=SetIatHook(module,"uxtheme.dll","DrawThemeBackground",DrawThemeBackground2);
|
g_DrawThemeBackgroundHook=SetIatHook(module,"uxtheme.dll","DrawThemeBackground",DrawThemeBackground2);
|
||||||
g_DrawThemeTextHook=SetIatHook(module,"uxtheme.dll","DrawThemeText",DrawThemeText2);
|
g_DrawThemeTextHook=SetIatHook(module,"uxtheme.dll","DrawThemeText",DrawThemeText2);
|
||||||
g_DrawThemeTextExHook=SetIatHook(module,"uxtheme.dll","DrawThemeTextEx",DrawThemeTextEx2);
|
if (IsAppThemed())
|
||||||
|
{
|
||||||
|
g_DrawThemeTextExHook=SetIatHook(module,"uxtheme.dll","DrawThemeTextEx",DrawThemeTextEx2);
|
||||||
|
}
|
||||||
g_DrawThemeTextCtlHook=SetIatHook(GetModuleHandle(L"comctl32.dll"),"uxtheme.dll","DrawThemeText",DrawThemeText2);
|
g_DrawThemeTextCtlHook=SetIatHook(GetModuleHandle(L"comctl32.dll"),"uxtheme.dll","DrawThemeText",DrawThemeText2);
|
||||||
if (GetWinVersion()>=WIN_VER_WIN10)
|
if (GetWinVersion()>=WIN_VER_WIN10)
|
||||||
g_SetWindowCompositionAttributeHook=SetIatHook(module,"user32.dll","SetWindowCompositionAttribute",SetWindowCompositionAttribute2);
|
g_SetWindowCompositionAttributeHook=SetIatHook(module,"user32.dll","SetWindowCompositionAttribute",SetWindowCompositionAttribute2);
|
||||||
|
|||||||
@@ -21,5 +21,5 @@ deploy:
|
|||||||
on:
|
on:
|
||||||
APPVEYOR_ACCOUNT_NAME: passionate-coder
|
APPVEYOR_ACCOUNT_NAME: passionate-coder
|
||||||
auth_token:
|
auth_token:
|
||||||
secure: SOu6Y71k0oIxXJR35x+7ZTrqDa3HqUM4kLNJc+DbohPz9zhVHh9O8QYwmI7LI0qslug5L11fo9pZVfVgZttw4eBgooHaX9TNBTTA6sJItkXqMX+M6mKAG7tbI/O3Eg0v
|
secure: SOu6Y71k0oIxXJR35x+7ZeU/+WRW8kaGnCWcbR3OVOd8HeCJwB1Tw3hUJa5EveLGKaGoMKGqAh01Pwc8tWX4xmphZsYYUr09IVjA0+rqgN5VT87CXD6OQxUxBJ7g+9IN
|
||||||
prerelease: true
|
prerelease: true
|
||||||
|
|||||||
Reference in New Issue
Block a user