rikka0w0 / ExplorerContextMenuTweaker

Restore the style of context menu in explorer window and open/save file dialog back to classic style (for 1809 and above)
39 stars 9 forks source link

Feature drop shadow ? #9

Open innuendo33 opened 4 years ago

innuendo33 commented 4 years ago

Hi

I was wondering if it be possible to implement a drop shadow to destop context menu like y'z shadow in the past ( native one is too thin ) https://appaholic.wordpress.com/2007/10/26/yz-shadow-drop-shadow-on-every-window-for-windows/ yzshadow

Would it be difficult to allow that in dlls ?

Thanks

rikka0w0 commented 4 years ago

Sounds interesting, I will have a look at that

innuendo33 commented 4 years ago

Thanks Rikka for interest , I think it should be doable with your skill to achieve something like that and to use with the already context menu hack you did . Not only aesthetic effect but I find it useful to emphase windows / menus active or inactive with such drop shadow and easier to distinct at first sight .

Something more like that is more visible than native shadows when enabled in windows system performance tab .

Snap2

Microsoft has some doc about drop shadow for context menu ? https://docs.microsoft.com/en-US/dotnet/api/system.windows.controls.contextmenu.hasdropshadow?view=netcore-3.1

Hope you can make it :)

Regards

rikka0w0 commented 4 years ago

It is much harder than you can imagine. First of all, the link you provide is only valid for dotnet applications. In Windows, dotnet and other native applications use the lower level Win32 API to draw menus. We have to somehow make a global hook and install it on the menu drawing function. The menu you post in the image is not a Win32 "menu", it is more like a UWP window, which is not affected by the Win32 rendering system... But after all, menus including the one you post are windows. If we can somehow hook into the window creation function globally then we can selectively add shadows to those windows. Still, very hard.

innuendo33 commented 4 years ago

oh yes the screen is showing modern jumplist on taskbar ( windows 2004 ) , it was an example of how it would be nice to get the same ( horizontal / vertical offsets for shadowing menus)

Somehow windows can enable or disable little shadow offset in system/ advanced settings/ performance ) display shadow under windows and it also affects classic context menus . I was wondering where can we increase the offset which is too thin .It should be located somewhere and with your already working injected dlls for desktop which restore classic context menus maybe something light to add there ?

A pity I can't test y'z shadow to figure how effect looks really on menus compared to native ones:/ I can imagine how hard it must be otherwise I think someone would have worked on it

innuendo33 commented 4 years ago

PS: an explicit video ( 01:22 ) showing context menu shadow with y'z running https://www.youtube.com/watch?v=HMhJEAM3hig