dremin / RetroBar

Classic Windows 95, 98, Me, 2000, XP, Vista taskbar for modern versions of Windows
Apache License 2.0
2.81k stars 262 forks source link

[Feature Request]: Show hidden tray icons in pop-up above taskbar #910

Open GaryM99 opened 2 months ago

GaryM99 commented 2 months ago

dremin,

This requested feature strays from your faithful emulation of the "retro" taskbars of the past, but it adds one of the most useful changes Microsoft has made to their modern taskbars, and it can be added to RetroBar as a non-default option. When temporarily showing the icons in the hidden portion of the notification tray, the expansion used to be horizontal (as it is with RetroBar), thereby temporarily compressing the space allotted to the taskbar buttons for running programs. At some point, Microsoft introduced the vertical pop-up for this display so the ordinary taskbar buttons are unaffected, and the show/hide toggle button remains in a static location rather than moving with the expansion/contraction.

I'm not a C# programmer, so I can't submit the actual code, but I think this won't be very difficult. I read one of your earlier posts where you revealed that the way RetroBar shows the Start Menu is by simulating a WinKey keystroke. That struck me as a very clever way to simplify how RetroBar interfaces with the OS, and my feature request can be implemented in much the same way. I created a simple proof-of-concept script using the free "NirCmd" utility from NirSoft to simulate the necessary keystrokes, much like you do in RetroBar C# code. The keystrokes for showing the modern Windows pop-up of hidden tray icons are (WinKey)+B followed by (Enter), and here is the entire visual basic script that uses NirCmd to insert those keystrokes and display the hidden tray icons...

Set WinShell = WScript.CreateObject("WScript.Shell")
WinShell.run Chr(34) & "C:\Program Files\NirCmd\nircmd.exe" & Chr(34) & " sendkeypress 0x5B+B 0x0D", 0

Here is a screenshot showing the current horizontal expansion of the hidden tray... Screenshot 2024-09-02 123218

Here is a screenshot showing my proposed optional pop-up expansion of the hidden tray... Screenshot 2024-09-02 123428

Interestingly, executing the same script while the pop-up is showing makes it hide again (as does the ESC key). The one thing I wasn't able to include in my rough implementation is the new up/down arrow icons you would want to replace the current left/right arrow icons for the show/hide functions. My suggested replacements for those are all contained in the Windows "comdlg32.dll" file. Icon 15 is a down-black arrow, icon 16 is up-black, icon 17 is down-white, and icon 18 is up-white.

For including this option in the RetroBar properties dialog, I would suggest another checkbox below the current "Collapse notification area icons," indented (and possibly greyed out) to show that it is a sub-option to the "Collapse" option. The text for this sub-option could be "Show hidden tray icons in pop-up" or something similar. Users will quickly figure it out.

When I upgraded (???) to Windows 11 recently, I quickly came to loathe the new taskbar. Like "one size fits all" stretch pants, the Windows 11 taskbar may be marginally usable, but the look really leaves a lot to be desired. Thanks very much for creating RetroBar, with its tighter icon spacing and very granular resizing adjustments. Whether or not you include my suggestion in a future release, RetroBar is a huge improvement for me, and seems to be architected in a way that makes it resistant to being broken by normal Windows updates. Your profile says you enjoy making cool stuff. Mission accomplished!

GaryM99 commented 2 months ago

I just noticed something strange and a little disturbing. One of the program icons in my notification tray (VeraCrypt), marked as hidden in both Windows 11 and RetroBar settings, doesn't show in the pop-up created by this standard Windows keystroke combination, yet it shows as it should in the current horizontal expansion of the RetroBar's hidden tray. So if my suggestion is implemented, that icon would never be accessible unless I set its behavior to "always show" in RetroBar so this anomaly in the hidden tray collection becomes irrelevant. In this case, the Windows 11 tray icon hidden setting for VeraCrypt should control its inclusion in the Windows pop-up but doesn't. I can't predict what other icons might be excluded from this supposedly standard Windows function. Sorry I didn't catch this sooner.