Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Support] add borders / shadows to all windows (active/inactive/borderless) #50

Closed
igpit opened this issue May 3, 2021 · 5 comments
Closed
Labels

Comments

@igpit
Copy link

igpit commented May 3, 2021

on my quest to add back a window border to all windows (some are borderless now) and also to inactive windows, i stumbled across this tool. looking around in the opened aero.msstyles i feel a bit overwhelmed and not sure how / where i could change settings to achieve my goal.

could you give some pointers which properties to change?

some windows are borderless now, that is really a problem in dark mode, when you do not see where windows overlapping each other end. i used process hacker to identify some classes drawing windows which do not have borders, e.g. "Chrome_WidgetWin_1" from MS teams and "UnrealWindow" from Epic Games Launcher. those should be affected in the end as well.

stardock's curtains is AFAIK currently the only tool working on win 10 able to achieve this, but ofc i would love to get a solution without extra software running in the background. curtains allows to set shadow with some color and opacity around windows - which then acts as a border.

the aero.msstyles is referened by the aero.theme file. so you would also need to create theme file to reference your own msstyles file and place it in the Themes folder? do you need to adjust file ownership to TrustedInstaller?

also, some way to set the background color for all windows not honoring the dark mode would be nice (mmc, control panel, regedit, task manager, ... )

thanks for any tips or pointers to more documentation!

@nptr
Copy link
Owner

nptr commented May 6, 2021

The appearance of the windows including borders is defined in the DWMWindow class. You will see it contains a lot of properties, like LEFTFRAME, LEFTSHADOW, BUTTONMAXGLYPH192 etc. Basically components a window can have. The properties don't hold much information in this case. They just reference a section in the image atlas. The image atlas has all the visual information and you'll most likely want to change things in there. See the screenshot below to get a general idea:
dwmwindow

  • The screenshot is slightly wrong. I highlighted LEFTFRAME but the image shows LEFTSHADOW. Sorry.

It is meant that you export the image atlas, locate the properties you want to change and change them in an image editor of your choice. When done, import the image atlas again and save the style.

@nptr
Copy link
Owner

nptr commented May 6, 2021

The .theme files you see, are just tying things together. This can be the mouse cursor style, wallpaper and some system icons.
Its just a text file. Open it up and see yourself.

To create a completely new style, you can copy aero.theme and the Aero folder. Rename them. Then fix the path in the .theme file so that it refers to the new folder and its .msstyles file. ( its in the [VisualStyles] section ). You basically duplicated the aero design. Edit the new .msstyles file as you like. Its not necessary to set any special file permissions or assign ownership as far as i know. You only need a patched uxtheme.dll in order for Windows to load unsigned .msstyles => UltraUXThemePatcher

@nptr
Copy link
Owner

nptr commented May 6, 2021

Also important, create a system restore point before messing around to much! You never know if you need it.
As for documentation..i don't have any. You'll have to search different modding communities or learn by trial and error.
It might seem because I created this tool I'd know, but that's not how it works ;) For the dark mode ignoring windows for example I've no idea. Maybe you can change it somewhere, but if the program draws the background itself and ignores the system settings, then its not possible.

I hope i could help!

@igpit
Copy link
Author

igpit commented May 19, 2021

thanks for the detailed answer. sadly i did not have time yet to test things. i will report back once i did.

having this "issue" closed is fine, but other people might have a hard time finding your valueable information.

@nptr
Copy link
Owner

nptr commented May 20, 2021

Thanks! Yes, I know. I am planning to create a small tutorial/documentation on how to change the most common things.
Since I am not actively modding (time issues mostly), I hope to rely on the community a bit to provide information or even usable chunks of documentation. Editing, layouting, hosting, releasing etc. would be done by me then.

If you feel like contributing, either share your findings here (in a free form) or in this separate issue in a more refined format.
Things discussed in issues like this will of course be considered as well, but the less digging the better :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants