Make it possible to disable Visual Styles for the toolbar (#111)#113
Make it possible to disable Visual Styles for the toolbar (#111)#113craigwi merged 8 commits intomicrosoft:masterfrom
Conversation
|
Neat option to have it dynamically switch; however, I am failing to find a scenario in which you would want to disable the visual styles. Perhaps I'm missing something, and, thus, would love to know your opinion on the value of this. |
|
@NazmusLabs, as it seems in #111, there are people who'd like to have the old-school look of the Winfile without messing with the code. Giving them such an option out-of-the-box would be, in my opinion, a good move. Is it practical? Certainly not. Is it a nice thing to have? Why not. |
|
@thecatkitty Ah, I see |
|
Why toolbar-only then? Would not it be better to have similar application-wide option? Also, I definitely do not understand people who run a visual style they do not like. |
|
@Anixx, of course we could do that, but that would mean one of two things:
About Your second statement, I am not sure if we're talking about the same thing. Since Windows 8 changing or disabling Visual Styles per-system is a very custom and really unsupported thing. Moreover, in the Windows 10 disabling Visual Styles (which is in fact messing with the handles of the Win32 subsystem) makes a half of the interface unusable. |
|
@thecatkitty to my knowledge, it doesn't actually disable Window decorations on Windows 10 or 8. That's because when Desktop Window Manager (Aero) is enabled, it handles the Window boarders, including the titlebar. So on Vista and 7, when Aero is enabled, it doesn't affect the Window boarder. On XP and with Aero disabled on Vista/7, you would get the classic boarders. Thing is, you can't disable Aero (DWM) on Windows 8/10, so it should work with sets and would look fine. Correct me if I'm wrong. |
|
@NazmusLabs, when I disabled Visual Styles of hwndFrame on Windows 10 it gave me the "classic" window borders an title bar too. But I'll keep checking. |
|
@NazmusLabs @thecatkitty if the styles are disabled per application (such as when running the application with manifest which does not support themes or when using compatibility layer), the window decorations are not affected (would be styled as systemwide). |
This depends on when you are disabling the themes: before or after the UWP/Modern engine starts (it is in separate process in Win10). If you disable the themes after it started, you have no styles systemwide (for programs started after disabling), but UWP/Modern/Metro still working. |
|
Unfortunately I am not able to attach a screenshot, because I'm being AFK right now, but when I called SetWindowTheme on hwndFrame, I got a window with unstyled decorations on Windows 10 with every beautifier enabled. I seriously do not consider that a feature. If someone has their Visual Styles disabled systemwide, they'll get everything unstyled, of course. But I think, that if someone wants to get an oldschool look of the Manager in a styled environment, I bet they mean having unstyled client area, not unstyled window. |
I cannot guess what such people may want because if I dislike a style, I change it systemwide. |
|
@Anixx yeah, that's what I was thinking when I write my initial reply. Typically, you don't see apps having an option to enable or disable the visual style, as, traditionally, it was expected that users would pick their favorite style and the app would just adapt. That was the intention, after all. The visual styles API just sets the app's UI controls to use whatever the current OS is using. That being said, Windows 10 doesn't offer a choice of multiple visual styles by default, if you are not counting the High Contrast themes. But the underlying OS still supports it. So if you use something like Windowblinds, you can still take advantage of different visual styles in WinFile. |
|
@Anixx, that's how it looks like when You disable Visual Styles for hwndFrame in Windows 10 with Themes enabled (everything default): I just believe (basing on the evidence in the linked issue) that there are people who'd like to have good old boxed toolbar buttons, that's all. |
|
Wow that's a weird sight, wonder why the border is so large (especially when Win10 has them so thin, if at all, by default) I think we can safely say that's not what people want/expect |
|
@thecatkitty oh, wow that's a rare sight to see. And yeah...I don't think that's what people would want. It just doesn't look right. And I stand corrected about the boarder thing not being applicable with Windows 10's DWM enabled. |
|
Definitely there are methods to untheme only client area. For instance, if one starts Outlook Express under Win8.1 with "no themes" compat flag, only the client area is unthemed. |
|
@Anixx, I wouldn't be very surprised if they just disabled styling on per-control basis. |
|
I think this should be an option that should exist in INI file rather than on the menu. Most toggle options in the menu are those that we might want to change often and bees quick access, such as setting sort order and view nice. I think most people will keep the visual styles on, and those who want to turn it off, will do so once. It is unlikely people will be turning it on and off frequently. So this kind of "set and" forget config would be better off tucked away in a preferences Window or an INI file. Secondly, it appears only enthusiasts or troubleshooters will want to tinker with this option. So it should be left out of sight for most users anyway. Anyone disagree? |
|
@NazmusLabs I think it is a good idea. It isn't going to be a setting to change very often. Creating an Additional preferences dialog would be a good solution. |
|
@thecatkitty 👍 but if we don't want to do that the system menu could be a good place to put it |
|
I think @NazmusLabs suggestion makes sense (winfile.ini only option). That would meaning removing the changes to the menus. Also, @thecatkitty, please separate out any formating / spacing changes so that they don't get included in a PR with functional changes (e.g., changes at top of res.rc). You will also need to resolve the conflicts with winfile.h after res.h was separated out. |
|
Okay, I've resolved conflicts and removed every Visual Style disabling-related interface element. @craigwi, so there's going to be some kind of dialog box for Preferences or it'll be just a manually-edited INI file? |
|
Changes look great. I expect we will have a Preferences dialog in the future. |


I've added a new item into the Options menu which, by using SetWindowsTheme from dynamically loaded
UxTheme.dll(so it should work if we tried to backport to 2000 or older), disables or enables the usage of Visual Styles in the toolbar.Selected setting is, of course, saved in the INI file.