Skip to content

Commit

Permalink
various UI improvements 🎨
Browse files Browse the repository at this point in the history
- loading overlay
- animation background / border de-glitched
  • Loading branch information
nor0x committed Apr 25, 2023
1 parent 7bdee74 commit cebe885
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
18 changes: 16 additions & 2 deletions src/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -629,15 +629,28 @@
</Border>
</Grid>
</Grid>
<Border
IsVisible="{Binding IsBusy}"
Padding="0"
StrokeThickness="0"
Grid.RowSpan="2">
<Border.Background>
<RadialGradientBrush>
<GradientStopCollection>
<GradientStop Color="{StaticResource BackgroundSubtle}" Offset="0" />
<GradientStop Color="#aa605d64" Offset="1" />
</GradientStopCollection>
</RadialGradientBrush>
</Border.Background>
<VerticalStackLayout
IsVisible="{Binding IsBusy}"
x:Name="LoadingPanel"
Grid.Row="1"
BackgroundColor="{StaticResource BackgroundSubtle}"
HorizontalOptions="Center"
VerticalOptions="Center">
<WebView
x:Name="AnimationView"
WidthRequest="180"
BackgroundColor="{StaticResource BackgroundSubtle}"
HeightRequest="200"
InputTransparent="true" />
<Label
Expand All @@ -647,5 +660,6 @@
FontSize="16"
HorizontalTextAlignment="Center" />
</VerticalStackLayout>
</Border>
</Grid>
</ContentPage>
14 changes: 13 additions & 1 deletion src/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using System;
using System.Diagnostics;
using static System.Runtime.InteropServices.JavaScript.JSType;
using Microsoft.Maui.Platform;

namespace Dots;

Expand All @@ -22,10 +23,21 @@ public MainPage(MainViewModel vm)
InitializeComponent();
AnimationView.Source = new HtmlWebViewSource()
{
Html = $$"""<body style=background:#605d64;overflow:hidden><video autoplay loop muted style=width:180px;height:180px><source src="https://github.com/nor0x/Dots/raw/main/Assets/dotsanimation1.mp4" "type=" video/mp4">"""
Html = $$"""<body style="background:#605d64 !important;overflow:hidden"><video autoplay loop muted style="width:180px;height:180px;background:#605d64 !important;border:0px!important"><source src="https://github.com/nor0x/Dots/raw/main/Assets/dotsanimation1.mp4" "type=" video/mp4">"""
};
}

protected override void OnHandlerChanged()
{
base.OnHandlerChanged();
#if WINDOWS
if(MainSearchBar.Handler.PlatformView is Microsoft.UI.Xaml.Controls.AutoSuggestBox asb)
{

}
#endif
}

protected async override void OnAppearing()
{
base.OnAppearing();
Expand Down

0 comments on commit cebe885

Please sign in to comment.