Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Flow.Launcher/Resources/Controls/ExCard.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
x:Name="expanderHeader"
Padding="0"
BorderThickness="1"
IsExpanded="{Binding Mode=TwoWay, Path=IsExpanded}"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this card for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

item in setting window. it's custom control included split setting window PR.
before

<Border Style="{DynamicResource SettingGroupBox}">
                                <ItemsControl Style="{StaticResource SettingGrid}">
                                    <StackPanel Style="{StaticResource TextPanel}">
                                        <TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource hideNotifyIcon}" />
                                        <TextBlock Style="{DynamicResource SettingSubTitleLabel}" Text="{DynamicResource hideNotifyIconToolTip}" />
                                    </StackPanel>
                                    <ui:ToggleSwitch
                                        Grid.Column="2"
                                        FocusVisualMargin="5"
                                        IsOn="{Binding Settings.HideNotifyIcon}"
                                        Style="{DynamicResource SideToggleSwitch}" />
                                </ItemsControl>
                            </Border>

After

       <cc:Card
                Title="{DynamicResource portableMode}"
                Icon="&#xe88e;"
                Sub="{DynamicResource portableModeToolTIp}">
                <ui:ToggleSwitch IsOn="{Binding PortableMode}" />
            </cc:Card>

SnapsToDevicePixels="False">
<Expander.Style>
<Style TargetType="{x:Type Expander}">
Expand Down Expand Up @@ -54,7 +53,7 @@
FontStyle="{TemplateBinding FontStyle}"
FontWeight="{TemplateBinding FontWeight}"
Foreground="{TemplateBinding Foreground}"
IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource AncestorType=Expander}}">
<ToggleButton.Style>
<Style TargetType="{x:Type ToggleButton}">
<Setter Property="Template">
Expand Down
90 changes: 48 additions & 42 deletions Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,20 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:wpftk="clr-namespace:WpfToolkit.Controls;assembly=VirtualizingWrapPanel"
xmlns:viewModels="clr-namespace:Flow.Launcher.SettingPages.ViewModels"
xmlns:wpftk="clr-namespace:WpfToolkit.Controls;assembly=VirtualizingWrapPanel"
Title="PluginStore"
FocusManager.FocusedElement="{Binding ElementName=PluginStoreFilterTextbox}"
KeyDown="SettingsPanePlugins_OnKeyDown"
d:DataContext="{d:DesignInstance viewModels:SettingsPanePluginStoreViewModel}"
d:DesignHeight="450"
d:DesignWidth="800"
FocusManager.FocusedElement="{Binding ElementName=PluginStoreFilterTextbox}"
KeyDown="SettingsPanePlugins_OnKeyDown"
mc:Ignorable="d">
<ui:Page.Resources>
<CollectionViewSource x:Key="PluginStoreCollectionView" Source="{Binding ExternalPlugins}" Filter="PluginStoreCollectionView_OnFilter">
<CollectionViewSource
x:Key="PluginStoreCollectionView"
Filter="PluginStoreCollectionView_OnFilter"
Source="{Binding ExternalPlugins}">
<CollectionViewSource.GroupDescriptions>
<PropertyGroupDescription PropertyName="Category" />
</CollectionViewSource.GroupDescriptions>
Expand All @@ -34,9 +37,9 @@
<Border
Grid.Row="0"
Grid.Column="0"
Padding="5 18 0 0">
Padding="5,18,0,0">
<TextBlock
Margin="0 5"
Margin="0,5"
FontSize="30"
Style="{StaticResource PageTitle}"
Text="{DynamicResource pluginStore}"
Expand All @@ -46,13 +49,13 @@
<DockPanel
Grid.Row="0"
Grid.Column="1"
Margin="5 24 0 0">
Margin="5,24,0,0">

