mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
227 lines
No EOL
10 KiB
XML
227 lines
No EOL
10 KiB
XML
<Window
|
|
x:Class="Flow.Launcher.ReleaseNotesWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:cc="clr-namespace:Flow.Launcher.Resources.Controls"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="clr-namespace:Flow.Launcher"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:mdxam="clr-namespace:MdXaml;assembly=MdXaml"
|
|
xmlns:ui="http://schemas.modernwpf.com/2019"
|
|
xmlns:vm="clr-namespace:Flow.Launcher.ViewModel"
|
|
Title="{DynamicResource releaseNotes}"
|
|
Width="940"
|
|
Height="600"
|
|
MinWidth="940"
|
|
MinHeight="600"
|
|
Background="{DynamicResource PopuBGColor}"
|
|
Closed="Window_Closed"
|
|
Foreground="{DynamicResource PopupTextColor}"
|
|
Loaded="Window_Loaded"
|
|
ResizeMode="CanResize"
|
|
StateChanged="Window_StateChanged"
|
|
WindowStartupLocation="CenterScreen"
|
|
mc:Ignorable="d">
|
|
<WindowChrome.WindowChrome>
|
|
<WindowChrome CaptionHeight="32" ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}" />
|
|
</WindowChrome.WindowChrome>
|
|
<Window.InputBindings>
|
|
<KeyBinding Key="Escape" Command="Close" />
|
|
</Window.InputBindings>
|
|
<Window.CommandBindings>
|
|
<CommandBinding Command="Close" Executed="OnCloseExecuted" />
|
|
</Window.CommandBindings>
|
|
|
|
<Grid>
|
|
<Border Style="{StaticResource WindowMainPanelStyle}">
|
|
<Grid Background="{DynamicResource Color01B}">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="32" />
|
|
<RowDefinition Height="24" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<!-- TitleBar and Control -->
|
|
<Image
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
Width="16"
|
|
Height="16"
|
|
Margin="10 4 4 4"
|
|
RenderOptions.BitmapScalingMode="HighQuality"
|
|
Source="/Images/app.png" />
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
Grid.Column="1"
|
|
Margin="4 0 0 0"
|
|
VerticalAlignment="Center"
|
|
FontSize="12"
|
|
Foreground="{DynamicResource Color05B}"
|
|
Text="{DynamicResource releaseNotes}" />
|
|
|
|
<Button
|
|
Grid.Row="0"
|
|
Grid.Column="2"
|
|
Click="OnMinimizeButtonClick"
|
|
RenderOptions.EdgeMode="Aliased"
|
|
Style="{DynamicResource TitleBarButtonStyle}">
|
|
<Path
|
|
Width="46"
|
|
Height="32"
|
|
Data="M 18,15 H 28"
|
|
Stroke="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
|
|
StrokeThickness="1">
|
|
<Path.Style>
|
|
<Style TargetType="Path">
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding Path=IsActive, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="False">
|
|
<Setter Property="Opacity" Value="0.5" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Path.Style>
|
|
</Path>
|
|
</Button>
|
|
<Button
|
|
Name="MaximizeButton"
|
|
Grid.Row="0"
|
|
Grid.Column="3"
|
|
Click="OnMaximizeRestoreButtonClick"
|
|
Style="{StaticResource TitleBarButtonStyle}">
|
|
<Path
|
|
Width="46"
|
|
Height="32"
|
|
Data="M 18.5,10.5 H 27.5 V 19.5 H 18.5 Z"
|
|
Stroke="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
|
|
StrokeThickness="1">
|
|
<Path.Style>
|
|
<Style TargetType="Path">
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding Path=IsActive, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="False">
|
|
<Setter Property="Opacity" Value="0.5" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Path.Style>
|
|
</Path>
|
|
</Button>
|
|
<Button
|
|
Name="RestoreButton"
|
|
Grid.Row="0"
|
|
Grid.Column="3"
|
|
Click="OnMaximizeRestoreButtonClick"
|
|
Style="{StaticResource TitleBarButtonStyle}">
|
|
<Path
|
|
Width="46"
|
|
Height="32"
|
|
Data="M 18.5,12.5 H 25.5 V 19.5 H 18.5 Z M 20.5,12.5 V 10.5 H 27.5 V 17.5 H 25.5"
|
|
Stroke="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
|
|
StrokeThickness="1">
|
|
<Path.Style>
|
|
<Style TargetType="Path">
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding Path=IsActive, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="False">
|
|
<Setter Property="Opacity" Value="0.5" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Path.Style>
|
|
</Path>
|
|
</Button>
|
|
<Button
|
|
Grid.Row="0"
|
|
Grid.Column="4"
|
|
Click="OnCloseButtonClick"
|
|
Style="{StaticResource TitleBarCloseButtonStyle}">
|
|
<Path
|
|
Width="46"
|
|
Height="32"
|
|
Data="M 18,11 27,20 M 18,20 27,11"
|
|
Stroke="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
|
|
StrokeThickness="1">
|
|
<Path.Style>
|
|
<Style TargetType="Path">
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding Path=IsActive, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="False">
|
|
<Setter Property="Opacity" Value="0.5" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Path.Style>
|
|
</Path>
|
|
</Button>
|
|
|
|
<Grid
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="5"
|
|
Margin="18 0 18 0">
|
|
<cc:HyperLink x:Name="SeeMore" Text="{DynamicResource seeMoreReleaseNotes}" />
|
|
</Grid>
|
|
|
|
<!-- Do not use scroll function of MarkdownViewer because it does not support smooth scroll -->
|
|
<ScrollViewer
|
|
x:Name="MarkdownScrollViewer"
|
|
Grid.Row="2"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="5"
|
|
Width="500"
|
|
Height="500">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<!-- This row is for bottom margin -->
|
|
<RowDefinition Height="20" />
|
|
</Grid.RowDefinitions>
|
|
<mdxam:MarkdownScrollViewer
|
|
x:Name="MarkdownViewer"
|
|
Grid.Row="0"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Stretch"
|
|
ClickAction="SafetyDisplayWithRelativePath"
|
|
HorizontalScrollBarVisibility="Disabled"
|
|
Loaded="MarkdownViewer_Loaded"
|
|
MouseWheel="MarkdownViewer_MouseWheel"
|
|
Plugins="{StaticResource MdXamlPlugins}"
|
|
PreviewMouseWheel="MarkdownViewer_PreviewMouseWheel"
|
|
VerticalScrollBarVisibility="Disabled"
|
|
Visibility="Collapsed" />
|
|
</Grid>
|
|
</ScrollViewer>
|
|
|
|
<!-- This Grid is for display progress ring and refresh button. -->
|
|
<!-- And it is also for changing the size of the MarkdownViewer. -->
|
|
<!-- Because VerticalAlignment="Stretch" can cause size issue with MarkdownScrollViewer. -->
|
|
<Grid
|
|
Grid.Row="2"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="5"
|
|
Margin="15 0 20 0"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Stretch"
|
|
SizeChanged="Grid_SizeChanged">
|
|
<ui:ProgressRing
|
|
x:Name="RefreshProgressRing"
|
|
Width="32"
|
|
Height="32"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
IsActive="True" />
|
|
<Button
|
|
x:Name="RefreshButton"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Click="RefreshButton_Click"
|
|
Content="{DynamicResource refresh}"
|
|
Visibility="Collapsed" />
|
|
</Grid>
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
</Window> |