Skip to content

Commit d7f3404

Browse files
committed
FilterEffectPickerでプログレスリングを表示
1 parent af69212 commit d7f3404

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

src/Beutl.Controls/PropertyEditors/FilterEffectPickerFlyoutPresenter.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,5 +91,9 @@ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs chang
9191
{
9292
PseudoClasses.Set(SearchBoxPseudoClass, ShowSearchBox);
9393
}
94+
else if (change.Property == IsBusyProperty)
95+
{
96+
PseudoClasses.Set(IsBusyPseudoClass, IsBusy);
97+
}
9498
}
9599
}

src/Beutl.Controls/Styling/PropertyEditors/FilterEffectPickerFlyoutPresenter.axaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343
Background="Transparent"
4444
ColumnDefinitions="*,Auto">
4545
<WrapPanel Name="TabLayout" Margin="4,4,0,4">
46-
<ToggleButton IsChecked="{TemplateBinding ShowSearchBox, Mode=TwoWay}" Name="ShowSearchBoxButton">
46+
<ToggleButton IsChecked="{TemplateBinding ShowSearchBox, Mode=TwoWay}"
47+
Name="ShowSearchBoxButton">
4748
<ui:SymbolIcon Symbol="Find" />
4849
</ToggleButton>
4950
<ToggleButton Name="ShowAllButton" IsChecked="{TemplateBinding ShowAll, Mode=TwoWay}">
@@ -110,6 +111,13 @@
110111
</ListBox.ItemTemplate>
111112
</ListBox>
112113
</StackPanel>
114+
115+
<ProgressRing Name="PART_ProgressRing"
116+
IsVisible="False"
117+
IsIndeterminate="False"
118+
Grid.RowSpan="3"
119+
VerticalAlignment="Center"
120+
HorizontalAlignment="Center" />
113121
</Grid>
114122
</ui:FABorder>
115123
</ControlTemplate>
@@ -126,6 +134,11 @@
126134
<Setter Property="IsVisible" Value="True" />
127135
</Style>
128136

137+
<Style Selector="^:busy /template/ ProgressRing#PART_ProgressRing">
138+
<Setter Property="IsVisible" Value="True" />
139+
<Setter Property="IsIndeterminate" Value="True" />
140+
</Style>
141+
129142
<Style Selector="^ /template/ WrapPanel#TabLayout">
130143
<Style Selector="^ > ToggleButton">
131144
<Setter Property="Width" Value="32" />

src/Beutl/Views/Editors/FilterEffectPickerFlyout.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using Beutl.ViewModels.Dialogs;
99
using FluentAvalonia.Core;
1010
using FluentAvalonia.UI.Controls.Primitives;
11+
using Reactive.Bindings.Extensions;
1112

1213
namespace Beutl.Views.Editors;
1314

@@ -30,6 +31,8 @@ protected override Control CreatePresenter()
3031
.Subscribe(v => viewModel.ShowAll.Value = v);
3132
pfp.GetObservable(FilterEffectPickerFlyoutPresenter.SearchTextProperty)
3233
.Subscribe(v => viewModel.SearchText.Value = v);
34+
viewModel.IsBusy.ObserveOnUIDispatcher()
35+
.Subscribe(v => pfp.IsBusy = v);
3336
pfp.KeyDown += (_, e) =>
3437
{
3538
switch (e.Key)

0 commit comments

Comments
 (0)