<TextBox
Name="PluginStoreFilterTextbox"
Width="150"
Height="34"
Margin="0 0 26 0"
Margin="0,0,26,0"
HorizontalAlignment="Right"
ContextMenu="{StaticResource TextBoxContextMenu}"
DockPanel.Dock="Right"
Expand All @@ -72,7 +75,7 @@
Stretch="None">
<VisualBrush.Visual>
<Label
Padding="10 0 0 0"
Padding="10,0,0,0"
Content="{DynamicResource searchplugin}"
Foreground="{DynamicResource CustomContextDisabled}" />
</VisualBrush.Visual>
Expand All @@ -94,8 +97,8 @@
</TextBox>
<Button
Height="34"
Margin="0 5 10 5"
Padding="12 4"
Margin="0,5,10,5"
Padding="12,4"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Command="{Binding RefreshExternalPluginsCommand}"
Expand All @@ -108,8 +111,8 @@
Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="2"
Margin="4 0 0 0"
Padding="0 0 18 0"
Margin="4,0,0,0"
Padding="0,0,18,0"
FontSize="14"
ItemContainerStyle="{StaticResource StoreList}"
ItemsSource="{Binding Source={StaticResource PluginStoreCollectionView}}"
Expand All @@ -124,7 +127,7 @@
<ItemsPanelTemplate>
<wpftk:VirtualizingWrapPanel
x:Name="ItemWrapPanel"
Margin="0 0 0 10"
Margin="0,0,0,10"
ItemSize="216,184"
MouseWheelDelta="48"
Orientation="Vertical"
Expand All @@ -143,7 +146,7 @@
<Grid>
<StackPanel Orientation="Vertical">
<TextBlock
Margin="2 0 0 10"
Margin="2,0,0,10"
VerticalAlignment="Top"
FontSize="16"
FontWeight="Bold"
Expand All @@ -159,7 +162,7 @@
</GroupStyle.ContainerStyle>
<GroupStyle.Panel>
<ItemsPanelTemplate>
<VirtualizingStackPanel Orientation="{Binding Orientation, Mode=OneWay}" />
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed here. Doesn't use orientation.

