mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Fix progressbar loading
This commit is contained in:
parent
99006465e6
commit
1ab4f99a37
2 changed files with 6 additions and 24 deletions
|
|
@ -37,12 +37,9 @@
|
|||
PreviewDragOver="OnPreviewDragOver"
|
||||
AllowDrop="True"
|
||||
x:Name="QueryTextBox" />
|
||||
<Line Style="{DynamicResource PendingLineStyle}" x:Name="ProgressBar" Y1="0" Y2="0" X2="100" Height="2"
|
||||
StrokeThickness="1"
|
||||
Visibility="{Binding ProgressBarVisibility}" HorizontalAlignment="Right" Width="752">
|
||||
<Line.ToolTip>
|
||||
<ToolTip IsOpen="{Binding IsProgressBarTooltipVisible}" />
|
||||
</Line.ToolTip>
|
||||
<Line x:Name="ProgressBar" HorizontalAlignment="Right"
|
||||
Style="{DynamicResource PendingLineStyle}" Visibility="{Binding ProgressBarVisibility, Mode=TwoWay}"
|
||||
Y1="0" Y2="0" X2="100" Height="2" Width="752" StrokeThickness="1">
|
||||
</Line>
|
||||
<ContentControl Content="{Binding Results}" Visibility="{Binding ResultListBoxVisibility}" />
|
||||
<ContentControl Content="{Binding ContextMenu}" Visibility="{Binding ContextMenuVisibility}" />
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ using Wox.Infrastructure.Hotkey;
|
|||
using Wox.Infrastructure.Storage;
|
||||
using Wox.Plugin;
|
||||
using Wox.Storage;
|
||||
using Stopwatch = Wox.Infrastructure.Stopwatch;
|
||||
|
||||
namespace Wox.ViewModel
|
||||
{
|
||||
|
|
@ -80,7 +79,6 @@ namespace Wox.ViewModel
|
|||
InitializeResultListBox();
|
||||
InitializeContextMenu();
|
||||
InitializeKeyCommands();
|
||||
|
||||
}
|
||||
|
||||
~MainViewModel()
|
||||
|
|
@ -121,19 +119,6 @@ namespace Wox.ViewModel
|
|||
}
|
||||
}
|
||||
|
||||
public bool IsProgressBarTooltipVisible
|
||||
{
|
||||
get
|
||||
{
|
||||
return _isProgressBarTooltipVisible;
|
||||
}
|
||||
set
|
||||
{
|
||||
_isProgressBarTooltipVisible = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public double Left
|
||||
{
|
||||
get
|
||||
|
|
@ -375,7 +360,7 @@ namespace Wox.ViewModel
|
|||
|
||||
private void HandleQueryTextUpdated()
|
||||
{
|
||||
IsProgressBarTooltipVisible = false;
|
||||
ProgressBarVisibility = Visibility.Hidden;
|
||||
_updateSource?.Cancel();
|
||||
_updateSource = new CancellationTokenSource();
|
||||
_updateToken = _updateSource.Token;
|
||||
|
|
@ -553,7 +538,7 @@ namespace Wox.ViewModel
|
|||
public void UpdateResultView(List<Result> list, PluginMetadata metadata, Query originQuery)
|
||||
{
|
||||
_queryHasReturn = true;
|
||||
IsProgressBarTooltipVisible = false;
|
||||
ProgressBarVisibility = Visibility.Hidden;
|
||||
|
||||
list.ForEach(o =>
|
||||
{
|
||||
|
|
@ -567,7 +552,7 @@ namespace Wox.ViewModel
|
|||
});
|
||||
}
|
||||
|
||||
if (list.Count > 0 && ! ResultListBoxVisibility.IsVisible())
|
||||
if (list.Count > 0 && !ResultListBoxVisibility.IsVisible())
|
||||
{
|
||||
ResultListBoxVisibility = Visibility.Visible;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue