Fix custom themes and drag/drop

This commit is contained in:
Aleh Khantsevich
2024-06-23 23:04:42 +02:00
parent dccf55d57a
commit 1e12ddd8e2
12 changed files with 53 additions and 102 deletions

View File

@@ -1,43 +1,37 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Microsoft.UI.Xaml.Media"
xmlns:xaml="using:Windows.UI.Xaml"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:xaml="using:Windows.UI.Xaml">
<x:String x:Key="ThemeName">Acrylic</x:String>
<x:Boolean x:Key="UseMica">False</x:Boolean>
<SolidColorBrush x:Key="AppBarBackgroundColor">Transparent</SolidColorBrush>
<Thickness x:Key="RendererGridMargin">0,0,4,0</Thickness>
<xaml:CornerRadius x:Key="MailListGridCornerRadius">6,6,6,6</xaml:CornerRadius>
<!-- Acrylic Template -->
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Name="Light">
<!-- Reading Pane Background -->
<SolidColorBrush x:Key="ReadingPaneBackgroundColorBrush">white</SolidColorBrush>
<!-- Reading Page Date/Name Group Header Background -->
<SolidColorBrush x:Key="MailListHeaderBackgroundColor">#ecf0f1</SolidColorBrush>
<local:AcrylicBrush
x:Key="WinoApplicationBackgroundColor"
TintColor="#FCFCFC"
TintOpacity="0.75"
BackgroundSource="HostBackdrop"
FallbackColor="#F9F9F9"
BackgroundSource="HostBackdrop" />
TintColor="#FCFCFC"
TintOpacity="0.75" />
</ResourceDictionary>
<ResourceDictionary x:Name="Dark">
<SolidColorBrush x:Key="ReadingPaneBackgroundColorBrush">Transparent</SolidColorBrush>
<SolidColorBrush x:Key="MailListHeaderBackgroundColor">#2C2C2C</SolidColorBrush>
<local:AcrylicBrush
x:Key="WinoApplicationBackgroundColor"
TintColor="#2C2C2C"
TintOpacity="0.30"
BackgroundSource="HostBackdrop"
FallbackColor="#2C2C2C"
BackgroundSource="HostBackdrop" />
TintColor="#2C2C2C"
TintOpacity="0.30" />
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
</ResourceDictionary>

View File

@@ -1,7 +1,7 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:xaml="using:Windows.UI.Xaml"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:xaml="using:Windows.UI.Xaml">
<x:String x:Key="ThemeName">Clouds</x:String>
<x:String x:Key="ThemeBackgroundImage">ms-appx:///BackgroundImages/Clouds.jpg</x:String>
@@ -9,19 +9,13 @@
<ImageBrush x:Key="WinoApplicationBackgroundColor" ImageSource="{StaticResource ThemeBackgroundImage}" />
<SolidColorBrush x:Key="AppBarBackgroundColor">Transparent</SolidColorBrush>
<Thickness x:Key="RendererGridMargin">4,0,4,0</Thickness>
<xaml:CornerRadius x:Key="MailListGridCornerRadius">6,6,6,6</xaml:CornerRadius>
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Name="Light">
<!-- Brushes -->
<SolidColorBrush x:Key="ReadingPaneBackgroundColorBrush">#A3FFFFFF</SolidColorBrush>
<SolidColorBrush x:Key="MailListHeaderBackgroundColor">#FFFFFF</SolidColorBrush>
<SolidColorBrush x:Key="MailListHeaderBackgroundColor">#b2dffc</SolidColorBrush>
</ResourceDictionary>
<ResourceDictionary x:Name="Dark">
<!-- Brushes -->
<SolidColorBrush x:Key="ReadingPaneBackgroundColorBrush">#A3262626</SolidColorBrush>
<SolidColorBrush x:Key="MailListHeaderBackgroundColor">#5413191F</SolidColorBrush>
<SolidColorBrush x:Key="MailListHeaderBackgroundColor">#b2dffc</SolidColorBrush>
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
</ResourceDictionary>

View File

@@ -1,7 +1,7 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:xaml="using:Windows.UI.Xaml"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:xaml="using:Windows.UI.Xaml">
<x:String x:Key="ThemeName">Custom</x:String>
<x:String x:Key="ThemeBackgroundImage">ms-appdata:///local/CustomWallpaper.jpg</x:String>
@@ -9,11 +9,8 @@
<ImageBrush
x:Key="WinoApplicationBackgroundColor"
Stretch="UniformToFill"
ImageSource="{StaticResource ThemeBackgroundImage}" />
<Thickness x:Key="RendererGridMargin">0,0,0,0</Thickness>
<xaml:CornerRadius x:Key="MailListGridCornerRadius">0,6,6,0</xaml:CornerRadius>
ImageSource="{StaticResource ThemeBackgroundImage}"
Stretch="UniformToFill" />
<!-- Navigation View Settings -->
<xaml:CornerRadius x:Key="NavigationViewContentGridCornerRadius">0,0,0,0</xaml:CornerRadius>
@@ -27,9 +24,6 @@
<Color x:Key="MainCustomThemeColor">#D9FFFFFF</Color>
<!-- Reading Pane Background -->
<SolidColorBrush x:Key="ReadingPaneBackgroundColorBrush" Color="{StaticResource MainCustomThemeColor}" />
<SolidColorBrush x:Key="AppBarBackgroundColor" Color="{StaticResource MainCustomThemeColor}" />
<SolidColorBrush x:Key="NavigationViewContentBackground" Color="Transparent" />
<SolidColorBrush x:Key="NavigationViewExpandedPaneBackground" Color="{StaticResource MainCustomThemeColor}" />

View File

@@ -1,7 +1,7 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:xaml="using:Windows.UI.Xaml"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:xaml="using:Windows.UI.Xaml">
<x:String x:Key="ThemeName">Forest</x:String>
<x:String x:Key="ThemeBackgroundImage">ms-appx:///BackgroundImages/Forest.jpg</x:String>
@@ -9,18 +9,12 @@
<ImageBrush x:Key="WinoApplicationBackgroundColor" ImageSource="{StaticResource ThemeBackgroundImage}" />
<SolidColorBrush x:Key="AppBarBackgroundColor">Transparent</SolidColorBrush>
<Thickness x:Key="RendererGridMargin">4,0,4,0</Thickness>
<xaml:CornerRadius x:Key="MailListGridCornerRadius">6,6,6,6</xaml:CornerRadius>
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Name="Light">
<!-- Brushes -->
<SolidColorBrush x:Key="ReadingPaneBackgroundColorBrush">#2900F00A</SolidColorBrush>
<SolidColorBrush x:Key="MailListHeaderBackgroundColor">#A800D608</SolidColorBrush>
</ResourceDictionary>
<ResourceDictionary x:Name="Dark">
<!-- Brushes -->
<SolidColorBrush x:Key="ReadingPaneBackgroundColorBrush">#A3262626</SolidColorBrush>
<SolidColorBrush x:Key="MailListHeaderBackgroundColor">#59001C01</SolidColorBrush>
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>

View File

@@ -1,7 +1,7 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:xaml="using:Windows.UI.Xaml"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:xaml="using:Windows.UI.Xaml">
<x:String x:Key="ThemeName">Garden</x:String>
<x:String x:Key="ThemeBackgroundImage">ms-appx:///BackgroundImages/Garden.jpg</x:String>
@@ -9,19 +9,13 @@
<ImageBrush x:Key="WinoApplicationBackgroundColor" ImageSource="{StaticResource ThemeBackgroundImage}" />
<SolidColorBrush x:Key="AppBarBackgroundColor">Transparent</SolidColorBrush>
<Thickness x:Key="RendererGridMargin">4,0,4,0</Thickness>
<xaml:CornerRadius x:Key="MailListGridCornerRadius">6,6,6,6</xaml:CornerRadius>
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Name="Light">
<!-- Brushes -->
<SolidColorBrush x:Key="ReadingPaneBackgroundColorBrush">#A3FFFFFF</SolidColorBrush>
<SolidColorBrush x:Key="MailListHeaderBackgroundColor">#FFFFFF</SolidColorBrush>
<SolidColorBrush x:Key="MailListHeaderBackgroundColor">#dcfad8</SolidColorBrush>
</ResourceDictionary>
<ResourceDictionary x:Name="Dark">
<!-- Brushes -->
<SolidColorBrush x:Key="ReadingPaneBackgroundColorBrush">#A3262626</SolidColorBrush>
<SolidColorBrush x:Key="MailListHeaderBackgroundColor">#5413191F</SolidColorBrush>
<SolidColorBrush x:Key="MailListHeaderBackgroundColor">#dcfad8</SolidColorBrush>
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
</ResourceDictionary>

View File

@@ -8,20 +8,14 @@
<SolidColorBrush x:Key="WinoApplicationBackgroundColor">Transparent</SolidColorBrush>
<SolidColorBrush x:Key="AppBarBackgroundColor">Transparent</SolidColorBrush>
<Thickness x:Key="RendererGridMargin">0,0,4,0</Thickness>
<xaml:CornerRadius x:Key="MailListGridCornerRadius">6,6,6,6</xaml:CornerRadius>
<!-- Mica Template -->
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Name="Light">
<!-- Reading Pane Background -->
<SolidColorBrush x:Key="ReadingPaneBackgroundColorBrush">white</SolidColorBrush>
<!-- Reading Page Date/Name Group Header Background -->
<SolidColorBrush x:Key="MailListHeaderBackgroundColor">#ecf0f1</SolidColorBrush>
</ResourceDictionary>
<ResourceDictionary x:Name="Dark">
<SolidColorBrush x:Key="ReadingPaneBackgroundColorBrush">Transparent</SolidColorBrush>
<SolidColorBrush x:Key="MailListHeaderBackgroundColor">#1f1f1f</SolidColorBrush>
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>

View File

@@ -1,7 +1,7 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:xaml="using:Windows.UI.Xaml"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:xaml="using:Windows.UI.Xaml">
<x:String x:Key="ThemeName">Nighty</x:String>
<x:String x:Key="ThemeBackgroundImage">ms-appx:///BackgroundImages/Nighty.jpg</x:String>
@@ -9,18 +9,14 @@
<ImageBrush x:Key="WinoApplicationBackgroundColor" ImageSource="{StaticResource ThemeBackgroundImage}" />
<SolidColorBrush x:Key="AppBarBackgroundColor">Transparent</SolidColorBrush>
<Thickness x:Key="RendererGridMargin">4,0,4,0</Thickness>
<xaml:CornerRadius x:Key="MailListGridCornerRadius">6,6,6,6</xaml:CornerRadius>
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Name="Light">
<!-- Brushes -->
<SolidColorBrush x:Key="ReadingPaneBackgroundColorBrush">#A3FFFFFF</SolidColorBrush>
<SolidColorBrush x:Key="MailListHeaderBackgroundColor">#fdcb6e</SolidColorBrush>
</ResourceDictionary>
<ResourceDictionary x:Name="Dark">
<!-- Brushes -->
<SolidColorBrush x:Key="ReadingPaneBackgroundColorBrush">#A3262626</SolidColorBrush>
<SolidColorBrush x:Key="MailListHeaderBackgroundColor">#5413191F</SolidColorBrush>
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>

View File

@@ -1,7 +1,7 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:xaml="using:Windows.UI.Xaml"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:xaml="using:Windows.UI.Xaml">
<x:String x:Key="ThemeName">Snowflake</x:String>
<x:String x:Key="ThemeBackgroundImage">ms-appx:///BackgroundImages/Snowflake.jpg</x:String>
@@ -9,19 +9,15 @@
<ImageBrush x:Key="WinoApplicationBackgroundColor" ImageSource="{StaticResource ThemeBackgroundImage}" />
<SolidColorBrush x:Key="AppBarBackgroundColor">Transparent</SolidColorBrush>
<Thickness x:Key="RendererGridMargin">4,0,4,0</Thickness>
<xaml:CornerRadius x:Key="MailListGridCornerRadius">6,6,6,6</xaml:CornerRadius>
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Name="Light">
<!-- Brushes -->
<SolidColorBrush x:Key="ReadingPaneBackgroundColorBrush">#A3FFFFFF</SolidColorBrush>
<SolidColorBrush x:Key="MailListHeaderBackgroundColor">#FFFFFF</SolidColorBrush>
<SolidColorBrush x:Key="MailListHeaderBackgroundColor">#b0c6dd</SolidColorBrush>
</ResourceDictionary>
<ResourceDictionary x:Name="Dark">
<!-- Brushes -->
<SolidColorBrush x:Key="ReadingPaneBackgroundColorBrush">#A3262626</SolidColorBrush>
<SolidColorBrush x:Key="MailListHeaderBackgroundColor">#5413191F</SolidColorBrush>
<SolidColorBrush x:Key="MailListHeaderBackgroundColor">#b0c6dd</SolidColorBrush>
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
</ResourceDictionary>

View File

@@ -13,13 +13,13 @@
<ResourceDictionary x:Name="Light">
<SolidColorBrush x:Key="AttachmentBrush">#fdcb6e</SolidColorBrush>
<SolidColorBrush x:Key="SettingsPaneBorderBrush">#636e72</SolidColorBrush>
<SolidColorBrush x:Key="WorkZoneBackground" Color="White" />
<SolidColorBrush x:Key="WinoContentZoneBackgroud" Color="White" />
</ResourceDictionary>
<ResourceDictionary x:Name="Dark">
<SolidColorBrush x:Key="AttachmentBrush">#fdcb6e</SolidColorBrush>
<SolidColorBrush x:Key="SettingsPaneBorderBrush">#2d3436</SolidColorBrush>
<local:AcrylicBrush
x:Key="WorkZoneBackground"
x:Key="WinoContentZoneBackgroud"
BackgroundSource="Backdrop"
FallbackColor="#2C2C2C"
TintColor="#2C2C2C"

View File

