Fix themes and attachment icons.
This commit is contained in:
@@ -22,5 +22,6 @@ namespace Wino.Core.Domain.Interfaces
|
|||||||
Guid CurrentApplicationThemeId { get; set; }
|
Guid CurrentApplicationThemeId { get; set; }
|
||||||
string AccentColor { get; set; }
|
string AccentColor { get; set; }
|
||||||
string GetSystemAccentColorHex();
|
string GetSystemAccentColorHex();
|
||||||
|
bool IsCustomTheme { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
xmlns:xaml="using:Windows.UI.Xaml">
|
xmlns:xaml="using:Windows.UI.Xaml">
|
||||||
|
|
||||||
<x:String x:Key="ThemeName">Clouds</x:String>
|
<x:String x:Key="ThemeName">Clouds</x:String>
|
||||||
<x:String x:Key="ThemeBackgroundImage">ms-appx:///BackgroundImages/Clouds.jpg</x:String>
|
<x:String x:Key="ThemeBackgroundImage">ms-appx:///Wino.Core.UWP/BackgroundImages/Clouds.jpg</x:String>
|
||||||
<x:Boolean x:Key="UseMica">False</x:Boolean>
|
<x:Boolean x:Key="UseMica">False</x:Boolean>
|
||||||
|
|
||||||
<ImageBrush x:Key="WinoApplicationBackgroundColor" ImageSource="{StaticResource ThemeBackgroundImage}" />
|
<ImageBrush x:Key="WinoApplicationBackgroundColor" ImageSource="{StaticResource ThemeBackgroundImage}" />
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
xmlns:xaml="using:Windows.UI.Xaml">
|
xmlns:xaml="using:Windows.UI.Xaml">
|
||||||
|
|
||||||
<x:String x:Key="ThemeName">Forest</x:String>
|
<x:String x:Key="ThemeName">Forest</x:String>
|
||||||
<x:String x:Key="ThemeBackgroundImage">ms-appx:///BackgroundImages/Forest.jpg</x:String>
|
<x:String x:Key="ThemeBackgroundImage">ms-appx:///Wino.Core.UWP/BackgroundImages/Forest.jpg</x:String>
|
||||||
<x:Boolean x:Key="UseMica">False</x:Boolean>
|
<x:Boolean x:Key="UseMica">False</x:Boolean>
|
||||||
|
|
||||||
<ImageBrush x:Key="WinoApplicationBackgroundColor" ImageSource="{StaticResource ThemeBackgroundImage}" />
|
<ImageBrush x:Key="WinoApplicationBackgroundColor" ImageSource="{StaticResource ThemeBackgroundImage}" />
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
xmlns:xaml="using:Windows.UI.Xaml">
|
xmlns:xaml="using:Windows.UI.Xaml">
|
||||||
|
|
||||||
<x:String x:Key="ThemeName">Garden</x:String>
|
<x:String x:Key="ThemeName">Garden</x:String>
|
||||||
<x:String x:Key="ThemeBackgroundImage">ms-appx:///BackgroundImages/Garden.jpg</x:String>
|
<x:String x:Key="ThemeBackgroundImage">ms-appx:///Wino.Core.UWP/BackgroundImages/Garden.jpg</x:String>
|
||||||
<x:Boolean x:Key="UseMica">False</x:Boolean>
|
<x:Boolean x:Key="UseMica">False</x:Boolean>
|
||||||
|
|
||||||
<ImageBrush x:Key="WinoApplicationBackgroundColor" ImageSource="{StaticResource ThemeBackgroundImage}" />
|
<ImageBrush x:Key="WinoApplicationBackgroundColor" ImageSource="{StaticResource ThemeBackgroundImage}" />
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
xmlns:xaml="using:Windows.UI.Xaml">
|
xmlns:xaml="using:Windows.UI.Xaml">
|
||||||
|
|
||||||
<x:String x:Key="ThemeName">Nighty</x:String>
|
<x:String x:Key="ThemeName">Nighty</x:String>
|
||||||
<x:String x:Key="ThemeBackgroundImage">ms-appx:///BackgroundImages/Nighty.jpg</x:String>
|
<x:String x:Key="ThemeBackgroundImage">ms-appx:///Wino.Core.UWP/BackgroundImages/Nighty.jpg</x:String>
|
||||||
<x:Boolean x:Key="UseMica">False</x:Boolean>
|
<x:Boolean x:Key="UseMica">False</x:Boolean>
|
||||||
|
|
||||||
<ImageBrush x:Key="WinoApplicationBackgroundColor" ImageSource="{StaticResource ThemeBackgroundImage}" />
|
<ImageBrush x:Key="WinoApplicationBackgroundColor" ImageSource="{StaticResource ThemeBackgroundImage}" />
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
xmlns:xaml="using:Windows.UI.Xaml">
|
xmlns:xaml="using:Windows.UI.Xaml">
|
||||||
|
|
||||||
<x:String x:Key="ThemeName">Snowflake</x:String>
|
<x:String x:Key="ThemeName">Snowflake</x:String>
|
||||||
<x:String x:Key="ThemeBackgroundImage">ms-appx:///BackgroundImages/Snowflake.jpg</x:String>
|
<x:String x:Key="ThemeBackgroundImage">ms-appx:///Wino.Core.UWP/Snowflake.jpg</x:String>
|
||||||
<x:Boolean x:Key="UseMica">False</x:Boolean>
|
<x:Boolean x:Key="UseMica">False</x:Boolean>
|
||||||
|
|
||||||
<ImageBrush x:Key="WinoApplicationBackgroundColor" ImageSource="{StaticResource ThemeBackgroundImage}" />
|
<ImageBrush x:Key="WinoApplicationBackgroundColor" ImageSource="{StaticResource ThemeBackgroundImage}" />
|
||||||
|
|||||||
@@ -94,9 +94,6 @@
|
|||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|
||||||
<!-- Last item must always be the default theme. -->
|
|
||||||
<ResourceDictionary Source="AppThemes/Mica.xaml" />
|
|
||||||
</ResourceDictionary.MergedDictionaries>
|
</ResourceDictionary.MergedDictionaries>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ namespace Wino.Core.UWP.Models.Personalization
|
|||||||
|
|
||||||
public override async Task<string> GetThemeResourceDictionaryContentAsync()
|
public override async Task<string> GetThemeResourceDictionaryContentAsync()
|
||||||
{
|
{
|
||||||
var customAppThemeFile = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///AppThemes/Custom.xaml"));
|
var customAppThemeFile = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Wino.Core.UWP/AppThemes/Custom.xaml"));
|
||||||
return await FileIO.ReadTextAsync(customAppThemeFile);
|
return await FileIO.ReadTextAsync(customAppThemeFile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,11 +23,11 @@ namespace Wino.Core.UWP.Models.Personalization
|
|||||||
public override AppThemeType AppThemeType => AppThemeType.PreDefined;
|
public override AppThemeType AppThemeType => AppThemeType.PreDefined;
|
||||||
|
|
||||||
public override string GetBackgroundPreviewImagePath()
|
public override string GetBackgroundPreviewImagePath()
|
||||||
=> $"ms-appx:///BackgroundImages/{ThemeName}.jpg";
|
=> $"ms-appx:///Wino.Core.UWP/BackgroundImages/{ThemeName}.jpg";
|
||||||
|
|
||||||
public override async Task<string> GetThemeResourceDictionaryContentAsync()
|
public override async Task<string> GetThemeResourceDictionaryContentAsync()
|
||||||
{
|
{
|
||||||
var xamlDictionaryFile = await StorageFile.GetFileFromApplicationUriAsync(new Uri($"ms-appx:///AppThemes/{ThemeName}.xaml"));
|
var xamlDictionaryFile = await StorageFile.GetFileFromApplicationUriAsync(new Uri($"ms-appx:///Wino.Core.UWP/AppThemes/{ThemeName}.xaml"));
|
||||||
return await FileIO.ReadTextAsync(xamlDictionaryFile);
|
return await FileIO.ReadTextAsync(xamlDictionaryFile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -143,6 +143,15 @@ namespace Wino.Services
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool IsCustomTheme
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return currentApplicationThemeId != Guid.Parse(_micaThemeId) &&
|
||||||
|
currentApplicationThemeId != Guid.Parse(_acrylicThemeId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public async Task InitializeAsync()
|
public async Task InitializeAsync()
|
||||||
{
|
{
|
||||||
// Already initialized. There is no need.
|
// Already initialized. There is no need.
|
||||||
|
|||||||
@@ -6,43 +6,43 @@
|
|||||||
<!-- Attachment Icon Templates -->
|
<!-- Attachment Icon Templates -->
|
||||||
|
|
||||||
<DataTemplate x:Key="NoneTemplate">
|
<DataTemplate x:Key="NoneTemplate">
|
||||||
<Image Source="/Assets/FileTypes/type_none.png" />
|
<Image Source="Assets/FileTypes/type_none.png" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|
||||||
<DataTemplate x:Key="ExecutableTemplate">
|
<DataTemplate x:Key="ExecutableTemplate">
|
||||||
<Image Source="/Assets/FileTypes/type_executable.png" />
|
<Image Source="Assets/FileTypes/type_executable.png" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|
||||||
<DataTemplate x:Key="ImageTemplate">
|
<DataTemplate x:Key="ImageTemplate">
|
||||||
<Image Source="/Assets/FileTypes/type_image.png" />
|
<Image Source="Assets/FileTypes/type_image.png" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|
||||||
<DataTemplate x:Key="VideoTemplate">
|
<DataTemplate x:Key="VideoTemplate">
|
||||||
<Image Source="/Assets/FileTypes/type_video.png" />
|
<Image Source="Assets/FileTypes/type_video.png" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|
||||||
<DataTemplate x:Key="AudioTemplate">
|
<DataTemplate x:Key="AudioTemplate">
|
||||||
<Image Source="/Assets/FileTypes/type_audio.png" />
|
<Image Source="Assets/FileTypes/type_audio.png" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|
||||||
<DataTemplate x:Key="PDFTemplate">
|
<DataTemplate x:Key="PDFTemplate">
|
||||||
<Image Source="/Assets/FileTypes/type_pdf.png" />
|
<Image Source="Assets/FileTypes/type_pdf.png" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|
||||||
<DataTemplate x:Key="HTMLTemplate">
|
<DataTemplate x:Key="HTMLTemplate">
|
||||||
<Image Source="/Assets/FileTypes/type_html.png" />
|
<Image Source="Assets/FileTypes/type_html.png" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|
||||||
<DataTemplate x:Key="RarTemplate">
|
<DataTemplate x:Key="RarTemplate">
|
||||||
<Image Source="/Assets/FileTypes/type_rar.png" />
|
<Image Source="Assets/FileTypes/type_rar.png" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|
||||||
<DataTemplate x:Key="ArchiveTemplate">
|
<DataTemplate x:Key="ArchiveTemplate">
|
||||||
<Image Source="/Assets/FileTypes/type_archive.png" />
|
<Image Source="Assets/FileTypes/type_archive.png" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|
||||||
<DataTemplate x:Key="OtherTemplate">
|
<DataTemplate x:Key="OtherTemplate">
|
||||||
<Image Source="/Assets/FileTypes/type_other.png" />
|
<Image Source="Assets/FileTypes/type_other.png" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|
||||||
<selectors:FileAttachmentTypeSelector
|
<selectors:FileAttachmentTypeSelector
|
||||||
@@ -57,5 +57,4 @@
|
|||||||
RarArchive="{StaticResource RarTemplate}"
|
RarArchive="{StaticResource RarTemplate}"
|
||||||
Video="{StaticResource VideoTemplate}" />
|
Video="{StaticResource VideoTemplate}" />
|
||||||
|
|
||||||
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|||||||
@@ -85,6 +85,7 @@
|
|||||||
<Compile Include="Activation\ActivationHandler.cs" />
|
<Compile Include="Activation\ActivationHandler.cs" />
|
||||||
<Compile Include="BasePage.cs" />
|
<Compile Include="BasePage.cs" />
|
||||||
<Compile Include="Controls\ControlConstants.cs" />
|
<Compile Include="Controls\ControlConstants.cs" />
|
||||||
|
<Compile Include="Controls\CustomWrapPanel.cs" />
|
||||||
<Compile Include="Controls\WinoAppTitleBar.xaml.cs">
|
<Compile Include="Controls\WinoAppTitleBar.xaml.cs">
|
||||||
<DependentUpon>WinoAppTitleBar.xaml</DependentUpon>
|
<DependentUpon>WinoAppTitleBar.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ namespace Wino.Mail.ViewModels
|
|||||||
public INavigationService NavigationService { get; }
|
public INavigationService NavigationService { get; }
|
||||||
public IStatePersistanceService StatePersistenceService { get; }
|
public IStatePersistanceService StatePersistenceService { get; }
|
||||||
public IPreferencesService PreferencesService { get; }
|
public IPreferencesService PreferencesService { get; }
|
||||||
|
public IThemeService ThemeService { get; }
|
||||||
|
|
||||||
private readonly IMailService _mailService;
|
private readonly IMailService _mailService;
|
||||||
private readonly IFolderService _folderService;
|
private readonly IFolderService _folderService;
|
||||||
@@ -154,9 +155,11 @@ namespace Wino.Mail.ViewModels
|
|||||||
IWinoRequestDelegator winoRequestDelegator,
|
IWinoRequestDelegator winoRequestDelegator,
|
||||||
IKeyPressService keyPressService,
|
IKeyPressService keyPressService,
|
||||||
IPreferencesService preferencesService,
|
IPreferencesService preferencesService,
|
||||||
|
IThemeService themeService,
|
||||||
IWinoServerConnectionManager winoServerConnectionManager)
|
IWinoServerConnectionManager winoServerConnectionManager)
|
||||||
{
|
{
|
||||||
PreferencesService = preferencesService;
|
PreferencesService = preferencesService;
|
||||||
|
ThemeService = themeService;
|
||||||
_winoServerConnectionManager = winoServerConnectionManager;
|
_winoServerConnectionManager = winoServerConnectionManager;
|
||||||
StatePersistenceService = statePersistenceService;
|
StatePersistenceService = statePersistenceService;
|
||||||
NavigationService = navigationService;
|
NavigationService = navigationService;
|
||||||
|
|||||||
@@ -17,6 +17,9 @@
|
|||||||
<ResourceDictionary Source="Styles/ImagePreviewControl.xaml" />
|
<ResourceDictionary Source="Styles/ImagePreviewControl.xaml" />
|
||||||
|
|
||||||
<styles:WinoExpanderStyle />
|
<styles:WinoExpanderStyle />
|
||||||
|
|
||||||
|
<!-- Last item must always be the default theme. -->
|
||||||
|
<ResourceDictionary Source="ms-appx:///Wino.Core.UWP/AppThemes/Mica.xaml" />
|
||||||
</ResourceDictionary.MergedDictionaries>
|
</ResourceDictionary.MergedDictionaries>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</Application.Resources>
|
</Application.Resources>
|
||||||
|
|||||||
@@ -381,6 +381,7 @@
|
|||||||
x:Name="navigationView"
|
x:Name="navigationView"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Grid.ColumnSpan="3"
|
Grid.ColumnSpan="3"
|
||||||
|
Margin="-1,-1,0,0"
|
||||||
HorizontalContentAlignment="Stretch"
|
HorizontalContentAlignment="Stretch"
|
||||||
VerticalContentAlignment="Stretch"
|
VerticalContentAlignment="Stretch"
|
||||||
AlwaysShowHeader="True"
|
AlwaysShowHeader="True"
|
||||||
|
|||||||
@@ -228,7 +228,7 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</wino:BasePage.ShellContent>
|
</wino:BasePage.ShellContent>
|
||||||
|
|
||||||
<Grid x:Name="RootGrid">
|
<Grid x:Name="RootGrid" Padding="0,2,0,0">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition x:Name="MailListColumn" Width="{x:Bind ViewModel.MailListLength, Mode=OneWay, Converter={StaticResource GridLengthConverter}}" />
|
<ColumnDefinition x:Name="MailListColumn" Width="{x:Bind ViewModel.MailListLength, Mode=OneWay, Converter={StaticResource GridLengthConverter}}" />
|
||||||
<ColumnDefinition x:Name="RendererColumn" Width="*" />
|
<ColumnDefinition x:Name="RendererColumn" Width="*" />
|
||||||
@@ -506,6 +506,7 @@
|
|||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<toolkit:PropertySizer
|
<toolkit:PropertySizer
|
||||||
x:Name="MailListSizer"
|
x:Name="MailListSizer"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
@@ -531,7 +532,8 @@
|
|||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Opacity="0.5"
|
Opacity="0.5"
|
||||||
Spacing="6">
|
Spacing="6"
|
||||||
|
Visibility="{x:Bind helpers:XamlHelpers.ReverseBoolToVisibilityConverter(ViewModel.ThemeService.IsCustomTheme)}">
|
||||||
|
|
||||||
<coreControls:WinoFontIcon FontSize="80" Icon="Mail" />
|
<coreControls:WinoFontIcon FontSize="80" Icon="Mail" />
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user