Skip to content

Commit

Permalink
Merge pull request #1309 from unoplatform/mergify/bp/release/stable/2…
Browse files Browse the repository at this point in the history
….3/pr-1304

feat: Adjusting background brush for specified theme (backport #1304)
  • Loading branch information
jeromelaban authored Mar 21, 2023
2 parents 3f74c59 + c23d4ff commit 8ea5886
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,28 @@
"datatype": "bool",
"value": "(appTheme == 'cupertino')"
},
"themeBackgroundBrush":{
"type": "generated",
"generator": "switch",
"replaces": "$themeBackgroundBrush$",
"parameters": {
"evaluator": "C++",
"cases": [
{
"condition": "(appThemeEvaluator == 'material')",
"value": "BackgroundBrush"
},
{
"condition": "(appThemeEvaluator == 'fluent')",
"value": "ApplicationPageBackgroundThemeBrush"
},
{
"condition": "(appTheme == 'cupertino')",
"value": "CupertinoSystemBackgroundBrush"
}
]
}
},
"presetDependencyInjectionDefault": {
"type": "generated",
"generator": "switch",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
xmlns:utu="using:Uno.Toolkit.UI"
xmlns:not_skia="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
NavigationCacheMode="Required"
Background="{ThemeResource BackgroundBrush}">
Background="{ThemeResource $themeBackgroundBrush$}">

<Grid>
<Grid.RowDefinitions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:uen="using:Uno.Extensions.Navigation.UI"
xmlns:utu="using:Uno.Toolkit.UI"
Background="{ThemeResource BackgroundBrush}">
Background="{ThemeResource $themeBackgroundBrush$}">

<Grid>
<utu:NavigationBar Content="Second Page">
Expand Down

0 comments on commit 8ea5886

Please sign in to comment.