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

Corrected tooltip foreground #2128

Merged
merged 2 commits into from
Oct 9, 2024

Conversation

MistaOmega
Copy link
Contributor

@MistaOmega MistaOmega commented Oct 4, 2024

Closes #2123

Just a foreground mismatch.
Another issue with the style-inheritance, like seen on #1822 i think

image

@@ -41,7 +41,7 @@
Height="44"
x:Name="ApplyButton">
<ToolTip.Tip>
<TextBlock Text="{x:Static resources:Language.ApplyControlView_Apply_ToolTip}" />
<TextBlock Text="{x:Static resources:Language.ApplyControlView_Apply_ToolTip}" Foreground="White" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are using a set of color aliases found in src/Themes/NexusMods.Themes.NexusFluentDark/Resources/Palette/Colors/ElementColors.axaml for the colors.
We want to avoid using hardcorded colors like "White" or "Red" to allow us to change them from the theme all throughout the app easily.

In this case the easiest way to get what we want is to just apply the "ForegroundStrong" style class to the TextBlock, which will in turn apply NeutralStrong as the foreground color.

Suggested change
<TextBlock Text="{x:Static resources:Language.ApplyControlView_Apply_ToolTip}" Foreground="White" />
<TextBlock Text="{x:Static resources:Language.ApplyControlView_Apply_ToolTip}" Classes="ForegroundStrong" />

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I tried this initially to no avail.

I'll have to look in to why that's happening, it's why I ended up settling for forcing it to white

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As an alternative you can set it like this:

Suggested change
<TextBlock Text="{x:Static resources:Language.ApplyControlView_Apply_ToolTip}" Foreground="White" />
<TextBlock Text="{x:Static resources:Language.ApplyControlView_Apply_ToolTip}" Foreground="{StaticResource NutralStrong}" />

@MistaOmega MistaOmega requested a review from Al12rs October 9, 2024 10:09
@Al12rs Al12rs merged commit bb4ef0b into Nexus-Mods:main Oct 9, 2024
11 checks passed
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.

Hover tooltip on Apply button does not match other styles
2 participants