amwx / FluentAvalonia

Control library focused on fluent design and bringing more WinUI controls into Avalonia
MIT License
1.05k stars 97 forks source link

Control Fixes #557

Closed robloo closed 6 months ago

robloo commented 6 months ago
  1. Use ContentPresenter instead of ContentControl in ComboBox
    • This is what the style selectors are using and is also the correct control to use here.
  2. Update CalendarDatePicker theme
    • The calendar glyph is currently always black in dark theme -- not light. I fixed this by setting the Foreground from a style selector rather than hardcoded in the control theme. That said, I'm not sure why it wasn't being inherited correctly as it looks like it should have worked. This might be an upstream bug.
    • The CalendarDatePicker had no styles for pointerover, disabled, etc. relying entirely on the TextBox itself to provide this. This completely ignores the CalendarDatePicker resources apps might be using. Therefore, I added support for this based on upstream WinUI.
    • https://github.com/microsoft/microsoft-ui-xaml/blob/winui3/release/1.5-stable/controls/dev/CommonStyles/CalendarDatePicker_themeresources.xaml
robloo commented 6 months ago

The calendar glyph is currently always black in dark theme -- not light. I fixed this by setting the Foreground from a style selector rather than hardcoded in the control theme. That said, I'm not sure why it wasn't being inherited correctly as it looks like it should have worked. This might be an upstream bug.

Note that this may be an issues fixed by https://github.com/AvaloniaUI/Avalonia/pull/15670. The work-around here shouldn't really be an issue but it might be good to revert at some point in the future (note to myself).

robloo commented 6 months ago

Also see upstream https://github.com/AvaloniaUI/Avalonia/issues/15729 discussion