Add FitType for card control

This commit is contained in:
DB p 2024-04-19 01:11:29 +09:00
parent bd778c27a8
commit 603d0f45ca
3 changed files with 11 additions and 8 deletions

View file

@ -199,7 +199,7 @@
<system:String x:Key="QuickWidthHotkey">Quick Adjust Window Width Size</system:String> <system:String x:Key="QuickWidthHotkey">Quick Adjust Window Width Size</system:String>
<system:String x:Key="QuickHeightHotkey">Quick Adjust Window Height Size</system:String> <system:String x:Key="QuickHeightHotkey">Quick Adjust Window Height Size</system:String>
<system:String x:Key="ReloadPluginHotkeyToolTip">Use it when the plugin settings you changed don't take effect.</system:String> <system:String x:Key="ReloadPluginHotkeyToolTip">Use it when the plugin settings you changed don't take effect.</system:String>
<system:String x:Key="AdditionalHotkeyToolTip">You can add one more hotkey for this function. It's complimentary</system:String> <system:String x:Key="AdditionalHotkeyToolTip">You can add one more hotkey for this function.</system:String>
<system:String x:Key="customQueryHotkey">Custom Query Hotkeys</system:String> <system:String x:Key="customQueryHotkey">Custom Query Hotkeys</system:String>
<system:String x:Key="customQueryShortcut">Custom Query Shortcuts</system:String> <system:String x:Key="customQueryShortcut">Custom Query Shortcuts</system:String>
<system:String x:Key="builtinShortcuts">Built-in Shortcuts</system:String> <system:String x:Key="builtinShortcuts">Built-in Shortcuts</system:String>

View file

@ -29,6 +29,13 @@
<Setter Property="Margin" Value="0,0,0,0" /> <Setter Property="Margin" Value="0,0,0,0" />
<Setter Property="Background" Value="Transparent" /> <Setter Property="Background" Value="Transparent" />
</DataTrigger> </DataTrigger>
<DataTrigger Binding="{Binding Type, RelativeSource={RelativeSource AncestorType=local:Card}}" Value="InsideFit">
<Setter Property="BorderThickness" Value="0,1,0,0" />
<Setter Property="CornerRadius" Value="0" />
<Setter Property="Margin" Value="0,0,0,0" />
<Setter Property="Padding" Value="38,0,26,0" />
<Setter Property="Background" Value="Transparent" />
</DataTrigger>
</Style.Triggers> </Style.Triggers>
</Style> </Style>
</Border.Style> </Border.Style>
@ -48,7 +55,6 @@
HorizontalAlignment="Right" HorizontalAlignment="Right"
VerticalAlignment="Center" VerticalAlignment="Center"
Content="{TemplateBinding Content}" /> Content="{TemplateBinding Content}" />
<StackPanel> <StackPanel>
<StackPanel.Style> <StackPanel.Style>
<Style TargetType="{x:Type StackPanel}"> <Style TargetType="{x:Type StackPanel}">

View file

@ -2841,9 +2841,8 @@
</cc:ExCard.SideContent> </cc:ExCard.SideContent>
<cc:Card <cc:Card
Title="{DynamicResource autoCompleteHotkey}" Title="{DynamicResource autoCompleteHotkey}"
Icon="&#xe710;"
Sub="{DynamicResource AdditionalHotkeyToolTip}" Sub="{DynamicResource AdditionalHotkeyToolTip}"
Type="Inside"> Type="InsideFit">
<flowlauncher:HotkeyControl <flowlauncher:HotkeyControl
DefaultHotkey="" DefaultHotkey=""
Hotkey="{Binding Settings.AutoCompleteHotkey2}" Hotkey="{Binding Settings.AutoCompleteHotkey2}"
@ -2864,9 +2863,8 @@
</cc:ExCard.SideContent> </cc:ExCard.SideContent>
<cc:Card <cc:Card
Title="{DynamicResource SelectNextItemHotkey}" Title="{DynamicResource SelectNextItemHotkey}"
Icon="&#xe710;"
Sub="{DynamicResource AdditionalHotkeyToolTip}" Sub="{DynamicResource AdditionalHotkeyToolTip}"
Type="Inside"> Type="InsideFit">
<flowlauncher:HotkeyControl <flowlauncher:HotkeyControl
DefaultHotkey="" DefaultHotkey=""
Hotkey="{Binding Settings.SelectNextItemHotkey2}" Hotkey="{Binding Settings.SelectNextItemHotkey2}"
@ -2886,9 +2884,8 @@
</cc:ExCard.SideContent> </cc:ExCard.SideContent>
<cc:Card <cc:Card
Title="{DynamicResource SelectPrevItemHotkey}" Title="{DynamicResource SelectPrevItemHotkey}"
Icon="&#xe710;"
Sub="{DynamicResource AdditionalHotkeyToolTip}" Sub="{DynamicResource AdditionalHotkeyToolTip}"
Type="Inside"> Type="InsideFit">
<flowlauncher:HotkeyControl <flowlauncher:HotkeyControl
DefaultHotkey="" DefaultHotkey=""
Hotkey="{Binding Settings.SelectPrevItemHotkey2}" Hotkey="{Binding Settings.SelectPrevItemHotkey2}"