Skip to content

Commit 1e479ed

Browse files
committed
- Add plugin store tab (WIP)
1 parent e5d3424 commit 1e479ed

File tree

1 file changed

+85
-2
lines changed

1 file changed

+85
-2
lines changed

Flow.Launcher/SettingWindow.xaml

Lines changed: 85 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@
229229
</MultiTrigger.Conditions>
230230
<Setter TargetName="Bd" Property="Background" Value="#ffffff" />
231231
<Setter TargetName="Bd" Property="BorderBrush" Value="#e5e5e5" />
232-
<Setter TargetName="Bd" Property="Margin" Value="0 0 0 10" />
232+
<Setter TargetName="Bd" Property="Margin" Value="0 0 0 0" />
233233

234234

235235
</MultiTrigger>
@@ -241,7 +241,7 @@
241241
<Setter TargetName="Bd" Property="Background" Value="#ffffff" />
242242
<Setter TargetName="Bd" Property="BorderBrush" Value="#e5e5e5" />
243243
<Setter TargetName="Bd" Property="CornerRadius" Value="5" />
244-
<Setter TargetName="Bd" Property="Margin" Value="0 0 0 10" />
244+
<Setter TargetName="Bd" Property="Margin" Value="0 0 0 0" />
245245

246246

247247
</MultiTrigger>
@@ -257,6 +257,14 @@
257257
<Setter Property="Height" Value="Auto" />
258258
</Style>
259259

260+
<!--#region PluginStore Style-->
261+
<Style x:Key="StoreList" TargetType="ListBoxItem">
262+
<Setter Property="Background" Value="#ffffff" />
263+
<Setter Property="Padding" Value="0 12 12 18" />
264+
<Setter Property="Margin" Value="0 0 6 4" />
265+
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
266+
<Setter Property="BorderBrush" Value="#e5e5e5" />
267+
</Style>
260268

261269
</Window.Resources>
262270

@@ -741,6 +749,81 @@
741749
</Grid>
742750
</TabItem>
743751

752+
<!--#region Plugin Store -->
753+
<TabItem>
754+
<TabItem.Header>
755+
<Grid>
756+
<Grid.ColumnDefinitions>
757+
<ColumnDefinition Width="Auto" />
758+
<ColumnDefinition />
759+
</Grid.ColumnDefinitions>
760+
<TextBlock Grid.Column="0" FontFamily="/Resources/#Segoe Fluent Icons" FontSize="20"
761+
Margin="0 0 12 0">
762+
&#xe719;
763+
</TextBlock>
764+
<TextBlock Grid.Column="1" Text="Plugin Store" />
765+
</Grid>
766+
</TabItem.Header>
767+
768+
<Grid>
769+
<Grid.ColumnDefinitions>
770+
<ColumnDefinition></ColumnDefinition>
771+
</Grid.ColumnDefinitions>
772+
<Grid.RowDefinitions>
773+
<RowDefinition Height="74"></RowDefinition>
774+
<RowDefinition Height="*"></RowDefinition>
775+
</Grid.RowDefinitions>
776+
<Border Grid.Row="0" Background="#f3f3f3" Padding="5 18 0 0">
777+
<TextBlock Text="Plugin Store" TextAlignment="left" FontSize="30" Margin="0 5 0 5"/>
778+
</Border>
779+
<Border Grid.Column="0" Grid.Row="1" Background="#f3f3f3" Padding="0 0 0 0">
780+
<ListBox
781+
ItemsSource="{Binding PluginViewModels}"
782+
Margin="6, 0, 0, 0" ScrollViewer.HorizontalScrollBarVisibility="Disabled"
783+
ItemContainerStyle="{StaticResource StoreList}"
784+
ScrollViewer.IsDeferredScrollingEnabled="True" ScrollViewer.CanContentScroll="False"
785+
Padding="0 0 0 0" Width="Auto" VerticalContentAlignment="Center" HorizontalAlignment="Stretch">
786+
<ListBox.ItemsPanel>
787+
<ItemsPanelTemplate>
788+
<WrapPanel ItemHeight="100"
789+
ItemWidth="390"
790+
Orientation="Horizontal" VerticalAlignment="Center"/>
791+
</ItemsPanelTemplate>
792+
</ListBox.ItemsPanel>
793+
<ListBox.ItemTemplate>
794+
<DataTemplate>
795+
<Grid HorizontalAlignment="Left" VerticalAlignment="Center">
796+
<Grid.ColumnDefinitions>
797+
<ColumnDefinition Width="72"/>
798+
<ColumnDefinition Width="*" />
799+
</Grid.ColumnDefinitions>
800+
<StackPanel Grid.Column="0" Margin="0 0 0 0"
801+
VerticalAlignment="Center" >
802+
<Image Source="{Binding Image, IsAsync=True}"
803+
Width="32" Height="32" Margin="8 0 6 0"
804+
VerticalAlignment="Center"/>
805+
</StackPanel>
806+
<StackPanel Grid.Column="1" Margin="0 0 8 0" VerticalAlignment="Center">
807+
<TextBlock Text="{Binding PluginPair.Metadata.Name}"
808+
TextWrapping="WrapWithOverflow"
809+
ToolTip="{Binding PluginPair.Metadata.Version}" />
810+
<TextBlock Opacity="0.5" TextWrapping="Wrap" Margin="0 2 0 0">
811+
<Run Text="{Binding PluginPair.Metadata.Description}" FontSize="12" />
812+
</TextBlock>
813+
</StackPanel>
814+
815+
</Grid>
816+
817+
818+
</DataTemplate>
819+
</ListBox.ItemTemplate>
820+
</ListBox>
821+
</Border>
822+
823+
</Grid>
824+
</TabItem>
825+
<!--#endregion-->
826+
744827
<TabItem>
745828
<TabItem.Header>
746829
<Grid>

0 commit comments

Comments
 (0)