Add support for tab.background to themes#13178
Merged
zadjii-msft merged 79 commits intomainfrom Jul 7, 2022
Merged
Conversation
https://stackoverflow.com/questions/64694722/changing-themeresources-dynamically-in-uwp That post looked SUPER promising. Problem is though, I CANNOT for the life of me get that to work. Like, I can't get anything to `{Binding Brush, Mode=TwoWay, Source={StaticResource TerminalBackground}}` to the `TerminalBackground` thing I made there. I thought that was so clever. I wanted an easy way to just change the value of a resource and have it update the Titlebar, but since the Titlebar isn't a child of the TerminalPage, and this binding thing didn't work, I think I'm at a dead end.
…dev/migrie/fhl/theming-2022-prototype
…ses are NOT optional
…to be sub-properties of the Theme
This comment was marked as resolved.
This comment was marked as resolved.
Member
Author
Member
|
I'd like to see this tied into James' DECAC work somehow since he introduced color table aliasing |
lhecker
approved these changes
May 26, 2022
carlos-zamora
approved these changes
Jun 1, 2022
Member
carlos-zamora
left a comment
There was a problem hiding this comment.
Looks good to me. Thanks!
Member
|
I'm explicitly not merging this so that you handle the merge order and all that. |
…f/702-link-tab-to-terminal
3 tasks
…f/702-link-tab-to-terminal
DHowett
reviewed
Jul 7, 2022
| } | ||
| else if (tab->_themeColor != nullptr) | ||
| { | ||
| // One-liner to safely get the active control's brush. |
Member
There was a problem hiding this comment.
"one-liner" is a stretch of the definition of both "one" and "line" here
|
Gorgeous!! |
ghost
pushed a commit
that referenced
this pull request
Aug 1, 2022
## Summary of the Pull Request Adds support for the `tab.showCloseButton` property to themes. This accepts three values: * `"always"` (default): The close button acts like it does today. * `"hover"`: The close button is always visible on the active tab. On inactive tabs, the close button only appears on mouse over. * `"never"`: The close button is never visible. You can't close the tab with middle-click, but you can still use keyboard shortcuts to close the tab. ## References * See #3327 *⚠️ targets #13178⚠️ ## PR Checklist * [x] Closes #3335 * [x] I work here * [ ] Tests added/passed * [n/a] Requires documentation to be updated - YUP ## Detailed Description of the Pull Request / Additional comments See the following two properties in WInUI that we're leveraging here. * [`TabViewCloseButtonOverlayMode.OnPointerOver`](https://docs.microsoft.com/en-us/windows/winui/api/microsoft.ui.xaml.controls.tabviewclosebuttonoverlaymode?view=winui-2.7&viewFallbackFrom=winui-2.2) * [`TabViewItem.IsClosable`](https://docs.microsoft.com/en-us/windows/winui/api/microsoft.ui.xaml.controls.tabviewitem.isclosable?view=winui-2.2#microsoft-ui-xaml-controls-tabviewitem-isclosable) One is a tabview-level property, the other is a per-tab-item property, hence why this code is a little wacky. ## Validation Steps Performed gifs below
|
🎉 Handy links: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary of the Pull Request
Adds support for the
tab.backgroundproperty to themes. This is also a ThemeColor, so it accepts, colors,accent, andterminalBackground, just like everything else.References
PR Checklist
Detailed Description of the Pull Request / Additional comments
I apparently left behing an optional color in TerminalTab for theme colors some time ago, just never used it. Crazy, huh?
Validation Steps Performed
gifs below