Conversation
|
Okay so I love this, and is almost certainly exactly how I'd implement it. I might have not been the most clear when I closed #5772. I do plan on coming back to XAML theming (#3327). It's my personal passion project, probably one of the features that I'm most excited about. I unfortunately have other priorities that are more important right now (mainly #5000), so I'm pretty confident that #3327 isn't going to land in the 2.0 timeframe. I know the team wasn't going to have the time to come through and review that spec in any short order (it's already 12 months old haha). Plus, the spec needed a decent amount of additional work to reconcile it with Mica. I thought it best to close the spec PR for now and help clear out the PR backlog, and re-open when the team actually will have a chance to review. I don't want to be the kind of person who turns away valid and valuable community contributions in the name of "the big picture". I especially don't want to do that when I have no idea when the big picture will work itself out. So I'm gonna give this a think for a while to see if there's a reasonable way to accept this now and reconcile with themes later. |
Thank you so much for this, I am new to C++/WinRT so it really means a lot.
I hope it shouldn't be too hard to reconcile with themes, when necessary I think it should be possible to just remove this code and have some kind of auto-upgrade for the settings to something compliant with themes. |
There was a problem hiding this comment.
Okay, team consensus was that we're okay doing this for now, and migrating it to themes when themes arrive in ~3.0. We're not going to take any of the other titlebar theming settings in 2.0.
(We might take a fix for following the system setting for "use accent color in the titlebar", but with an opt-out setting (that again, would be migrated to themes in 3.0). The rest of the theming asks though will have to wait.)
I'm okay with
- this setting not hot-reloading right now. The team can always follow up and add that if needed
the team can come through and link this up to the settings UI in a follow-up, no need to delay this PR any longer.It's already in the SUI!
Thanks again for the contribution here!
I might be misunderstanding but the PR already contains a setting UI toggle. |
omfg it does. I forgot how easy it is to add settings to the SUI sometimes, that I completely forgot that I had read that code. Ignore me! |
carlos-zamora
left a comment
There was a problem hiding this comment.
This looks great! A few things before I sign off:
- Please add
useAcrylicInTabRowto the schema - Please add this to the docs repo
- Please file a follow-up issue for this to be hot-reloadable
| const auto backgroundSolidBrush = backgroundBrush.try_as<Media::SolidColorBrush>(); | ||
| const auto backgroundAcrylicBrush = backgroundBrush.try_as<Media::AcrylicBrush>(); | ||
|
|
||
| til::color backgroundColor = Colors::Black(); | ||
| if (backgroundSolidBrush) | ||
| { | ||
| backgroundColor = backgroundSolidBrush.Color(); | ||
| } | ||
| else if (backgroundAcrylicBrush) | ||
| { | ||
| backgroundColor = backgroundAcrylicBrush.FallbackColor(); | ||
| } |
There was a problem hiding this comment.
| const auto backgroundSolidBrush = backgroundBrush.try_as<Media::SolidColorBrush>(); | |
| const auto backgroundAcrylicBrush = backgroundBrush.try_as<Media::AcrylicBrush>(); | |
| til::color backgroundColor = Colors::Black(); | |
| if (backgroundSolidBrush) | |
| { | |
| backgroundColor = backgroundSolidBrush.Color(); | |
| } | |
| else if (backgroundAcrylicBrush) | |
| { | |
| backgroundColor = backgroundAcrylicBrush.FallbackColor(); | |
| } | |
| til::color backgroundColor = Colors::Black(); | |
| if (const auto backgroundSolidBrush = backgroundBrush.try_as<Media::SolidColorBrush>()) | |
| { | |
| backgroundColor = backgroundSolidBrush.Color(); | |
| } | |
| else if (const auto backgroundAcrylicBrush = backgroundBrush.try_as<Media::AcrylicBrush>()) | |
| { | |
| backgroundColor = backgroundAcrylicBrush.FallbackColor(); | |
| } |
Totally optional. This'll make it so that the brushes are available in a smaller scope.
| <comment>Header for a control to toggle whether acrylic shows in the tab row. Changing this setting requires the user to relaunch the app.</comment> | ||
| </data> | ||
| <data name="Globals_AcrylicTabRow.HelpText" xml:space="preserve"> | ||
| <value>When checked, the tab row will have the acrylic material.</value> |
There was a problem hiding this comment.
| <value>When checked, the tab row will have the acrylic material.</value> | |
| <value>When enabled, the tab row will have the acrylic material.</value> |
|
This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment. |
|
@carlos-zamora Mind if we do those in post? Not sure I want to necessarily force an external contributor to comply with the fullness of our bureaucracy 😜 |
|
Ah shoot, there are merge conflicts though - @matthew4850 if you want to fix those, otherwise I might just try on monday |
|
@carlos-zamora apologise for not getting round to your requested changes, I was away and only just got back. |
Resolved 🙂 |
No worries. Thank YOU for doing this! 🙂 |
|
Hello @carlos-zamora! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
|
🎉 Handy links: |
`useAcrylicInTabRow` was missing from the JSON schema, so I added it in. ## References #10864 ## PR Checklist * [x] Closes #11087 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [x] Schema updated.
This has been a saga. Basically, any resources in `App.xaml` aren't going to be able to reference other theme-aware resources. We can't change the theme of the app at runtime, only elements within the app. So we can't use `ApplicationPageBackgroundThemeBrush` in app.xaml, because it will ALWAYS be evaluated as the OS theme version of that brush. * regressed in #12326 * See also #10864 * #3917 CANNOT be fixed in the same way. We're lucky here that the TabView uses a `{ThemeResource TabViewBackground}` in markup to set the bg. We're not similarly lucky with the Pane one. * [x] closes #12356 * [x] Tested manually. You can confirm, my eyes are bleeding from the OS-wide light mode
This has been a saga. Basically, any resources in `App.xaml` aren't going to be able to reference other theme-aware resources. We can't change the theme of the app at runtime, only elements within the app. So we can't use `ApplicationPageBackgroundThemeBrush` in app.xaml, because it will ALWAYS be evaluated as the OS theme version of that brush. * regressed in #12326 * See also #10864 * #3917 CANNOT be fixed in the same way. We're lucky here that the TabView uses a `{ThemeResource TabViewBackground}` in markup to set the bg. We're not similarly lucky with the Pane one. * [x] closes #12356 * [x] Tested manually. You can confirm, my eyes are bleeding from the OS-wide light mode (cherry picked from commit 5ba0d61)
This has been a saga. Basically, any resources in `App.xaml` aren't going to be able to reference other theme-aware resources. We can't change the theme of the app at runtime, only elements within the app. So we can't use `ApplicationPageBackgroundThemeBrush` in app.xaml, because it will ALWAYS be evaluated as the OS theme version of that brush. * regressed in #12326 * See also #10864 * #3917 CANNOT be fixed in the same way. We're lucky here that the TabView uses a `{ThemeResource TabViewBackground}` in markup to set the bg. We're not similarly lucky with the Pane one. * [x] closes #12356 * [x] Tested manually. You can confirm, my eyes are bleeding from the OS-wide light mode
Add support for acrylic in the titlebar
PR Checklist
Detailed Description of the Pull Request / Additional comments
This seems to be a highly requested feature and seeing as #5772 was closed I thought it made sense to make a PR for this.

Validation Steps Performed
Checked that acrylic works in both dark and light modes and switching between them still works. Also checked that acrylic in the tab row still works when tabs in titlebar is disabled.