Skip to content

Commit

Permalink
Made designer happy with default theme. #75
Browse files Browse the repository at this point in the history
  • Loading branch information
waliarubal committed Jun 14, 2020
1 parent 86f5168 commit eb05688
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Jaya.Shared/ThemeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ public ThemeModel SelectedTheme
var currentAppStyles = new List<IStyle>();
currentAppStyles.AddRange(Application.Current.Styles);

if (currentTheme != null)
currentAppStyles.RemoveRange(0, currentTheme.Styles.Count);
// remove default theme styles
currentAppStyles.RemoveRange(0, 2);

currentAppStyles.InsertRange(0, SelectedTheme.Styles);

Expand Down
6 changes: 3 additions & 3 deletions src/Jaya.Ui/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Jaya.Ui">
<Application.Styles>
<!-- enable below two lines for designer support, keep them commented for theme switching to work dueing execution time -->
<!--<StyleInclude Source="avares://Avalonia.Themes.Default/Accents/BaseLight.xaml" />
<StyleInclude Source="avares://Jaya.Shared/Styles/Accents/BaseLight.xaml" />-->
<!-- enable below two lines for designer support, keep them commented for theme switching to work during execution time -->
<StyleInclude Source="avares://Avalonia.Themes.Default/Accents/BaseLight.xaml" />
<StyleInclude Source="avares://Jaya.Shared/Styles/Accents/BaseLight.xaml" />

<StyleInclude Source="avares://Avalonia.Themes.Default/DefaultTheme.xaml" />
<StyleInclude Source="avares://Avalonia.Controls.DataGrid/Themes/Default.xaml" />
Expand Down

0 comments on commit eb05688

Please sign in to comment.