Differentiating High Contrast Dark vs Light #400
Replies: 3 comments
-
All the themes are mutually exclusive. HighContrast does not have Light/Dark subvariants as it is implemented. HighContrast is HighContrast. Other theme variants would need to be added I think such as HighContrastLight or HighContrastDark, etc. Windows has many it seems: https://learn.microsoft.com/en-us/windows/apps/design/accessibility/high-contrast-themes |
Beta Was this translation helpful? Give feedback.
-
@robloo Is correct above, there is only "HighContrast" theme. On Windows 10 and all other platforms, there is only one HighContrast theme, based on the default Windows HC colors. On Windows 11, there is still just HighContrast theme but there are a couple color variations they've added. This is automatically handled by FluentAvaloniaTheme by querying the colors to match the system so it doesn't feel out of place but the theme still remains HighContrast. The thing about HC theme not working for preview5 has long been fixed. The thing about colors only updating after interacting is a bug that happened in the MediaContext refactor upstream for rc1. Don't know when that will get fixed. |
Beta Was this translation helpful? Give feedback.
-
I haven't ran Windows 10 in some time but according to this article and this article it seems that Windows 10 has 4 HighContrast theme variations available. But it's good to know at least that the Windows 11 High Contrast theme color matching is done by FA. |
Beta Was this translation helpful? Give feedback.
-
I'm not sure if this is a FluentAvalonia specific thing or not, I believe it's probably just an Avalonia thing but I figured I'd ask here anyway just in case anyone happens to know.
Basically, on
ActualThemeVariantChanged
I want to pass that information to another app, but if the System Theme gets set to High ContrastActualThemeVariant
just returnsHighContrast
regardless of whether it's a dark or light theme. I need some way to determine both whether the theme is dark or light and whether the theme is high contrast or not. I seeThemeVariant.InheritVariant
is a thing but this seems to only print outLight
regardless of what the high contrast theme is set to.EDIT: Also I just remembered that:
is mentioned in #238, is this still valid as of RC1? And what do you mean by broken?
It seems like High Contrast works, though when switching between light and dark high contrast themes the UI elements only update to the newly selected theme when the UI element is interacted with, and
ActualThemeVariantChanged
doesn't trigger. I'm not sure if this is the same issue or if it's a different one altogether.Beta Was this translation helpful? Give feedback.
All reactions