mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Add help window with content dialogue style
This commit is contained in:
parent
276af4332f
commit
44a1a474c3
5 changed files with 79 additions and 31 deletions
|
|
@ -3523,8 +3523,8 @@
|
|||
|
||||
<!-- Content Dialog -->
|
||||
<Style x:Key="ContentDialog" TargetType="ui:ContentDialog">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ContentDialogForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource ContentDialogBackground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource PopupTextColor}" />
|
||||
<Setter Property="Background" Value="{DynamicResource PopuBGColor}" />
|
||||
<Setter Property="BorderThickness" Value="{DynamicResource ContentDialogBorderWidth}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ContentDialogBorderBrush}" />
|
||||
<Setter Property="IsTabStop" Value="False" />
|
||||
|
|
@ -3571,11 +3571,11 @@
|
|||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<Border x:Name="DialogSpace" Padding="{DynamicResource ContentDialogPadding}">
|
||||
<Border x:Name="DialogSpace" Padding="0">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="80" />
|
||||
</Grid.RowDefinitions>
|
||||
<ScrollViewer
|
||||
x:Name="ContentScrollViewer"
|
||||
|
|
@ -3583,7 +3583,7 @@
|
|||
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
|
||||
IsTabStop="False"
|
||||
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
|
||||
<Grid>
|
||||
<Grid Margin="{DynamicResource ContentDialogPadding}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
|
|
@ -3626,12 +3626,13 @@
|
|||
TextWrapping="Wrap" />
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
<Border Grid.Row="1" Background="{DynamicResource PopupButtonAreaBGColor}"
|
||||
BorderBrush="{DynamicResource PopupButtonAreaBorderColor}"
|
||||
BorderThickness="0,1,0,0" Padding="26 0 26 0" CornerRadius="0 0 8 8">
|
||||
<Grid
|
||||
x:Name="CommandSpace"
|
||||
Grid.Row="1"
|
||||
Margin="{DynamicResource ContentDialogCommandSpaceMargin}"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Bottom"
|
||||
VerticalAlignment="Center"
|
||||
KeyboardNavigation.DirectionalNavigation="Contained">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
|
|
@ -3666,7 +3667,8 @@
|
|||
VerticalAlignment="Stretch"
|
||||
Content="{TemplateBinding CloseButtonText}"
|
||||
Style="{TemplateBinding CloseButtonStyle}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Border>
|
||||
|
|
@ -3779,13 +3781,13 @@
|
|||
<VisualState x:Name="PrimaryVisible">
|
||||
<Storyboard>
|
||||
<Int32AnimationUsingKeyFrames Storyboard.TargetName="PrimaryButton" Storyboard.TargetProperty="(Grid.Column)">
|
||||
<DiscreteInt32KeyFrame KeyTime="0:0:0" Value="2" />
|
||||
<DiscreteInt32KeyFrame KeyTime="0:0:0" Value="1" />
|
||||
</Int32AnimationUsingKeyFrames>
|
||||
<Int32AnimationUsingKeyFrames Storyboard.TargetName="PrimaryButton" Storyboard.TargetProperty="(Grid.ColumnSpan)">
|
||||
<DiscreteInt32KeyFrame KeyTime="0:0:0" Value="2" />
|
||||
</Int32AnimationUsingKeyFrames>
|
||||
<ThicknessAnimationUsingKeyFrames Storyboard.TargetName="PrimaryButton" Storyboard.TargetProperty="Margin">
|
||||
<DiscreteThicknessKeyFrame KeyTime="0:0:0" Value="2,0,0,0" />
|
||||
<DiscreteThicknessKeyFrame KeyTime="0:0:0" Value="0,0,0,0" />
|
||||
</ThicknessAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SecondaryButton" Storyboard.TargetProperty="Visibility">
|
||||
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Collapsed}" />
|
||||
|
|
@ -3797,16 +3799,16 @@
|
|||
</VisualState>
|
||||
<VisualState x:Name="SecondaryVisible">
|
||||
<Storyboard>
|
||||
<Int32AnimationUsingKeyFrames Storyboard.TargetName="SecondaryButton" Storyboard.TargetProperty="(Grid.Column)">
|
||||
<Int32AnimationUsingKeyFrames Storyboard.TargetName="PrimaryButton" Storyboard.TargetProperty="(Grid.Column)">
|
||||
<DiscreteInt32KeyFrame KeyTime="0:0:0" Value="1" />
|
||||
</Int32AnimationUsingKeyFrames>
|
||||
<Int32AnimationUsingKeyFrames Storyboard.TargetName="PrimaryButton" Storyboard.TargetProperty="(Grid.ColumnSpan)">
|
||||
<DiscreteInt32KeyFrame KeyTime="0:0:0" Value="2" />
|
||||
</Int32AnimationUsingKeyFrames>
|
||||
<Int32AnimationUsingKeyFrames Storyboard.TargetName="SecondaryButton" Storyboard.TargetProperty="(Grid.ColumnSpan)">
|
||||
<DiscreteInt32KeyFrame KeyTime="0:0:0" Value="2" />
|
||||
</Int32AnimationUsingKeyFrames>
|
||||
<ThicknessAnimationUsingKeyFrames Storyboard.TargetName="SecondaryButton" Storyboard.TargetProperty="Margin">
|
||||
<DiscreteThicknessKeyFrame KeyTime="0:0:0" Value="2,0,0,0" />
|
||||
<ThicknessAnimationUsingKeyFrames Storyboard.TargetName="PrimaryButton" Storyboard.TargetProperty="Margin">
|
||||
<DiscreteThicknessKeyFrame KeyTime="0:0:0" Value="0,0,0,0" />
|
||||
</ThicknessAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PrimaryButton" Storyboard.TargetProperty="Visibility">
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SecondaryButton" Storyboard.TargetProperty="Visibility">
|
||||
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Collapsed}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="CloseButton" Storyboard.TargetProperty="Visibility">
|
||||
|
|
@ -3816,19 +3818,19 @@
|
|||
</VisualState>
|
||||
<VisualState x:Name="CloseVisible">
|
||||
<Storyboard>
|
||||
<Int32AnimationUsingKeyFrames Storyboard.TargetName="CloseButton" Storyboard.TargetProperty="(Grid.Column)">
|
||||
<Int32AnimationUsingKeyFrames Storyboard.TargetName="PrimaryButton" Storyboard.TargetProperty="(Grid.Column)">
|
||||
<DiscreteInt32KeyFrame KeyTime="0:0:0" Value="1" />
|
||||
</Int32AnimationUsingKeyFrames>
|
||||
<Int32AnimationUsingKeyFrames Storyboard.TargetName="PrimaryButton" Storyboard.TargetProperty="(Grid.ColumnSpan)">
|
||||
<DiscreteInt32KeyFrame KeyTime="0:0:0" Value="2" />
|
||||
</Int32AnimationUsingKeyFrames>
|
||||
<Int32AnimationUsingKeyFrames Storyboard.TargetName="CloseButton" Storyboard.TargetProperty="(Grid.ColumnSpan)">
|
||||
<DiscreteInt32KeyFrame KeyTime="0:0:0" Value="2" />
|
||||
</Int32AnimationUsingKeyFrames>
|
||||
<ThicknessAnimationUsingKeyFrames Storyboard.TargetName="CloseButton" Storyboard.TargetProperty="Margin">
|
||||
<DiscreteThicknessKeyFrame KeyTime="0:0:0" Value="2,0,0,0" />
|
||||
<ThicknessAnimationUsingKeyFrames Storyboard.TargetName="PrimaryButton" Storyboard.TargetProperty="Margin">
|
||||
<DiscreteThicknessKeyFrame KeyTime="0:0:0" Value="0,0,0,0" />
|
||||
</ThicknessAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PrimaryButton" Storyboard.TargetProperty="Visibility">
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SecondaryButton" Storyboard.TargetProperty="Visibility">
|
||||
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Collapsed}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SecondaryButton" Storyboard.TargetProperty="Visibility">
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="CloseButton" Storyboard.TargetProperty="Visibility">
|
||||
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Collapsed}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@
|
|||
<!-- Resources for Expander -->
|
||||
<SolidColorBrush x:Key="CustomExpanderHover" Color="#323232" />
|
||||
<!-- Resource for ContentDialog -->
|
||||
<SolidColorBrush x:Key="ContentDialogOverlayBG" Color="#4D000000" />
|
||||
<SolidColorBrush x:Key="ContentDialogOverlayBG" Color="#58000000" />
|
||||
<!-- Infobar Warning -->
|
||||
<SolidColorBrush x:Key="InfoBarWarningIcon" Color="#FCE100" />
|
||||
<SolidColorBrush x:Key="InfoBarWarningBG" Color="#433519" />
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ public class SettingsPanePluginsViewModel : BaseModel
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void UpdateDisplayMode()
|
||||
{
|
||||
if (IsOnOffSelected)
|
||||
|
|
@ -119,7 +119,6 @@ public class SettingsPanePluginsViewModel : BaseModel
|
|||
else if (IsSearchDelaySelected)
|
||||
CurrentDisplayMode = "SearchDelay";
|
||||
}
|
||||
|
||||
public SettingsPanePluginsViewModel(Settings settings)
|
||||
{
|
||||
_settings = settings;
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@
|
|||
Height="34" FontFamily="{DynamicResource SymbolThemeFontFamily}"
|
||||
Margin="0 0 20 0"
|
||||
Content=""
|
||||
FontSize="14" />
|
||||
FontSize="14" Click="Help_Click"/>
|
||||
<TextBox
|
||||
Name="PluginFilterTextbox"
|
||||
Width="150"
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
using System.Windows.Input;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Navigation;
|
||||
using CommunityToolkit.Mvvm.DependencyInjection;
|
||||
using Flow.Launcher.SettingPages.ViewModels;
|
||||
using Flow.Launcher.Infrastructure.UserSettings;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
using ModernWpf.Controls;
|
||||
|
||||
namespace Flow.Launcher.SettingPages.Views;
|
||||
|
||||
|
|
@ -36,4 +39,48 @@ public partial class SettingsPanePlugins
|
|||
if (e.Key is not Key.F || Keyboard.Modifiers is not ModifierKeys.Control) return;
|
||||
PluginFilterTextbox.Focus();
|
||||
}
|
||||
|
||||
|
||||
private async void Help_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var helpDialog = new ContentDialog()
|
||||
{
|
||||
Content = new StackPanel
|
||||
{
|
||||
Children =
|
||||
{
|
||||
new TextBlock
|
||||
{
|
||||
Text = (string)Application.Current.Resources["changePriorityWindow"],
|
||||
FontSize = 18,
|
||||
Margin = new Thickness(0, 0, 0, 10),
|
||||
TextWrapping = TextWrapping.Wrap
|
||||
},
|
||||
new TextBlock
|
||||
{
|
||||
Text = (string)Application.Current.Resources["priority_tips"],
|
||||
TextWrapping = TextWrapping.Wrap
|
||||
},
|
||||
new TextBlock
|
||||
{
|
||||
Text = (string)Application.Current.Resources["searchDelayTimeTitle"],
|
||||
FontSize = 18,
|
||||
Margin = new Thickness(0, 24, 0, 10),
|
||||
TextWrapping = TextWrapping.Wrap
|
||||
},
|
||||
new TextBlock
|
||||
{
|
||||
Text = (string)Application.Current.Resources["searchDelayTime_tips"],
|
||||
TextWrapping = TextWrapping.Wrap
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
PrimaryButtonText = (string)Application.Current.Resources["commonOK"],
|
||||
CornerRadius = new CornerRadius(8),
|
||||
Style = (Style)Application.Current.Resources["ContentDialog"]
|
||||
};
|
||||
|
||||
await helpDialog.ShowAsync();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue