Fix duplicate highlighting in RComboBox dropdown by correcting hover detection#72
Fix duplicate highlighting in RComboBox dropdown by correcting hover detection#72
Conversation
…on state on open Co-authored-by: Jack251970 <53996452+Jack251970@users.noreply.github.com>
|
@copilot It cannot work, if I drop one menu and the highlight item is the first one, and then I move my cursor to the second one. After that, the both items are still highlighted. |
…vent duplicate highlighting Co-authored-by: Jack251970 <53996452+Jack251970@users.noreply.github.com>
Fixed in commit 25f660f. The issue was that the rendering logic checked hover state before selected state, allowing hover colors to override the selected item's appearance. Reordered the conditions to prioritize |
|
@copilot It still cannot work. The highlight item will be more than one. Please resolve this |
Co-authored-by: Jack251970 <53996452+Jack251970@users.noreply.github.com>
Co-authored-by: Jack251970 <53996452+Jack251970@users.noreply.github.com>
Fixed in commits d283d95 and 5b47a9e. The root issue was that hover index calculation didn't account for the dropdown's border height. When the cursor was in the border area or near the top, it incorrectly calculated the first item as being hovered. Now the calculation subtracts |
Summary
Fixed duplicate highlighting bug in RComboBox dropdown where multiple items would appear highlighted simultaneously.
Root Causes:
Solutions:
animatedIndex,previousAnimatedIndex,hoverProgress) inRComboBox_DropDownwhen dropdown opensOnDrawItemconditions to checkisActuallySelectedFIRST, ensuring selected items always show selected colorSystemInformation.BorderSize.Heightfrom the Y position before dividing by item heightrelativeY >= 0, preventing cursor in border area from triggering false hover detectionResult:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.