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

Port styles to control themes #346

Merged
merged 2 commits into from
Jul 15, 2023

Conversation

mgarstenauer
Copy link
Contributor

This PR ports the styles to control themes (following the Porting to Control Themes guide).

Changes:

  • The styles are unchanged, all controls still look the same. (I didn't fix anything. The InsightWindow, for example, is not yet theme-aware, only works for "Light" themes. This PR doesn't fix that.)
  • Formatting/indentation of the existing XAML files was mixed. I tried to normalize the format, following a style close to AvaloniaUI.
  • Documented CollapseIfSingleOverloadConverter and made it public because it is used in the styles. It should be public in case someone wants to copy/override the style.
  • Removed DropDownButton. This is not used anywhere. I recommend using the official AvaloniaUI DropDownButton should the need arise.
  • Fixed a typo.

Tests:

  • I tested AvaloniaEdit.Demo with all theme variants: Fluent/Light, Fluent/Dark, Simple/Light, Simple/Dark
  • <Design.PreviewWith> for the SearchPanel also works in the Designer (JetBrains Rider).

I'll deal with any merge conflicts as they come up.

@danipen danipen requested a review from Gillibald June 10, 2023 22:23
@danipen danipen requested a review from maxkatz6 July 9, 2023 10:20
Copy link
Member

@maxkatz6 maxkatz6 left a comment

Choose a reason for hiding this comment

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

Thanks!
Looks good to me.
I will do some minor changes making internal XAML files invisible outside separately.

@maxkatz6 maxkatz6 merged commit 02b4ebd into AvaloniaUI:master Jul 15, 2023
@maxkatz6
Copy link
Member

maxkatz6 commented Jul 15, 2023

Also, I need to fix dark/light theme switching

@mgarstenauer mgarstenauer deleted the port-styles-to-controlthemes branch July 18, 2023 14:24
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