mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Remove Progressbar / Add Progress Ring
This commit is contained in:
parent
a43c483cee
commit
2fda16cfd4
3 changed files with 19 additions and 20 deletions
|
|
@ -261,6 +261,16 @@
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<Border>
|
<Border>
|
||||||
<Grid>
|
<Grid>
|
||||||
|
<ui:ProgressRing
|
||||||
|
x:Name="ProgressBar"
|
||||||
|
Width="24"
|
||||||
|
Height="24"
|
||||||
|
Margin="0,0,68,0"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Panel.ZIndex="2"
|
||||||
|
IsActive="true"
|
||||||
|
Visibility="{Binding ProgressBarVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
||||||
<Image
|
<Image
|
||||||
x:Name="PluginActivationIcon"
|
x:Name="PluginActivationIcon"
|
||||||
Width="32"
|
Width="32"
|
||||||
|
|
@ -310,18 +320,6 @@
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
Style="{DynamicResource SeparatorStyle}" />
|
Style="{DynamicResource SeparatorStyle}" />
|
||||||
</ContentControl>
|
</ContentControl>
|
||||||
<Line
|
|
||||||
x:Name="ProgressBar"
|
|
||||||
Width="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Grid}}, Path=ActualWidth}"
|
|
||||||
Height="2"
|
|
||||||
HorizontalAlignment="Right"
|
|
||||||
StrokeThickness="1"
|
|
||||||
Style="{DynamicResource PendingLineStyle}"
|
|
||||||
Visibility="{Binding ProgressBarVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
||||||
X1="-150"
|
|
||||||
X2="-50"
|
|
||||||
Y1="0"
|
|
||||||
Y2="0" />
|
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
|
|
|
||||||
|
|
@ -361,13 +361,14 @@ namespace Flow.Launcher
|
||||||
}
|
}
|
||||||
private void InitProgressbarAnimation()
|
private void InitProgressbarAnimation()
|
||||||
{
|
{
|
||||||
var da = new DoubleAnimation(ProgressBar.X2, ActualWidth + 150,
|
|
||||||
new Duration(new TimeSpan(0, 0, 0, 0, 1600)));
|
//var da = new DoubleAnimation(ProgressBar.X2, ActualWidth + 150,
|
||||||
var da1 = new DoubleAnimation(ProgressBar.X1, ActualWidth + 50, new Duration(new TimeSpan(0, 0, 0, 0, 1600)));
|
// new Duration(new TimeSpan(0, 0, 0, 0, 1600)));
|
||||||
Storyboard.SetTargetProperty(da, new PropertyPath("(Line.X2)"));
|
//var da1 = new DoubleAnimation(ProgressBar.X1, ActualWidth + 50, new Duration(new TimeSpan(0, 0, 0, 0, 1600)));
|
||||||
Storyboard.SetTargetProperty(da1, new PropertyPath("(Line.X1)"));
|
//Storyboard.SetTargetProperty(da, new PropertyPath("(Line.X2)"));
|
||||||
_progressBarStoryboard.Children.Add(da);
|
//Storyboard.SetTargetProperty(da1, new PropertyPath("(Line.X1)"));
|
||||||
_progressBarStoryboard.Children.Add(da1);
|
//_progressBarStoryboard.Children.Add(da);
|
||||||
|
//_progressBarStoryboard.Children.Add(da1);
|
||||||
_progressBarStoryboard.RepeatBehavior = RepeatBehavior.Forever;
|
_progressBarStoryboard.RepeatBehavior = RepeatBehavior.Forever;
|
||||||
|
|
||||||
_viewModel.ProgressBarVisibility = Visibility.Hidden;
|
_viewModel.ProgressBarVisibility = Visibility.Hidden;
|
||||||
|
|
|
||||||
|
|
@ -366,7 +366,7 @@
|
||||||
<Style.Triggers>
|
<Style.Triggers>
|
||||||
<MultiDataTrigger>
|
<MultiDataTrigger>
|
||||||
<MultiDataTrigger.Conditions>
|
<MultiDataTrigger.Conditions>
|
||||||
<Condition Binding="{Binding ElementName=ResultListBox, Path=Visibility}" Value="Collapsed" />
|
<Condition Binding="{Binding ElementName=ResultListBox, Path=Items.Count}" Value="0" />
|
||||||
<Condition Binding="{Binding ElementName=ContextMenu, Path=Visibility}" Value="Collapsed" />
|
<Condition Binding="{Binding ElementName=ContextMenu, Path=Visibility}" Value="Collapsed" />
|
||||||
<Condition Binding="{Binding ElementName=History, Path=Visibility}" Value="Collapsed" />
|
<Condition Binding="{Binding ElementName=History, Path=Visibility}" Value="Collapsed" />
|
||||||
</MultiDataTrigger.Conditions>
|
</MultiDataTrigger.Conditions>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue