mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 19:57:57 +01:00
Advanced paste clipboard preview should be binded to settings
This commit is contained in:
@@ -156,7 +156,7 @@
|
|||||||
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
|
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
CornerRadius="20"
|
CornerRadius="20"
|
||||||
Visibility="{x:Bind ViewModel.ClipboardHasData, Converter={StaticResource BoolToVisibilityConverter}, Mode=OneWay}">
|
Visibility="{x:Bind ViewModel.ShowClipboardPreview, Converter={StaticResource BoolToVisibilityConverter}, Mode=OneWay}">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
|
|||||||
@@ -60,9 +60,11 @@ namespace AdvancedPaste.ViewModels
|
|||||||
[NotifyPropertyChangedFor(nameof(ClipboardHasDataForCustomAI))]
|
[NotifyPropertyChangedFor(nameof(ClipboardHasDataForCustomAI))]
|
||||||
[NotifyPropertyChangedFor(nameof(InputTxtBoxPlaceholderText))]
|
[NotifyPropertyChangedFor(nameof(InputTxtBoxPlaceholderText))]
|
||||||
[NotifyPropertyChangedFor(nameof(CustomAIUnavailableErrorText))]
|
[NotifyPropertyChangedFor(nameof(CustomAIUnavailableErrorText))]
|
||||||
|
[NotifyPropertyChangedFor(nameof(ShowClipboardPreview))]
|
||||||
private ClipboardFormat _availableClipboardFormats;
|
private ClipboardFormat _availableClipboardFormats;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
|
[NotifyPropertyChangedFor(nameof(ShowClipboardPreview))]
|
||||||
private bool _clipboardHistoryEnabled;
|
private bool _clipboardHistoryEnabled;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
@@ -225,6 +227,8 @@ namespace AdvancedPaste.ViewModels
|
|||||||
|
|
||||||
public bool ClipboardHasDataForCustomAI => PasteFormat.SupportsClipboardFormats(CustomAIFormat, AvailableClipboardFormats);
|
public bool ClipboardHasDataForCustomAI => PasteFormat.SupportsClipboardFormats(CustomAIFormat, AvailableClipboardFormats);
|
||||||
|
|
||||||
|
public bool ShowClipboardPreview => ClipboardHistoryEnabled;
|
||||||
|
|
||||||
public bool HasIndeterminateTransformProgress => double.IsNaN(TransformProgress);
|
public bool HasIndeterminateTransformProgress => double.IsNaN(TransformProgress);
|
||||||
|
|
||||||
private PasteFormats CustomAIFormat =>
|
private PasteFormats CustomAIFormat =>
|
||||||
|
|||||||
Reference in New Issue
Block a user