-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
fix ExListView group header collapse-expand button #5428
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5428 +/- ##
==========================================
- Coverage 35.35% 35.33% -0.02%
==========================================
Files 604 605 +1
Lines 45977 45996 +19
Branches 6273 6279 +6
==========================================
- Hits 16256 16254 -2
- Misses 28973 28994 +21
Partials 748 748 |
GitUI/UserControls/ExListView.cs
Outdated
bool IsCustomDraw(Message msg) | ||
{ | ||
var nmhdr = (NativeMethods.NMHDR)msg.GetLParam(typeof(NativeMethods.NMHDR)); | ||
bool isCustomDraw = nmhdr.code == -12; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this magic "-12" number?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I was wandering it myself, when I saw it :) Some 15 minutes of googling did not help me find any page with numeric values for nmhrd.code constants.
I will try again, maybe this time I'll have more luck.
-12 was there before the PR, I only moved it to a separate method to make switch-case more compact.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://www.pinvoke.net/default.aspx/Constants.NM_
public const int NM_CUSTOMDRAW = NM_FIRST - 12;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thank you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[EDIT] retracting the review
@RussKie I successfully reproduced both issues on current master build. To be more specific:
Result: both issues 1, 2 reproduced Note: step 4 is optional. collapse / expand does not have to do with the issues at all. |
Hmm, I stand corrected, thank you for checking it. |
Please rebase and I'll get it merged. Thank you |
previously only double-click could collapse-expand group
rebase done |
Fixes #5427
Fixes #5332 (not clickable part)
Fixes #4886
Has been tested on