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

Control Fixes #557

Merged
merged 3 commits into from
May 3, 2024
Merged

Control Fixes #557

merged 3 commits into from
May 3, 2024

Conversation

robloo
Copy link
Contributor

@robloo robloo commented Apr 27, 2024

  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 added 2 commits April 27, 2024 13:39
This is what the style selectors are using and is also the correct control to use here.
@robloo robloo changed the title Use ContentPresenter instead of ContentControl Control Fixes Apr 27, 2024
@amwx amwx merged commit 35bea49 into amwx:2.1.0 May 3, 2024
@robloo robloo deleted the robloo/combobox-fix branch May 3, 2024 02:34
@robloo
Copy link
Contributor Author

robloo commented May 11, 2024

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 AvaloniaUI/Avalonia#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
Copy link
Contributor Author

robloo commented May 16, 2024

Also see upstream AvaloniaUI/Avalonia#15729 discussion

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