feat : add new feature doubleClick LMB, context menu RMB update : Demo project update, add pseudo animation#5
Open
anomal3 wants to merge 1 commit intoBip901:mainfrom
Open
feat : add new feature doubleClick LMB, context menu RMB update : Demo project update, add pseudo animation#5anomal3 wants to merge 1 commit intoBip901:mainfrom
anomal3 wants to merge 1 commit intoBip901:mainfrom
Conversation
update : Demo project update, add pseudo animation
Bip901
requested changes
Apr 3, 2026
Owner
Bip901
left a comment
There was a problem hiding this comment.
I have confirmed that the double click event works. However:
- The tooltip does not appear for me when hovering over the icon. I'm testing on Windows 11.
- Note to self: need to recompile for Linux, since the tray struct has changed.
| @@ -1,7 +1,7 @@ | |||
| cmake_minimum_required(VERSION 3.0.0) | |||
|
|
|||
| cmake_minimum_required(VERSION 3.5.0) | |||
Owner
There was a problem hiding this comment.
Any specific reason to raise the minimum?
| return HeapAlloc<Tray>.Copy(tray); | ||
| } | ||
| } | ||
| } No newline at end of file |
| Icon = icon; | ||
| } | ||
| } | ||
| } No newline at end of file |
| string iconPath, | ||
| IReadOnlyList<MenuItem> menuItems, | ||
| string? tooltip = null, | ||
| Action<NotifyIcon>? onDoubleClick = null) |
Owner
There was a problem hiding this comment.
I don't think that the Create method should accept a delegate. Users can simply subscribe to the DoubleClick event themselves using the returned NotifyIcon instance.
| nid.hIcon = icon; | ||
| nid.uFlags |= NIF_TIP; | ||
| if (tray->tooltip != NULL) { | ||
| wcscpy_s(nid.szTip, sizeof(nid.szTip) / sizeof(WCHAR), (LPCWSTR)tray->tooltip); |
Owner
There was a problem hiding this comment.
Use _TRUNCATE to prevent crashes if the tooltip is too long, and _countof instead of calculating manually
Suggested change
| wcscpy_s(nid.szTip, sizeof(nid.szTip) / sizeof(WCHAR), (LPCWSTR)tray->tooltip); | |
| wcsncpy_s(nid.szTip, _countof(nid.szTip), (LPCWSTR)tray->tooltip, _TRUNCATE); |
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.
No description provided.