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

High Contrast #1018

Open
ClemensInBerlin opened this issue Apr 4, 2022 · 6 comments
Open

High Contrast #1018

ClemensInBerlin opened this issue Apr 4, 2022 · 6 comments

Comments

@ClemensInBerlin
Copy link

Labels in highlighted elements in high contrast are badly readable.

Desert

Currently there is no highlight color for lables.

Environment

  • Fluent.Ribbon 9.0.4
  • Windows 11
  • .NET Framework 5
@batzen
Copy link
Member

batzen commented Apr 4, 2022

Which theme are you using? Fluent.Ribbon does not ship any high contast themes.

@ClemensInBerlin
Copy link
Author

We are using custome themes and one theme is for High Contrast.
In this theme we use System colors (i.e: SystemColors.ActiveCaptionColor).
We use a registry hooks and a resource dictionary inspired by the SkinResourceDictionary from Michael's Coding Spot.

@batzen
Copy link
Member

batzen commented Apr 6, 2022

Ok.
Currently you have to do this yourself by using a custom style and change the foreground inside a style trigger.
The base style key for the Button is RibbonButtonStyle, but you will most likely have to apply that to all controls which is unfortunate and might also require changes to the templates of some control, which makes it even more work.
So i would advise against doing so and wait for a proper solution from my side.

The only workaround i can offer you right now is to not use opaque colors in places where i causes issues.
You can either brighten those colors a bit or add some level of transparency.

In a future version the foreground color will be automatically calculated and set to a value that is best visible on the current background.
I am currently working on getting this to work, then have to apply that to all controls and make sure i don't introduce any performance issues by doing so.

@batzen
Copy link
Member

batzen commented Apr 6, 2022

It would also be nice if you could share your current high contrast theme (at least the example from the screenshot) so that i can make sure that everything works as expected when i finish my implementation of calculated foreground colors.

@batzen
Copy link
Member

batzen commented May 5, 2022

ping @ClemensInBerlin

@ClemensInBerlin
Copy link
Author

Sorry, we are just finishing the next release of our application.
We create an own resource dictionary for the high contrast.
We figured out that in some cases the highlight color is too dark or too bright.
Therefor we have six brushes we have own colors and do not use the system colors.
Here is our system dictionary
HighContrastFluentStyle.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants