Import functionality for wino accounts, calendar sync UI, bunch of shell improvements

This commit is contained in:
Burak Kaan Köse
2026-04-04 20:23:20 +02:00
parent 1667aa34db
commit 1d0fcfb5b0
68 changed files with 2792 additions and 519 deletions
@@ -15,8 +15,9 @@
TargetType="Button">
<Setter Property="Margin" Value="0" />
<Setter Property="Height" Value="32" />
<Setter Property="Padding" Value="0" />
<Setter Property="Foreground" Value="{ThemeResource SystemColorControlAccentBrush}" />
<!--<Setter Property="Foreground" Value="{ThemeResource SystemColorControlAccentBrush}" />-->
<Setter Property="CornerRadius" Value="{ThemeResource ControlCornerRadius}" />
<Setter Property="VerticalAlignment" Value="Center" />
@@ -27,7 +28,7 @@
<Grid Margin="4,0,0,0" Background="Transparent">
<Grid Background="Transparent" ColumnSpacing="16">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="64" />
<ColumnDefinition Width="128" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
@@ -0,0 +1,14 @@
<UserControl
x:Class="Wino.Mail.WinUI.Controls.SyncAnimationControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:animatedvisuals="using:Wino.Mail.WinUI.AnimatedVisuals">
<AnimatedVisualPlayer
x:Name="AnimationPlayer"
AutoPlay="True"
Stretch="Uniform">
<animatedvisuals:SyncRefreshAnimation />
</AnimatedVisualPlayer>
</UserControl>
@@ -0,0 +1,54 @@
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
namespace Wino.Mail.WinUI.Controls;
public sealed partial class SyncAnimationControl : UserControl
{
public static readonly DependencyProperty IsPlayingProperty = DependencyProperty.Register(
nameof(IsPlaying),
typeof(bool),
typeof(SyncAnimationControl),
new PropertyMetadata(true, OnIsPlayingChanged));
public bool IsPlaying
{
get => (bool)GetValue(IsPlayingProperty);
set => SetValue(IsPlayingProperty, value);
}
public SyncAnimationControl()
{
InitializeComponent();
Loaded += OnLoaded;
}
private void OnLoaded(object sender, RoutedEventArgs e)
{
if (IsPlaying)
{
PlayAnimation();
}
}
private static void OnIsPlayingChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var control = (SyncAnimationControl)d;
if ((bool)e.NewValue)
{
control.PlayAnimation();
}
else
{
control.AnimationPlayer.Stop();
}
}
private void PlayAnimation()
{
#pragma warning disable CS4014 // Fire-and-forget is intentional for looped animation playback.
AnimationPlayer.PlayAsync(0, 1, looped: true);
#pragma warning restore CS4014
}
}