Link stats label fix for light themes #2943
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With light themes, the link stats label has a dark box behind it, rendering it unreadable.
It has
bgdark
hard coded in itsImage
property. This has to be done because the theme manager overwrites the BackColor to the theme background color.My question is, why does the theme manager force a background color onto labels and linkLabels like this instead of leaving the background transparent? Forcing a background color protects them from becoming invisible if placed on top of some other control that has a non-contrasting color to, or same color as, the theme's text color. However, I checked every instance of a linkLabel that I could find in the code and don't think that is necessary. Every link label I found was placed over something that was background-colored, meaning a transparent background should be safe.
There's always a chance I'm missing something though, and this could break something.
The safer, but uglier, fix is to specifically handle retheming this specific link's background image within the MainMenu_ItemClicked function. I'd like to avoid that though if we can agree that transparent backgrounds are safe.