Closed Syareel-Sukeri closed 1 month ago
Give a screenshot of expected result and actual result:
In order to make the combo button look thinner, ToolStripComboBox was redrawn based on the original ComboBox. The original button was drawn in two parts (_dropDownRect and _whiteFillRect), and PR #11529 canceled the redrawing of the entire comboBox when the mouse hovered to solve the flickering problem, which caused this problem.
There are two solutions
When the target control is ToolStripComboBox, revert the changes of PR #11529, but this will redraw the entire comboBox when the mouse hovers, it will cause flickering.
No longer redraw the ToolStripComboBox, so that its appearance is consistent with the normal ComboBox
I submitted a PR #11761, commit1 adopted solution 1, and commit2 adopted solution 2
What modification do you think is more appropriate? Please give me some suggestions
@Tanya-Solyanik
@LeafShi1 - changing width of the DropDown button in ToolStripComboBox will be a breaking change as it will leave less room for the content and somebody's text will get truncated. Unfortunately we should partially revert the "flickering fix", i.e. go with commit 1
Verified this issue in the latest .NET 9.0.100-rc.1.24407.33, it was fixed: No additional blue hover effect appears outside the icon.
https://github.com/user-attachments/assets/c79068b0-5a75-4021-a533-30ca3eba4f1e
Verified the issue with .NET 9.0.100-rc.1.24422.10 test pass build that the issue has been fixed, which have the same results as above.
.NET version
9.0.100-preview.7.24371.4 with dlls built from winforms repo of main branch. It cannot be reproduced with .NET SDK.
Did it work in .NET Framework?
No
Did it work in any of the earlier releases of .NET Core or .NET 5+?
Yes, this is a regression issue. Not reproduce on .NET 8.0
Issue description
When hovering over drop-down arrow of ToolStripComboBox, an additional blue hover effect appears outside the icon. This issue can only be reproduced with ToolStripComboBox which is in ContextMenuStrip, ToolStrip, MenuStrip. The issue cannot be reproduced with normal ComboBox.
https://github.com/user-attachments/assets/65127428-e7df-4c92-878d-def027ca0be6
Steps to reproduce