@@ -107,7 +107,12 @@
</DataTemplate>
</Page.Resources>
<Grid Padding="7,0,7,7">
<Grid
Padding="7,0,7,7"
AllowDrop="True"
DragLeave="OnComposeGridDragLeave"
DragOver="OnComposeGridDragOver"
RowSpacing="7">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
@@ -115,17 +120,11 @@
<Border
Grid.Row="0"
Margin="0,0,0,7"
Background="{ThemeResource WorkZoneBackground}"
Background="{ThemeResource WinoContentZoneBackgroud}"
BorderBrush="{StaticResource CardStrokeColorDefaultBrush}"
BorderThickness="1"
CornerRadius="7">
<Grid
Grid.Row="0"
AllowDrop="True"
Background="{ThemeResource AppBarBackgroundColor}"
DragLeave="OnComposeGridDragLeave"
DragOver="OnComposeGridDragOver">
<Grid>
<Grid.Resources>
<SolidColorBrush x:Key="AutoSuggestBoxBorderThemeBrush">Transparent</SolidColorBrush>
</Grid.Resources>
@@ -467,7 +466,7 @@
<!-- Mime Info -->
<Grid
Grid.Row="2"
Padding="16,0"
Padding="16,0,16,10"
ColumnSpacing="12"
RowSpacing="3">
<Grid.RowDefinitions>
@@ -477,7 +476,6 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
@@ -509,14 +507,14 @@
<!-- To -->
<TextBlock
Grid.Row="2"
Grid.Row="1"
Margin="0,4,0,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Text="{x:Bind domain:Translator.ComposerTo}" />
<Grid
Grid.Row="2"
Grid.Row="1"
Grid.Column="1"
VerticalAlignment="Center">
<Grid.ColumnDefinitions>
@@ -559,7 +557,7 @@
<!-- CC BCC -->
<TextBlock
x:Name="CCTextBlock"
Grid.Row="3"
Grid.Row="2"
Margin="0,4,0,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
@@ -568,7 +566,7 @@
<controls1:TokenizingTextBox
x:Name="CCBox"
Grid.Row="3"
Grid.Row="2"
Grid.Column="1"
VerticalAlignment="Center"
LostFocus="AddressBoxLostFocus"
@@ -582,7 +580,7 @@
<TextBlock
x:Name="BccTextBlock"
Grid.Row="4"
Grid.Row="3"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Text="Bcc: "
@@ -590,7 +588,7 @@
<controls1:TokenizingTextBox
x:Name="BccBox"
Grid.Row="4"
Grid.Row="3"
Grid.Column="1"
VerticalAlignment="Center"
LostFocus="AddressBoxLostFocus"
@@ -604,14 +602,14 @@
<!-- Subject -->
<TextBlock
Grid.Row="5"
Grid.Row="4"
Margin="0,4,0,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Text="{x:Bind domain:Translator.ComposerSubject}" />
<TextBox
Grid.Row="5"
Grid.Row="4"
Grid.Column="1"
Margin="0,4,0,0"
BorderThickness="0"
@@ -620,7 +618,7 @@
<!-- Attachments -->
<ListView
x:Name="AttachmentsListView"
Grid.Row="6"
Grid.Row="5"
Grid.ColumnSpan="2"
x:Load="{x:Bind helpers:XamlHelpers.CountToBooleanConverter(ViewModel.IncludedAttachments.Count), Mode=OneWay}"
IsItemClickEnabled="True"
@@ -645,10 +643,7 @@
DragOver="OnFileDropGridDragOver"
Drop="OnFileDropGridFileDropped"
Visibility="{x:Bind ViewModel.IsDraggingOverComposerGrid, Mode=OneWay}">
<Grid
Margin="0,7,5,0"
Background="{ThemeResource AcrylicInAppFillColorDefaultBrush}"
CornerRadius="9">
<Grid Background="{ThemeResource AcrylicInAppFillColorDefaultBrush}" CornerRadius="9">
<Rectangle
x:Name="DropZoneBorder"
Fill="Transparent"
@@ -704,7 +699,7 @@
</Border>
<Border
Grid.Row="1"
Background="{ThemeResource WorkZoneBackground}"
Background="{ThemeResource WinoContentZoneBackgroud}"
BorderBrush="{StaticResource CardStrokeColorDefaultBrush}"
BorderThickness="1"
CornerRadius="10">

View File

@@ -415,7 +415,7 @@
Grid.Column="0"
Margin="0,0,0,7"
Padding="5,0,0,0"
Background="{ThemeResource WorkZoneBackground}"
Background="{ThemeResource WinoContentZoneBackgroud}"
BorderBrush="{StaticResource CardStrokeColorDefaultBrush}"
BorderThickness="1"
CornerRadius="7">

View File

@@ -158,7 +158,7 @@
<Border
Grid.Row="0"
Margin="0,0,0,7"
Background="{ThemeResource WorkZoneBackground}"
Background="{ThemeResource WinoContentZoneBackgroud}"
BorderBrush="{StaticResource CardStrokeColorDefaultBrush}"
BorderThickness="1"
CornerRadius="7">
@@ -363,7 +363,7 @@
<Border
Grid.Row="1"
Background="{ThemeResource WorkZoneBackground}"
Background="{ThemeResource WinoContentZoneBackgroud}"
BorderBrush="{StaticResource CardStrokeColorDefaultBrush}"
BorderThickness="1"
CornerRadius="10">