mirror of
https://github.com/ONLYOFFICE/desktop-apps.git
synced 2026-04-07 14:09:22 +08:00
[win] fix icon background in OpenWith menu for Win10
This commit is contained in:
BIN
win-linux/extras/projicons/res/icons/menu.ico
Normal file
BIN
win-linux/extras/projicons/res/icons/menu.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 43 KiB |
@ -31,6 +31,7 @@
|
||||
#define IDI_ICON31 131
|
||||
#define IDI_ICON32 132
|
||||
#define IDI_ICON33 133
|
||||
#define IDI_ICON34 134
|
||||
|
||||
#define IDS_DOCX 1000
|
||||
#define IDS_XLSX 1001
|
||||
|
||||
@ -34,6 +34,7 @@ IDI_ICON30 ICON DISCARDABLE "./res/icons/fb2.ico"
|
||||
IDI_ICON31 ICON DISCARDABLE "./res/icons/dotx.ico"
|
||||
IDI_ICON32 ICON DISCARDABLE "./res/icons/oxps.ico"
|
||||
IDI_ICON33 ICON DISCARDABLE "./res/icons/xlsb.ico"
|
||||
IDI_ICON34 ICON DISCARDABLE "./res/icons/menu.ico"
|
||||
|
||||
#include <windows.h>
|
||||
#include "src/version.h"
|
||||
|
||||
@ -2169,6 +2169,7 @@ var
|
||||
ext, progId1, progId2: string;
|
||||
argsArray: TArrayOfString;
|
||||
cleanExts, extensionInfo: TArrayOfString;
|
||||
version: TWindowsVersion;
|
||||
prefix, str: string;
|
||||
begin
|
||||
isFullAssociation := CheckCommandlineParam('/FULLASSOCIATION');
|
||||
@ -2176,6 +2177,7 @@ begin
|
||||
initExtensions();
|
||||
end;
|
||||
|
||||
GetWindowsVersionEx(version);
|
||||
for i := 0 to GetArrayLength(AudioExts) - 1 do
|
||||
begin
|
||||
Explode(argsArray, ExtensionRegistryInfo[i],':');
|
||||
@ -2188,6 +2190,9 @@ begin
|
||||
RegWriteStringValue(HKEY_LOCAL_MACHINE, 'Software\Classes\' + argsArray[0], 'AppUserModelID', ExpandConstant('{#APP_USER_MODEL_ID}'));
|
||||
RegWriteStringValue(HKEY_LOCAL_MACHINE, 'Software\Classes\' + argsArray[0] + '\DefaultIcon', '', ExpandConstant('{app}\{#iconsExe},' + argsArray[2]));
|
||||
RegWriteStringValue(HKEY_LOCAL_MACHINE, 'Software\Classes\' + argsArray[0] + '\shell\open\command', '', ExpandConstant('"{app}\{#iconsExe}" "%1"'));
|
||||
if (version.Major = 10) and (version.Minor = 0) and (version.Build < 22000) then begin
|
||||
RegWriteStringValue(HKEY_LOCAL_MACHINE, 'Software\Classes\' + argsArray[0] + '\Application', 'ApplicationIcon', ExpandConstant('{app}\{#iconsExe},33'));
|
||||
end;
|
||||
//end;
|
||||
|
||||
ext := LowerCase(AudioExts[i]);
|
||||
|
||||
Reference in New Issue
Block a user