-
Notifications
You must be signed in to change notification settings - Fork 760
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
Initial support for WinUI 2.6 styles #6374
Conversation
Awesome! Looks like a lot of work. Could you add a little documentation when you have a chance on how this works? I was wondering how you would be implementing it. I was also never 100% sure how all XAML locations work together: XAML in controls folders, XAML in FluentTheme, all the FluentTheme priority folders, etc. When porting controls from WinUI library it looks like the XAML generator will work with the original files as-is. Any v1 suffixes will be used for version 1, any files without suffixes will be assumed as the max version (currently 2). So when porting controls like the ColorPicker I can just copy/paste the files no issue. |
8f7d4c8
to
d5a4e3a
Compare
@robloo you are right, it is probably quite worth documenting 👍 . In short however, the main point of the "Priority" folders is to ensure the files are merged in a order that ensures that the styles that are referenced by other styles occur earlier in the merged file. For example |
It's likely that we'll need to update the fluent font to match newer glyphs (like |
d5a4e3a
to
108467d
Compare
a2f07dd
to
5f11b30
Compare
src/Uno.UI.FluentTheme/Resources/Version1/PriorityDefault/FlipView_themeresources_v1.xaml
Outdated
Show resolved
Hide resolved
No :D This isn't necessary, XAML supports lexically forward references. The FluentTheme XAML resources are placed into Priority files according to the value of the The WinUI repo uses the 'Priority' attribute to determine which resource 'wins' in the case of duplicate resource declarations. So in the case that, say, two different XAML files declare a We could probably duplicate in detail what the project system is doing, but to save time I used the trick of just putting them in different folders, which achieves the same thing based on the order in which Uno's XAML generation processes files. This hopefully partially answers the question @robloo posed in #6926 . :)
|
7933af2
to
e5ffcf8
Compare
e5ffcf8
to
6be367b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't looked through every line of the imported v2 resources... but I wonder, did you do a search for 'Uno' in the existing v1 resources, and reapply any Uno workarounds to the new resources?
If you haven't done that yet, it might make sense to merge this PR first and then do that, but it should definitely be done.
@davidjohnoliver Yes, those Uno specifics have been already applied. What's missing are only the LGB border workarounds |
6be367b
to
f197125
Compare
@davidjohnoliver Thanks for the info. I'll quote this in the discussion so its all together for eventual documentation :) @MartinZikmund These files use the same symbol font Unicode points as upstream, correct? I'm going to pull out all the the WinUI glyphs this weekend and hopefully get an initial mapping to the Fluent UI System. Assuming there are no roadblocks rebuilding the Uno symbol font for WinUI 2.6 styles should be relatively quick -- once the mapping is complete. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
f197125
to
4aa0f54
Compare
4aa0f54
to
68de8a2
Compare
GitHub Issue (If applicable): #
PR Type
What kind of change does this PR introduce?
What is the current behavior?
What is the new behavior?
PR Checklist
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Run
results.Other information
Internal Issue (If applicable):