Repository navigation
Enhancement: Configurable middle-click actions for the tray icon - #124
Merged
G-Stas merged 11 commits intoOct 31, 2026
Merged
Conversation
Introduces a new setting to customize the middle-click behavior on the tray icon. Users can choose to do nothing (default), toggle mute on the default device, or cycle through available output devices. Includes UI integration in the General settings page and unit tests for the device cycling logic.
Two quick middle clicks both switched to the same device: DefaultDevice only changes once Windows reports the switch. The dead null check on ActiveDevices and the index loop are gone.
MasterSessionModel.ToggleMute is used by the mute hotkey and the middle click; the wheel and the middle click pick their device and show the OSD through TrayTargetMaster and NotifyIfHidden.
EnumNameConverter takes the resource key prefix as its parameter and replaces ThemeNameConverter and TrayMiddleClickActionConverter.
The General page names the actions in the UI language, the choice survives a restart, and a middle click on the tray icon mutes and unmutes the default device (OSD only when on and the mixer is closed; Do nothing changes nothing).
Conflicts: the resx files (main's mixer routing strings and the middle-click strings both added at the end: kept both), the tray icon switch replaced by TrayIconKind on main (the middle-click action sits next to it), and main's own EnumNameConverter (main's comment kept).
Owner
|
Added some things before merging:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces a small quality-of-life feature: the ability to customize what happens when middle-clicking the Volumey tray icon.
By default, it does nothing (preserving current behavior), but users can now configure it in the General settings page to either:
Here is how the new option looks in the settings:
Technical details:
TrayMiddleMouseDownnative event fromH.NotifyIcon.TrayMiddleClickActionenum to the settings architecture, wired to the UI via a new converter (TrayMiddleClickActionConverter) for full localization support (translations included for all languages).ActiveDeviceslist and skips execution safely if 1 or 0 devices are available.NotificationServicelogic without needing new UI hooks.DeviceProviderViewModelTestscovering the device cycling and edge cases.Let me know if anything needs adjustment! Or feel free to change anything on top of my branch.