Skip to content
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

Link stats label fix for light themes #2943

Merged
merged 2 commits into from
Oct 4, 2022

Conversation

robertlong13
Copy link
Collaborator

@robertlong13 robertlong13 commented Sep 11, 2022

With light themes, the link stats label has a dark box behind it, rendering it unreadable.

image

It has bgdark hard coded in its Image 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.

@meee1 meee1 merged commit bc9ed6a into ArduPilot:master Oct 4, 2022
@robertlong13 robertlong13 deleted the label_theme_fix branch February 28, 2023 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants