Skip to content

Commit 2fda16c

Browse files
committed
Remove Progressbar / Add Progress Ring
1 parent a43c483 commit 2fda16c

File tree

3 files changed

+19
-20
lines changed

3 files changed

+19
-20
lines changed

Flow.Launcher/MainWindow.xaml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,16 @@
261261
</StackPanel>
262262
<Border>
263263
<Grid>
264+
<ui:ProgressRing
265+
x:Name="ProgressBar"
266+
Width="24"
267+
Height="24"
268+
Margin="0,0,68,0"
269+
HorizontalAlignment="Right"
270+
VerticalAlignment="Center"
271+
Panel.ZIndex="2"
272+
IsActive="true"
273+
Visibility="{Binding ProgressBarVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
264274
<Image
265275
x:Name="PluginActivationIcon"
266276
Width="32"
@@ -310,18 +320,6 @@
310320
HorizontalAlignment="Stretch"
311321
Style="{DynamicResource SeparatorStyle}" />
312322
</ContentControl>
313-
<Line
314-
x:Name="ProgressBar"
315-
Width="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Grid}}, Path=ActualWidth}"
316-
Height="2"
317-
HorizontalAlignment="Right"
318-
StrokeThickness="1"
319-
Style="{DynamicResource PendingLineStyle}"
320-
Visibility="{Binding ProgressBarVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
321-
X1="-150"
322-
X2="-50"
323-
Y1="0"
324-
Y2="0" />
325323
</Grid>
326324
<Grid>
327325
<Grid.ColumnDefinitions>

Flow.Launcher/MainWindow.xaml.cs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -361,13 +361,14 @@ private async void PositionReset()
361361
}
362362
private void InitProgressbarAnimation()
363363
{
364-
var da = new DoubleAnimation(ProgressBar.X2, ActualWidth + 150,
365-
new Duration(new TimeSpan(0, 0, 0, 0, 1600)));
366-
var da1 = new DoubleAnimation(ProgressBar.X1, ActualWidth + 50, new Duration(new TimeSpan(0, 0, 0, 0, 1600)));
367-
Storyboard.SetTargetProperty(da, new PropertyPath("(Line.X2)"));
368-
Storyboard.SetTargetProperty(da1, new PropertyPath("(Line.X1)"));
369-
_progressBarStoryboard.Children.Add(da);
370-
_progressBarStoryboard.Children.Add(da1);
364+
365+
//var da = new DoubleAnimation(ProgressBar.X2, ActualWidth + 150,
366+
// new Duration(new TimeSpan(0, 0, 0, 0, 1600)));
367+
//var da1 = new DoubleAnimation(ProgressBar.X1, ActualWidth + 50, new Duration(new TimeSpan(0, 0, 0, 0, 1600)));
368+
//Storyboard.SetTargetProperty(da, new PropertyPath("(Line.X2)"));
369+
//Storyboard.SetTargetProperty(da1, new PropertyPath("(Line.X1)"));
370+
//_progressBarStoryboard.Children.Add(da);
371+
//_progressBarStoryboard.Children.Add(da1);
371372
_progressBarStoryboard.RepeatBehavior = RepeatBehavior.Forever;
372373

373374
_viewModel.ProgressBarVisibility = Visibility.Hidden;

Flow.Launcher/Themes/Base.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@
366366
<Style.Triggers>
367367
<MultiDataTrigger>
368368
<MultiDataTrigger.Conditions>
369-
<Condition Binding="{Binding ElementName=ResultListBox, Path=Visibility}" Value="Collapsed" />
369+
<Condition Binding="{Binding ElementName=ResultListBox, Path=Items.Count}" Value="0" />
370370
<Condition Binding="{Binding ElementName=ContextMenu, Path=Visibility}" Value="Collapsed" />
371371
<Condition Binding="{Binding ElementName=History, Path=Visibility}" Value="Collapsed" />
372372
</MultiDataTrigger.Conditions>

0 commit comments

Comments
 (0)