[Workspaces->launcherUI] Fix loading animation (#34442)

* WIP

* Minor changes

* removing spinner.gif

* Removing spinner.gif usage, references

* Update src/modules/Workspaces/WorkspacesLauncherUI/Models/AppLaunching.cs

* xaml formatting

---------

Co-authored-by: Stefan Markovic <stefan@janeasystems.com>
Co-authored-by: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com>
This commit is contained in:
Laszlo Nemeth 2024-08-27 11:10:35 +02:00 committed by GitHub
parent d676064be5
commit 320182dd89
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 21 additions and 7 deletions

View File

@ -34,6 +34,8 @@ namespace WorkspacesLauncherUI.Models
public string AppPath { get; set; }
public bool Loading => LaunchState == "waiting";
private Icon _icon;
public Icon Icon
@ -76,10 +78,9 @@ namespace WorkspacesLauncherUI.Models
{
get => LaunchState switch
{
"waiting" => "../images/spinner.gif",
"launched" => "../images/checkmark.png",
"failed" => "../images/failed.png",
_ => "../images/spinner.gif",
_ => "../images/failed.png",
};
}

View File

@ -2,6 +2,7 @@
x:Class="WorkspacesLauncherUI.StatusWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="clr-namespace:WorkspacesLauncherUI.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:WorkspacesLauncherUI"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
@ -21,6 +22,11 @@
Topmost="True"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<Window.Resources>
<BooleanToVisibilityConverter x:Key="BoolToVis" />
<converters:BooleanToInvertedVisibilityConverter x:Key="BooleanToInvertedVisibilityConverter" />
</Window.Resources>
<Grid Margin="5" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="1*" />
@ -55,6 +61,16 @@
FontWeight="Normal"
Foreground="{DynamicResource PrimaryForegroundBrush}"
Text="{Binding Name, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" />
<ui:ProgressRing
x:Name="ProgressRing"
Grid.Column="2"
Width="20"
Height="20"
Margin="10"
HorizontalAlignment="Center"
VerticalAlignment="Center"
IsActive="True"
Visibility="{Binding Loading, Mode=OneWay, Converter={StaticResource BoolToVis}, UpdateSourceTrigger=PropertyChanged}" />
<Image
Grid.Column="2"
Width="20"
@ -62,7 +78,8 @@
Margin="10"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Source="{Binding StateImageSource}" />
Source="{Binding StateImageSource}"
Visibility="{Binding Loading, Mode=OneWay, Converter={StaticResource BooleanToInvertedVisibilityConverter}, UpdateSourceTrigger=PropertyChanged}" />
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>

View File

@ -33,7 +33,6 @@
<None Remove="images\checkmark.png" />
<None Remove="images\DefaultIcon.ico" />
<None Remove="images\failed.png" />
<None Remove="images\spinner.gif" />
<None Remove="images\Workspaces.ico" />
</ItemGroup>
<ItemGroup>
@ -95,9 +94,6 @@
<Resource Include="images\failed.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="images\spinner.gif">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
</ItemGroup>
<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB