-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Issue 2053861 fix combo box flickering issue #11529
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
Issue 2053861 fix combo box flickering issue #11529
Conversation
…extBoxBase_Copy_PasteNotEmptyWithHandle_Success"
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #11529 +/- ##
===================================================
+ Coverage 74.39859% 74.46985% +0.07125%
===================================================
Files 3032 3039 +7
Lines 628149 629068 +919
Branches 46828 46836 +8
===================================================
+ Hits 467334 468466 +1132
+ Misses 157465 157242 -223
- Partials 3350 3360 +10
Flags with carried forward coverage won't be shown. Click here to find out more. |
|
This link - https://devdiv.visualstudio.com/DevDiv/_queries/edit/2053861/?queryId=7c94b3b5-6b84-4f3d-9f76-ff1a7a7b7581 does not work, please fix it. Had you tested this change at different themes and RtL applications? The change looks reasonable. |
Updated the link of the description and test in different environment There are still a flickering in Flat Style, and this flickering issue can be resolved by remove winforms/src/System.Windows.Forms/src/System/Windows/Forms/Controls/ComboBox/ComboBox.cs Line 3880 in 889fca6
But I am not sure if we can remove this directly, @Tanya-Solyanik What do you think? |
|
@LeafShi1 - How do the high contrast themes look before your changes, did it get better or worse with the fix? |
|
This is definitely not worse from my perspective. @Tanya-Solyanik? |
...System.Windows.Forms/src/System/Windows/Forms/Controls/ComboBox/ComboBox.FlatComboAdapter.cs
Outdated
Show resolved
Hide resolved
The new behavior looks more intentional, i.e. we are adding a border when mouse is hovering. I don't mind taking this fix. |
|
@Olina-Zhang - could you please test this fix? |
No, we shouldn't do that. I agree. To fix that we would have to redesign the control look, maybe add a prominent border in the state when the mouse is not above the control |
@Tanya-Solyanik Do we need to redesign the controls appearance now? Before drawing Flat, the combobox control is as follows. The method of drawing Flat is to draw Outboder and innerBorder. The result after drawing is as follows When the cursor enters, it is necessary to complete the drawing from Pic1 to Pic2,the actual cause of the flickering is the use of g.DrawRectangle four times in a row when drawing the Flat type. So adding a protruding border when the mouse is not over the control does not seem to solve the flickering problem |
ricardobossan
left a comment
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.
All LGTM
No |
|
Verified this issue on 9.0.100-preview.7.24371.4 with dlls built from winforms repo of main branch, it was fixed. Flickering effect is no longer there when hovering over ComboBox. Results are as below: PopupStyle Popup.mp4FlatStyle Flat.mp4Different Themes Desert.mp4Dusk.mp4Night.mp4Aquatic.mp4 |
|
Verified this PR fixing in .NET 9.0.100-preview7.24402.8 test pass build from provided VS VAL build, it was fixed for ComboBox flickering issue when setting this control's FlatStyle == PopUp. But still repro for ComboBox's FlatStyle == Flat case. These are same as the testing result we tested before. ComboBox_flickerFixing.mp4 |








Fixes #2053861
Proposed changes
DrawPopUpCombofromDrawFlatCombomethod,draw the outer black border only when the ComboBox mouse is overCustomer Impact
Regression?
Risk
Screenshots
Before
Combo box flashes when you move the mouse over it

After
Combo boxes no longer flicker when you move the mouse over them

Test methodology
Test environment(s)
Microsoft Reviewers: Open in CodeFlow