-
Notifications
You must be signed in to change notification settings - Fork 982
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
Fixing ToolStrip
button background rendering in HC theme
#5614
Fixing ToolStrip
button background rendering in HC theme
#5614
Conversation
src/System.Windows.Forms/src/System/Windows/Forms/ToolStripSystemRenderer.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/ToolStripSystemRenderer.cs
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/ToolStripSystemRenderer.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/ToolStripSystemRenderer.cs
Outdated
Show resolved
Hide resolved
As per @merriemcgaw , we would need this servicing to 6.0 RC2. |
68c662b
to
7bfb681
Compare
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.
Looks good, but please describe testing done. Specifically it is important to test renderers for all possible styles and states of tool strip buttons, checked, CHeckState, and in response to different mouse actions(mouse over, left button down).
Consider adding a test case that enumerates these variations like buttons.cs does to our test app.
src/System.Windows.Forms/src/System/Windows/Forms/ToolStripSystemRenderer.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/ToolStripSystemRenderer.cs
Outdated
Show resolved
Hide resolved
Generally we should write rendering tests, if possible. There are a few example in the codebase, e.g. #4739. Please ping me if you have any Qs. |
75e7e85
to
0bc7e9e
Compare
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.
LGTM.
f625517
to
2d77eb9
Compare
2d77eb9
to
5e45c76
Compare
I have added I fixed it and tested again manually all the cases, looks like now it's good. Issue Description This is happening because I used the same logic for fixing this issue. At the So, if we want to render the background of the button with |
This is unfortunate... But this is an existing bug, we'll wait for external reports before we triage it. Your fix for indeterminate HC makes sense. Thank you for the follow up! |
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.
Looks good
Issue to track rendering tests - #5670 |
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.
Looks good ✔️
Waiting for testing results...
@@ -42,7 +42,7 @@ internal ToolStripRenderer HighContrastRenderer | |||
{ | |||
if (toolStripHighContrastRenderer is null) | |||
{ | |||
toolStripHighContrastRenderer = new ToolStripHighContrastRenderer(/*renderLikeSystem*/true); | |||
toolStripHighContrastRenderer = new ToolStripHighContrastRenderer(/*renderLikeSystem*/systemRenderMode: false); |
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.
toolStripHighContrastRenderer = new ToolStripHighContrastRenderer(/*renderLikeSystem*/systemRenderMode: false); | |
toolStripHighContrastRenderer = new ToolStripHighContrastRenderer(systemRenderMode: false); |
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.
Rendering tests?
…tripHighContrastRenderer
113816f
5e45c76
to
113816f
Compare
Tested this fixing with no new issue found, hitting known GH issue: #5676 |
Rendering tests are tracked by #5670 . |
Fixes #5502
Proposed changes
false
flag is being passed while creatingToolStripHighContrastRenderer
instance atToolStripSystemRenderer
, so after this flag is inverted atToolStripHighContrastRenderer
's constructor, theFillWhenSelected
flag will betrue
(ToolStripProfessionalRenderer
already has the same logic)ToolStripButton
,ToolStripDropDownButton
,ToolStripSplitButton
(ToolStripProfessionalRenderer
already has the same logic)Customer Impact
Before fix
After fix
Regression?
Risk
Test methodology
Accessibility testing
Test environment(s)
Microsoft Windows [Version 10.0.19043.1165]
.NET SDK 6.0.100-rc.1.21416.15
Microsoft Reviewers: Open in CodeFlow