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

[Feature] Option to overwrite OS setting 'show hidden files' #285

Closed
dao-net opened this issue Jan 6, 2022 · 5 comments
Closed

[Feature] Option to overwrite OS setting 'show hidden files' #285

dao-net opened this issue Jan 6, 2022 · 5 comments
Assignees
Milestone

Comments

@dao-net
Copy link

dao-net commented Jan 6, 2022

I am now using your great SystemTrayMenu as a substitute for shortcuts bars in the taskbar since I upgraded to Windows 11. The directory I had configured to show up as a shortcut bar is now rendered by SystemTrayMenu. I have lots of hidden files and dirs in there because I am using (and keeping in sync) this directory using a git repo. The behavior in Windows 10 was that files and directories marked with the OS attribute "hidden" would not show up. Therefore I was able to use the same directory on multiple machines and independently hiding all the items that were not applicable on a machine (e.g. where the application in case of a shortcut is not installed, a drive not mounted or a directory not present). The OS file attributes do not get persisted in the underlying git repository. I expect SystemTrayMenu to be sensitive to the attributes and to hide hidden files or directories from the menu.

However I do not see this behavior in version 1.2.0.0 (latest from the app store as of today) on my Windows machine (version 21H2 Build 22000.376; my Windows explorer is configured to show hidden files and directories but they get displayed translucent) as you can see in this screenshot:

screenshot hidden files and dirs

I noticed that the icon of the hidden directory has a strange gray background and looks semi-transparent. The icon of the hidden file does not seem to be different from the icon of the file which is not set to be hidden.

Please let me know, if there is a related setting I overlooked.

@dao-net dao-net changed the title Files and directories with the OS attribute/flag "hidden" get displayed in the menu like regular items [BUG] Files and directories with the OS attribute/flag "hidden" get displayed in the menu like regular items Jan 6, 2022
@Hofknecht
Copy link
Owner

@dao-net thank you for reporting the issue!

The idea that your root directory with e.g. synchronizing a cloud with another computer and thus being able to set hidden flags independently is pretty cool.

  1. The gray background also seems to be incorrect, which is probably due to the way we combine the White50PercentageIcon with AddIconOverlay. But we cannot reproduce that and we are not sure whether this only occurs on windows 11. We need to investigate further.

  2. We can reproduce that the icon for hidden files is not shown transparent:
    2022-01-06 15_29_23-Window
    We'll fix that.

But we can not reproduce that hidden files are shown in STM, when the related windows option is activated:
2022-01-06 15_29_56-Window

(we have just tried again and the portable and windows store version behave the same here)

  1. The option to show or not to show hidden files, folders and drives is currently only possible via Windows settings.
    Remember that sometimes the Windows dialog for these settings needs to be restarted for the options to take effect, and STM also needs to be restarted for us to read the Windows option again.
    Is it enough for you to set this via the Windows option or do you want to be able to set a different behavior especially for the STM? e.g. with a checkbox in settings called "Always hide when the hidden flag is set, regardless of the windows setting"?

@dao-net
Copy link
Author

dao-net commented Jan 7, 2022

Thanks for your investigation. Related to:

  1. I have tested only on Windows 11 and as you can see I have activated the light theme, so maybe the effect just does not show up in dark theme mode (like your screenshots prove at least in the case of directories).

  2. I have the "Show hidden files, folder, and drives" options activated in the Windows File Explorer Settings and I didn't play with that since I am happy to see my hidden file and dirs being displayed as semi-transparent in Windows Explorer.

  3. I would like to configure the appearance in Windows Explorer and in STM independently. In STM I think it makes sense to have a dropdown with the options "Same appearance for hidden and regular files/dirs", "Show hidden files/dirs semi-transparent" and "Do not display hidden files/dirs" – however please elaborate further on the wording :) For my personal requirements a checkbox in the settings with "Always hide when the hidden flag is set, regardless of the windows setting" would actually be enough - that is true.

@Hofknecht
Copy link
Owner

(2.) fixed with: [BUG] Fix hidden files not shown transparent, version 1.2.0.10 6d28822
(1.)It may also solved with this commit I had a line on the right and at the bottom of the file in the same color as in your screenshot. This was fixed with a small change. So we'll see when this change is released, you could try it again and if it still occurs we'll create a new issue for this.

(3.)Then only the main point is missing , @topeterk suggested:
X OS Setting "Hidden files and folders"
O Never show hidden files, folders or drives"
O Always Show hidden files, folders or drives"

@Hofknecht Hofknecht self-assigned this Jan 7, 2022
@Hofknecht Hofknecht added this to the 1.3 milestone Jan 7, 2022
@Hofknecht Hofknecht changed the title [BUG] Files and directories with the OS attribute/flag "hidden" get displayed in the menu like regular items [Feature] Option to overwrite OS setting 'show hidden files' Jan 7, 2022
Hofknecht added a commit that referenced this issue Jan 7, 2022
@Hofknecht
Copy link
Owner

Find the new option here:
2022-01-07 15_50_17-Window

-created new tabpage 'Size and Location' to have more space in 'Advanced' for this new option
-fixed a issue that if icon of hidden file was not yet in cache when open the menu then it failed to set it transparent (first time you open a folder)

we will release in some days.

Thank you @dao-net, we added you in the thank you section in the readme and in the about menu : )

if something of that points or others does not work in the new version, you are welcome to open an new issue.

FYI here is our new related testfolder
2022-01-07 15_56_36-Window

closed

@Hofknecht
Copy link
Owner

(with the commit 2659d19 fixed also a issue that when root folder empty at startup, that it was not possible to start the menu anymore, because mainpreload variable was not reset to false)

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

No branches or pull requests

2 participants