mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Adjust Layout
This commit is contained in:
parent
d3a9d1ec1d
commit
b1c8fa30ac
2 changed files with 64 additions and 47 deletions
|
|
@ -130,6 +130,7 @@
|
|||
<Setter Property="Margin" Value="0,0,-18,0" />
|
||||
</Style>
|
||||
|
||||
|
||||
<Style x:Key="logo" TargetType="{x:Type TabItem}">
|
||||
<!--#region Logo Style-->
|
||||
<Setter Property="Margin" Value="0" />
|
||||
|
|
@ -243,11 +244,7 @@
|
|||
</Style>
|
||||
|
||||
<!-- Plugin Store Item when Selected layout for nothing -->
|
||||
<Style x:Key="StoreItem" TargetType="{x:Type ToggleButton}">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsChecked" Value="True" />
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style x:Key="StoreItem" TargetType="{x:Type ToggleButton}" />
|
||||
|
||||
<Style x:Key="PluginList" TargetType="ListBoxItem">
|
||||
<Setter Property="Background" Value="{DynamicResource Color00B}" />
|
||||
|
|
@ -320,11 +317,12 @@
|
|||
</Style>
|
||||
|
||||
<!--#region PluginStore Style-->
|
||||
<Style x:Key="StoreList" TargetType="ListBoxItem">
|
||||
<Setter Property="Background" Value="{DynamicResource Color02B}" />
|
||||
<Style x:Key="StoreList" TargetType="ListViewItem">
|
||||
<Setter Property="Padding" Value="0,0,0,0" />
|
||||
<Setter Property="Margin" Value="0,0,8,5" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource Color03B}" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||||
|
||||
<Setter Property="Margin" Value="0,0,8,8" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Stretch" />
|
||||
<!--#region Template for blue highlight win10-->
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
|
|
@ -336,7 +334,8 @@
|
|||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="5"
|
||||
SnapsToDevicePixels="True">
|
||||
SnapsToDevicePixels="True"
|
||||
UseLayoutRounding="True">
|
||||
<ContentPresenter
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
|
|
@ -346,6 +345,24 @@
|
|||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsSelected" Value="False" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter TargetName="Bd" Property="Margin" Value="0,0,0,0" />
|
||||
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Color00B}" />
|
||||
<Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource Color03B}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsSelected" Value="True" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Color07B}" />
|
||||
<Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource Color03B}" />
|
||||
<Setter TargetName="Bd" Property="CornerRadius" Value="5" />
|
||||
<Setter TargetName="Bd" Property="Margin" Value="0,0,0,0" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsMouseOver" Value="True" />
|
||||
|
|
@ -354,29 +371,6 @@
|
|||
<Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource Color03B}" />
|
||||
<Setter TargetName="Bd" Property="CornerRadius" Value="5" />
|
||||
|
||||
</MultiTrigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="Selector.IsSelectionActive" Value="False" />
|
||||
<Condition Property="IsSelected" Value="True" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Color02B}" />
|
||||
<Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource Color03B}" />
|
||||
<Setter TargetName="Bd" Property="Margin" Value="0,0,0,0" />
|
||||
|
||||
|
||||
</MultiTrigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="Selector.IsSelectionActive" Value="True" />
|
||||
<Condition Property="IsSelected" Value="True" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Color02B}" />
|
||||
<Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource Color03B}" />
|
||||
<Setter TargetName="Bd" Property="CornerRadius" Value="5" />
|
||||
<Setter TargetName="Bd" Property="Margin" Value="0,0,0,0" />
|
||||
|
||||
|
||||
</MultiTrigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter TargetName="Bd" Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
|
||||
|
|
@ -1407,6 +1401,7 @@
|
|||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
Margin="5,24,0,0">
|
||||
|
||||
<TextBox
|
||||
Name="pluginStoreFilterTxb"
|
||||
Width="150"
|
||||
|
|
@ -1483,7 +1478,9 @@
|
|||
<ListView.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<wpftk:VirtualizingWrapPanel
|
||||
x:Name="ItemWrapPanel"
|
||||
Margin="0,0,0,10"
|
||||
ItemSize="216,194"
|
||||
MouseWheelDelta="48"
|
||||
Orientation="Vertical"
|
||||
ScrollLineDelta="16"
|
||||
|
|
@ -1493,15 +1490,30 @@
|
|||
</ListView.ItemsPanel>
|
||||
<ListView.GroupStyle>
|
||||
<GroupStyle HidesIfEmpty="True">
|
||||
<GroupStyle.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock
|
||||
HorizontalAlignment="Left"
|
||||
FontSize="14"
|
||||
FontWeight="Bold"
|
||||
Text="{Binding Name, Converter={StaticResource TextConverter}}" />
|
||||
</DataTemplate>
|
||||
</GroupStyle.HeaderTemplate>
|
||||
<GroupStyle.ContainerStyle>
|
||||
<Style TargetType="{x:Type GroupItem}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Grid>
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock
|
||||
Margin="0,0,0,10"
|
||||
VerticalAlignment="Top"
|
||||
FontSize="16"
|
||||
FontWeight="Bold"
|
||||
Text="{Binding Name, Converter={StaticResource TextConverter}}" />
|
||||
|
||||
<ItemsPresenter />
|
||||
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</GroupStyle.ContainerStyle>
|
||||
<GroupStyle.Panel>
|
||||
<ItemsPanelTemplate>
|
||||
<VirtualizingStackPanel Orientation="{Binding Orientation, Mode=OneWay}" />
|
||||
|
|
@ -1510,17 +1522,15 @@
|
|||
</GroupStyle>
|
||||
</ListView.GroupStyle>
|
||||
|
||||
<ListView.ItemTemplate>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<!-- Hover Layout Style -->
|
||||
|
||||
<ToggleButton
|
||||
x:Name="StoreListItem"
|
||||
Width="216"
|
||||
Height="164"
|
||||
Width="200"
|
||||
HorizontalAlignment="Left"
|
||||
HorizontalContentAlignment="left"
|
||||
Background="Transparent"
|
||||
IsChecked="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListBoxItem}}, Path=IsSelected}"
|
||||
Style="{StaticResource StoreItem}">
|
||||
<ToggleButton.Template>
|
||||
|
|
@ -1727,9 +1737,10 @@
|
|||
|
||||
</ToggleButton>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListView>
|
||||
</Grid>
|
||||
|
||||
</TabItem>
|
||||
<!--#endregion-->
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,9 @@ using Flow.Launcher.Plugin;
|
|||
using Flow.Launcher.Plugin.SharedCommands;
|
||||
using Flow.Launcher.ViewModel;
|
||||
using ModernWpf;
|
||||
using ModernWpf.Controls;
|
||||
using System;
|
||||
using System.Drawing.Printing;
|
||||
using System.IO;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls.Primitives;
|
||||
|
|
@ -17,6 +19,7 @@ using System.Windows.Forms;
|
|||
using System.Windows.Input;
|
||||
using System.Windows.Interop;
|
||||
using System.Windows.Navigation;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement.Window;
|
||||
using Button = System.Windows.Controls.Button;
|
||||
using Control = System.Windows.Controls.Control;
|
||||
using KeyEventArgs = System.Windows.Input.KeyEventArgs;
|
||||
|
|
@ -425,6 +428,9 @@ namespace Flow.Launcher
|
|||
}
|
||||
}
|
||||
|
||||
private void ShowStoreItem_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
}
|
||||
private void RefreshPluginStoreEventHandler(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (pluginStoreFilterTxb.Text != lastPluginStoreSearch)
|
||||
|
|
|
|||
Loading…
Reference in a new issue