<VirtualizingStackPanel />
</ItemsPanelTemplate>
</GroupStyle.Panel>
</GroupStyle>
Expand Down Expand Up @@ -231,10 +234,10 @@
<VirtualizingStackPanel
Grid.Row="0"
Grid.Column="0"
Margin="5 0 0 0"
Margin="5,0,0,0"
Orientation="Horizontal">
<TextBlock
Margin="0 0 5 0"
Margin="0,0,5,0"
VerticalAlignment="Center"
FontSize="14"
FontWeight="Bold"
Expand All @@ -253,9 +256,12 @@
<TextBlock
Grid.Row="1"
Grid.Column="0"
Margin="5 4 0 0"
Margin="5,4,0,0"
TextWrapping="Wrap">
<Hyperlink Foreground="{DynamicResource Color04B}" NavigateUri="{Binding Website}" RequestNavigate="Hyperlink_OnRequestNavigate">
<Hyperlink
Foreground="{DynamicResource Color04B}"
NavigateUri="{Binding Website}"
RequestNavigate="Hyperlink_OnRequestNavigate">
<Run FontSize="12" Text="{Binding Author, Mode=OneWay}" />
</Hyperlink>
</TextBlock>
Expand All @@ -264,40 +270,40 @@
Grid.Row="0"
Grid.RowSpan="2"
Grid.Column="1"
Margin="20 0 0 0"
Margin="20,0,0,0"
HorizontalAlignment="Right"
Orientation="Horizontal">
<Button
MinHeight="42"
Margin="5 0"
Padding="15 5"
Margin="5,0"
Padding="15,5"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
Content="{DynamicResource installbtn}"
Visibility="{Binding LabelInstalled, Converter={StaticResource BoolToVisibilityConverter}, ConverterParameter='!'}"
Command="{Binding ShowCommandQueryCommand}"
CommandParameter="install" />
CommandParameter="install"
Content="{DynamicResource installbtn}"
Visibility="{Binding LabelInstalled, Converter={StaticResource BoolToVisibilityConverter}, ConverterParameter='!'}" />
<Button
MinHeight="42"
Margin="5 0"
Padding="15 5"
Margin="5,0"
Padding="15,5"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Content="{DynamicResource uninstallbtn}"
Visibility="{Binding LabelInstalled, Converter={StaticResource BoolToVisibilityConverter}}"
Command="{Binding ShowCommandQueryCommand}"
CommandParameter="uninstall" />
CommandParameter="uninstall"
Content="{DynamicResource uninstallbtn}"
Visibility="{Binding LabelInstalled, Converter={StaticResource BoolToVisibilityConverter}}" />
<Button
MinHeight="42"
Margin="5 0"
Padding="15 5"
Margin="5,0"
Padding="15,5"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Command="{Binding ShowCommandQueryCommand}"
CommandParameter="update"
Content="{DynamicResource updatebtn}"
Style="{DynamicResource AccentButtonStyle}"
Visibility="{Binding LabelUpdate, Converter={StaticResource BoolToVisibilityConverter}}"
Command="{Binding ShowCommandQueryCommand}"
CommandParameter="update" />
Visibility="{Binding LabelUpdate, Converter={StaticResource BoolToVisibilityConverter}}" />
</VirtualizingStackPanel>
</Grid>
</ui:Flyout>
Expand All @@ -308,15 +314,15 @@
<Image
Width="32"
Height="32"
Margin="18 24 0 0"
Margin="18,24,0,0"
HorizontalAlignment="Left"
RenderOptions.BitmapScalingMode="Fant"
Source="{Binding IcoPath, IsAsync=True}" />
<Border
x:Name="LabelUpdate"
Height="12"
Margin="10 24 0 0"
Padding="6 2"
Margin="10,24,0,0"
Padding="6,2"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Background="#45BD59"
Expand All @@ -325,16 +331,16 @@
Visibility="{Binding LabelUpdate, Converter={StaticResource BoolToVisibilityConverter}}" />
</StackPanel>
<TextBlock
Margin="18 10 18 0"
Margin="18,10,18,0"
FontWeight="SemiBold"
Foreground="{DynamicResource Color05B}"
Text="{Binding Name}"
TextWrapping="Wrap"
ToolTip="{Binding Version}" />
<TextBlock
Height="60"
Margin="18 6 18 0"
Padding="0 0 0 10"
Margin="18,6,18,0"
Padding="0,0,0,10"
FontSize="12"
Foreground="{DynamicResource Color04B}"
Text="{Binding Description, Mode=OneWay}"
Expand Down
5 changes: 3 additions & 2 deletions Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
d:DataContext="{d:DesignInstance viewModels:SettingsPaneThemeViewModel}"
d:DesignHeight="450"
d:DesignWidth="800"
Style="{DynamicResource SettingPageBasic}"
mc:Ignorable="d">
<ui:Page.Resources>
<ResourceDictionary>
Expand Down Expand Up @@ -112,10 +111,12 @@
Visibility="Visible" />

<flowlauncher:ResultListBox
x:Name="ResultListBox"
Grid.Row="2"
DataContext="{Binding PreviewResults, Mode=OneTime}"
Visibility="Visible" />

<Border x:Name="ContextMenu" Visibility="Collapsed" />
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a problem of attempting to control the context menu and history that do not exist in the preview area. So I added here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is always Collapsed, then why would it be needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The preview area is created by importing the mainwindow. There is code in the main window code that tries to draw the contextmenu and history, which works here as well. We didn't insert that part here at all, because the visibility behavior code tries to touch the contextmenu and history, which causes a binding error. So I added an invisible layer with the same name to receive visibility related behaviors. Purely for error prevention.

<Border x:Name="History" Visibility="Collapsed" />
</Grid>
</Border>
</Border>
Expand Down