Advanced paste clipboard preview should be binded to settings

This commit is contained in:
Kai Tao
2025-11-12 19:27:22 +08:00
parent a112884969
commit c7dfc0dc63
2 changed files with 5 additions and 1 deletions

View File

@@ -156,7 +156,7 @@
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
BorderThickness="1"
CornerRadius="20"
Visibility="{x:Bind ViewModel.ClipboardHasData, Converter={StaticResource BoolToVisibilityConverter}, Mode=OneWay}">
Visibility="{x:Bind ViewModel.ShowClipboardPreview, Converter={StaticResource BoolToVisibilityConverter}, Mode=OneWay}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />

View File

@@ -60,9 +60,11 @@ namespace AdvancedPaste.ViewModels
[NotifyPropertyChangedFor(nameof(ClipboardHasDataForCustomAI))]
[NotifyPropertyChangedFor(nameof(InputTxtBoxPlaceholderText))]
[NotifyPropertyChangedFor(nameof(CustomAIUnavailableErrorText))]
[NotifyPropertyChangedFor(nameof(ShowClipboardPreview))]
private ClipboardFormat _availableClipboardFormats;
[ObservableProperty]
[NotifyPropertyChangedFor(nameof(ShowClipboardPreview))]
private bool _clipboardHistoryEnabled;
[ObservableProperty]
@@ -225,6 +227,8 @@ namespace AdvancedPaste.ViewModels
public bool ClipboardHasDataForCustomAI => PasteFormat.SupportsClipboardFormats(CustomAIFormat, AvailableClipboardFormats);
public bool ShowClipboardPreview => ClipboardHistoryEnabled;
public bool HasIndeterminateTransformProgress => double.IsNaN(TransformProgress);
private PasteFormats CustomAIFormat =>