mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Merge pull request #1667 from onesounds/ProgressBarUpgrade
Fix Progressbar & Margin issue with preview panel
This commit is contained in:
commit
a1dae1d9c4
3 changed files with 21 additions and 19 deletions
|
|
@ -284,6 +284,20 @@
|
|||
</Canvas>
|
||||
</Grid>
|
||||
</Border>
|
||||
<Line
|
||||
x:Name="ProgressBar"
|
||||
Width="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Grid}}, Path=ActualWidth}"
|
||||
Height="2"
|
||||
Margin="12,0,12,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Bottom"
|
||||
StrokeThickness="2"
|
||||
Style="{DynamicResource PendingLineStyle}"
|
||||
Visibility="{Binding ProgressBarVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
X1="-100"
|
||||
X2="0"
|
||||
Y1="0"
|
||||
Y2="0" />
|
||||
</Grid>
|
||||
|
||||
<Grid ClipToBounds="True">
|
||||
|
|
@ -310,18 +324,7 @@
|
|||
HorizontalAlignment="Stretch"
|
||||
Style="{DynamicResource SeparatorStyle}" />
|
||||
</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.ColumnDefinitions>
|
||||
|
|
|
|||
|
|
@ -361,15 +361,13 @@ namespace Flow.Launcher
|
|||
}
|
||||
private void InitProgressbarAnimation()
|
||||
{
|
||||
var da = new DoubleAnimation(ProgressBar.X2, ActualWidth + 150,
|
||||
new Duration(new TimeSpan(0, 0, 0, 0, 1600)));
|
||||
var da1 = new DoubleAnimation(ProgressBar.X1, ActualWidth + 50, new Duration(new TimeSpan(0, 0, 0, 0, 1600)));
|
||||
var da = new DoubleAnimation(ProgressBar.X2, ActualWidth + 100, new Duration(new TimeSpan(0, 0, 0, 0, 1600)));
|
||||
var da1 = new DoubleAnimation(ProgressBar.X1, ActualWidth + 0, new Duration(new TimeSpan(0, 0, 0, 0, 1600)));
|
||||
Storyboard.SetTargetProperty(da, new PropertyPath("(Line.X2)"));
|
||||
Storyboard.SetTargetProperty(da1, new PropertyPath("(Line.X1)"));
|
||||
_progressBarStoryboard.Children.Add(da);
|
||||
_progressBarStoryboard.Children.Add(da1);
|
||||
_progressBarStoryboard.RepeatBehavior = RepeatBehavior.Forever;
|
||||
|
||||
_viewModel.ProgressBarVisibility = Visibility.Hidden;
|
||||
isProgressBarStoryboardPaused = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -366,7 +366,7 @@
|
|||
<Style.Triggers>
|
||||
<MultiDataTrigger>
|
||||
<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=History, Path=Visibility}" Value="Collapsed" />
|
||||
</MultiDataTrigger.Conditions>
|
||||
|
|
@ -451,15 +451,16 @@
|
|||
<Style.Triggers>
|
||||
<MultiDataTrigger>
|
||||
<MultiDataTrigger.Conditions>
|
||||
<!--
|
||||
<Condition Binding="{Binding ElementName=ResultListBox, 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" />-->
|
||||
<Condition Binding="{Binding ElementName=ResultListBox, Path=Items.Count}" Value="0" />
|
||||
</MultiDataTrigger.Conditions>
|
||||
<MultiDataTrigger.Setters>
|
||||
<Setter Property="Height" Value="0" />
|
||||
</MultiDataTrigger.Setters>
|
||||
</MultiDataTrigger>
|
||||
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<!-- for classic themes -->
|
||||
|
|
|
|||
Loading…
Reference in a new issue