mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-06-07 01:08:18 +08:00
Added ImageResizer page + sidepanel improvements
This commit is contained in:
parent
a8805b1cec
commit
75bc37a6ba
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
@ -63,6 +63,7 @@
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Services\ActivationService.cs" />
|
||||
<Compile Include="Services\NavigationService.cs" />
|
||||
<Compile Include="ViewModels\ImageResizerViewModel.cs" />
|
||||
<Compile Include="ViewModels\GeneralViewModel.cs" />
|
||||
<Compile Include="ViewModels\FancyZonesViewModel.cs" />
|
||||
<Compile Include="ViewModels\PowerRenameViewModel.cs" />
|
||||
@ -72,13 +73,16 @@
|
||||
<Compile Include="Views\GeneralPage.xaml.cs">
|
||||
<DependentUpon>GeneralPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\ImageResizerPage.xaml.cs">
|
||||
<DependentUpon>ImageResizerPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\PowerLauncherPage.xaml.cs">
|
||||
<DependentUpon>PowerLauncherPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\PowerPreviewPage.xaml.cs">
|
||||
<DependentUpon>PowerPreviewPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\FancyZonesPage.xaml.cs">
|
||||
<Compile Include="Views\FancyZonesPage.xaml.cs">
|
||||
<DependentUpon>FancyZonesPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\PowerRenamePage.xaml.cs">
|
||||
@ -160,6 +164,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Views\ImageResizerPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Views\PowerLauncherPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
@ -145,8 +145,16 @@
|
||||
<value>Shortcut Guide</value>
|
||||
<comment>Navigation view item name for Shortcut Guide</comment>
|
||||
</data>
|
||||
<data name="Shell_PowerPreview.Content" xml:space="preserve">
|
||||
<data name="Shell_PowerPreview.Content" xml:space="preserve">
|
||||
<value>File Explorer Preview</value>
|
||||
<comment>File Explorer Preview Settings</comment>
|
||||
</data>
|
||||
<comment>Navigation view item name for File Explorer Preview</comment>
|
||||
</data>
|
||||
<data name="Shell_FancyZones.Content" xml:space="preserve">
|
||||
<value>FancyZones</value>
|
||||
<comment>Navigation view item name for FancyZones</comment>
|
||||
</data>
|
||||
<data name="Shell_ImageResizer.Content" xml:space="preserve">
|
||||
<value>Image Resizer</value>
|
||||
<comment>Navigation view item name for Image Resizer</comment>
|
||||
</data>
|
||||
</root>
|
@ -7,7 +7,14 @@
|
||||
|
||||
<!-- Breakpoint for wide layout (side panel next to content) -->
|
||||
<x:Double x:Key="WideLayoutMinWidth">1100</x:Double>
|
||||
|
||||
|
||||
<!-- Breakpoint for small layout (side panel under content) -->
|
||||
<x:Double x:Key="SmallLayoutMinWidth">480</x:Double>
|
||||
</ResourceDictionary>
|
||||
|
||||
<!-- Column spacing between content and sidepanel -->
|
||||
<x:Double x:Key="DefaultColumnSpacing">32</x:Double>
|
||||
|
||||
<!-- Row spacing between content and sidepanel (in small mode) -->
|
||||
<x:Double x:Key="DefaultRowSpacing">32</x:Double>
|
||||
|
||||
</ResourceDictionary>
|
@ -0,0 +1,13 @@
|
||||
using System;
|
||||
|
||||
using Microsoft.PowerToys.Settings.UI.Helpers;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
{
|
||||
public class ImageResizerViewModel : Observable
|
||||
{
|
||||
public ImageResizerViewModel()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
@ -9,7 +9,7 @@
|
||||
mc:Ignorable="d"
|
||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
|
||||
<Grid ColumnSpacing="32" RowSpacing="32">
|
||||
<Grid ColumnSpacing="{StaticResource DefaultColumnSpacing}" RowSpacing="{StaticResource DefaultRowSpacing}">
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="LayoutVisualStates">
|
||||
<VisualState x:Name="WideLayout">
|
||||
@ -131,8 +131,8 @@
|
||||
Style="{StaticResource SettingsGroupTitleStyle}"
|
||||
Margin="{StaticResource XSmallBottomMargin}"/>
|
||||
|
||||
<Image Source="https://user-images.githubusercontent.com/9866362/77859136-f04ae880-7207-11ea-8a7f-4295342fe319.gif" />
|
||||
<HyperlinkButton Content="Module overview" NavigateUri="https://github.com/microsoft/PowerToys/blob/master/src/modules/fancyzones/README.md"/>
|
||||
<HyperlinkButton Content="Video demo" NavigateUri="https://www.youtube.com/watch?v=rTtGzZYAXgY"/>
|
||||
<HyperlinkButton Content="Give feedback"/>
|
||||
|
||||
<TextBlock Text="Contributors"
|
||||
|
@ -9,7 +9,7 @@
|
||||
mc:Ignorable="d"
|
||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
|
||||
<Grid ColumnSpacing="32" RowSpacing="32">
|
||||
<Grid ColumnSpacing="{StaticResource DefaultColumnSpacing}" RowSpacing="{StaticResource DefaultRowSpacing}">
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="LayoutVisualStates">
|
||||
<VisualState x:Name="WideLayout">
|
||||
@ -88,11 +88,11 @@
|
||||
|
||||
|
||||
|
||||
<TextBlock Text="Contributors" Style="{StaticResource SettingsGroupTitleStyle}"/>
|
||||
<!--<TextBlock Text="Contributors" Style="{StaticResource SettingsGroupTitleStyle}"/>
|
||||
|
||||
<HyperlinkButton Content="Contributor name"/>
|
||||
<HyperlinkButton Content="Contributor name"/>
|
||||
<HyperlinkButton Content="Contributor name"/>
|
||||
<HyperlinkButton Content="Contributor name"/>-->
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Page>
|
||||
|
@ -59,9 +59,6 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
// load run on start up ui settings value and update the ui state.
|
||||
this.ToggleSwitch_RunAtStartUp.IsOn = settings.startup;
|
||||
}
|
||||
|
||||
ShellPage.ShellHandler.HideContributorsList();
|
||||
ShellPage.ShellHandler.HideFeatureDetails();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -0,0 +1,195 @@
|
||||
<Page
|
||||
x:Class="Microsoft.PowerToys.Settings.UI.Views.ImageResizerPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:Microsoft.PowerToys.Settings.UI.Views"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
|
||||
mc:Ignorable="d"
|
||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
|
||||
<Grid ColumnSpacing="{StaticResource DefaultColumnSpacing}" RowSpacing="{StaticResource DefaultRowSpacing}">
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="LayoutVisualStates">
|
||||
<VisualState x:Name="WideLayout">
|
||||
<VisualState.StateTriggers>
|
||||
<AdaptiveTrigger MinWindowWidth="{StaticResource WideLayoutMinWidth}" />
|
||||
</VisualState.StateTriggers>
|
||||
<VisualState.Setters>
|
||||
<Setter Target="SidePanel.(Grid.Column)" Value="1" />
|
||||
<Setter Target="SidePanel.(Grid.Row)" Value="0" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="SmallLayout">
|
||||
<VisualState.StateTriggers>
|
||||
<AdaptiveTrigger MinWindowWidth="{StaticResource SmallLayoutMinWidth}" />
|
||||
</VisualState.StateTriggers>
|
||||
<VisualState.Setters>
|
||||
<Setter Target="SidePanel.(Grid.Column)" Value="0" />
|
||||
<Setter Target="SidePanel.(Grid.Row)" Value="1" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock Text="Lets you resize images by right-clicking."
|
||||
TextWrapping="Wrap"/>
|
||||
|
||||
<ToggleSwitch Header="Enable Image Resizer"
|
||||
IsOn="True"
|
||||
Margin="{StaticResource SmallTopMargin}" />
|
||||
|
||||
<TextBlock Text="Sizes"
|
||||
Style="{StaticResource SettingsGroupTitleStyle}"/>
|
||||
|
||||
<!-- TO DO: Don't know if a listview with these items is the best solution here. Maybe a data grid is better? -->
|
||||
<!--<ListView Margin="{StaticResource SmallTopMargin}" Padding="-12,0,0,0" SelectionMode="None" ItemsSource="{x:Bind Sizes, Mode=OneWay}">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate x:DataType="local:ResizeSize">
|
||||
<StackPanel Orientation="Horizontal" Spacing="4">
|
||||
<TextBox Text="{x:Bind Title}" Width="68"/>
|
||||
<ComboBox SelectedIndex="1" Width="88">
|
||||
<ComboBoxItem>Fill</ComboBoxItem>
|
||||
<ComboBoxItem>Fit</ComboBoxItem>
|
||||
<ComboBoxItem>Stretch</ComboBoxItem>
|
||||
</ComboBox>
|
||||
<muxc:NumberBox Value="{x:Bind Width}"/>
|
||||
<TextBlock Text="x" FontWeight="SemiBold" Margin="0,4,0,0"/>
|
||||
<muxc:NumberBox Value="{x:Bind Height}"/>
|
||||
<ComboBox SelectedIndex="3">
|
||||
<ComboBoxItem>Centimeters</ComboBoxItem>
|
||||
<ComboBoxItem>Inches</ComboBoxItem>
|
||||
<ComboBoxItem>Percent</ComboBoxItem>
|
||||
<ComboBoxItem>Pixels</ComboBoxItem>
|
||||
</ComboBox>
|
||||
<Button x:Name="RemoveButton" Background="Transparent" Click="RemoveButton_Click">
|
||||
<Button.Content>
|
||||
<FontIcon Opacity="0.8" Glyph=""/>
|
||||
</Button.Content>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>-->
|
||||
|
||||
<Button x:Name="AddSizeButton" Content="Add new size" Margin="{StaticResource SmallTopMargin}"/>
|
||||
|
||||
<TextBlock Text="Encoding"
|
||||
Style="{StaticResource SettingsGroupTitleStyle}"/>
|
||||
|
||||
<ComboBox Header="Fallback encoder"
|
||||
SelectedIndex="1"
|
||||
MinWidth="240"
|
||||
Margin="{StaticResource SmallTopMargin}">
|
||||
<ComboBoxItem>BMP Encoder</ComboBoxItem>
|
||||
<ComboBoxItem>GIF Encoder</ComboBoxItem>
|
||||
<ComboBoxItem>JPEG Encoder</ComboBoxItem>
|
||||
<ComboBoxItem>PNG Encoder</ComboBoxItem>
|
||||
<ComboBoxItem>TIFF Encoder</ComboBoxItem>
|
||||
<ComboBoxItem>WMPhoto Encoder</ComboBoxItem>
|
||||
</ComboBox>
|
||||
|
||||
<muxc:NumberBox Header="JPEG Quality level"
|
||||
Minimum="0"
|
||||
Maximum="100"
|
||||
Value="90"
|
||||
MinWidth="240"
|
||||
SpinButtonPlacementMode="Inline"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="{StaticResource SmallTopMargin}" />
|
||||
|
||||
<ComboBox Header="PNG interlacing"
|
||||
SelectedIndex="0"
|
||||
MinWidth="240"
|
||||
Margin="{StaticResource SmallTopMargin}">
|
||||
<ComboBoxItem>Default</ComboBoxItem>
|
||||
<ComboBoxItem>On</ComboBoxItem>
|
||||
<ComboBoxItem>Off</ComboBoxItem>
|
||||
</ComboBox>
|
||||
|
||||
<ComboBox Header="TIFF Compression"
|
||||
SelectedIndex="0"
|
||||
MinWidth="240"
|
||||
Margin="{StaticResource SmallTopMargin}">
|
||||
<ComboBoxItem>Default</ComboBoxItem>
|
||||
<ComboBoxItem>None</ComboBoxItem>
|
||||
<ComboBoxItem>CCITT3</ComboBoxItem>
|
||||
<ComboBoxItem>CCITT4</ComboBoxItem>
|
||||
<ComboBoxItem>LZW</ComboBoxItem>
|
||||
<ComboBoxItem>RLE</ComboBoxItem>
|
||||
<ComboBoxItem>Zip</ComboBoxItem>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Text="File"
|
||||
Style="{StaticResource SettingsGroupTitleStyle}"/>
|
||||
|
||||
|
||||
<TextBox Header="Filename format"
|
||||
Text="%1 (%2)"
|
||||
HorizontalAlignment="Left"
|
||||
MinWidth="240"
|
||||
Margin="{StaticResource SmallTopMargin}"/>
|
||||
|
||||
<TextBlock Text="The following parameters can be used:"
|
||||
Margin="{StaticResource SmallTopBottomMargin}"/>
|
||||
|
||||
<TextBlock FontSize="12">
|
||||
<Run FontWeight="Bold">%1</Run>
|
||||
<Run> - Original filename</Run>
|
||||
</TextBlock>
|
||||
<TextBlock FontSize="12">
|
||||
<Run FontWeight="Bold">%2</Run>
|
||||
<Run> - Size name</Run>
|
||||
</TextBlock>
|
||||
<TextBlock FontSize="12">
|
||||
<Run FontWeight="Bold">%3</Run>
|
||||
<Run> - Selected width</Run>
|
||||
</TextBlock>
|
||||
<TextBlock FontSize="12">
|
||||
<Run FontWeight="Bold">%4</Run>
|
||||
<Run> - Selected height</Run>
|
||||
</TextBlock>
|
||||
<TextBlock FontSize="12">
|
||||
<Run FontWeight="Bold">%5</Run>
|
||||
<Run> - Actual height</Run>
|
||||
</TextBlock>
|
||||
<TextBlock FontSize="12">
|
||||
<Run FontWeight="Bold">%6</Run>
|
||||
<Run> - Actual width</Run>
|
||||
</TextBlock>
|
||||
|
||||
<CheckBox Content="Use original date modified"
|
||||
Margin="{StaticResource SmallTopMargin}"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel x:Name="SidePanel"
|
||||
Orientation="Vertical"
|
||||
HorizontalAlignment="Left"
|
||||
Width="{StaticResource SidePanelWidth}"
|
||||
Grid.Column="1">
|
||||
|
||||
<TextBlock Text="About this feature"
|
||||
Style="{StaticResource SettingsGroupTitleStyle}"
|
||||
Margin="{StaticResource XSmallBottomMargin}"/>
|
||||
|
||||
<HyperlinkButton Content="Module overview"/>
|
||||
<HyperlinkButton Content="Give feedback"/>
|
||||
|
||||
<TextBlock Text="Contributors"
|
||||
Style="{StaticResource SettingsGroupTitleStyle}"/>
|
||||
|
||||
<HyperlinkButton Content="Contributor name"/>
|
||||
<HyperlinkButton Content="Contributor name"/>
|
||||
<HyperlinkButton Content="Contributor name"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Page>
|
@ -0,0 +1,29 @@
|
||||
using Microsoft.PowerToys.Settings.UI.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using Windows.Foundation;
|
||||
using Windows.Foundation.Collections;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Controls.Primitives;
|
||||
using Windows.UI.Xaml.Data;
|
||||
using Windows.UI.Xaml.Input;
|
||||
using Windows.UI.Xaml.Media;
|
||||
using Windows.UI.Xaml.Navigation;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
public sealed partial class ImageResizerPage : Page
|
||||
{
|
||||
public ImageResizerViewModel ViewModel { get; } = new ImageResizerViewModel();
|
||||
|
||||
public ImageResizerPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
@ -9,7 +9,7 @@
|
||||
mc:Ignorable="d"
|
||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
|
||||
<Grid ColumnSpacing="32" RowSpacing="32">
|
||||
<Grid ColumnSpacing="{StaticResource DefaultColumnSpacing}" RowSpacing="{StaticResource DefaultRowSpacing}">
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="LayoutVisualStates">
|
||||
<VisualState x:Name="WideLayout">
|
||||
|
@ -7,7 +7,38 @@
|
||||
mc:Ignorable="d"
|
||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
|
||||
<Grid>
|
||||
<Grid ColumnSpacing="{StaticResource DefaultColumnSpacing}" RowSpacing="{StaticResource DefaultRowSpacing}">
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="LayoutVisualStates">
|
||||
<VisualState x:Name="WideLayout">
|
||||
<VisualState.StateTriggers>
|
||||
<AdaptiveTrigger MinWindowWidth="{StaticResource WideLayoutMinWidth}" />
|
||||
</VisualState.StateTriggers>
|
||||
<VisualState.Setters>
|
||||
<Setter Target="SidePanel.(Grid.Column)" Value="1" />
|
||||
<Setter Target="SidePanel.(Grid.Row)" Value="0" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="SmallLayout">
|
||||
<VisualState.StateTriggers>
|
||||
<AdaptiveTrigger MinWindowWidth="{StaticResource SmallLayoutMinWidth}" />
|
||||
</VisualState.StateTriggers>
|
||||
<VisualState.Setters>
|
||||
<Setter Target="SidePanel.(Grid.Column)" Value="0" />
|
||||
<Setter Target="SidePanel.(Grid.Row)" Value="1" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock Text="These settings allow you to manage your Windows File Explorer Addons."
|
||||
TextWrapping="Wrap"/>
|
||||
@ -23,5 +54,27 @@
|
||||
Toggled="ToggleSwitch_Preview_MD_Toggled" />
|
||||
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel x:Name="SidePanel"
|
||||
Orientation="Vertical"
|
||||
HorizontalAlignment="Left"
|
||||
Width="{StaticResource SidePanelWidth}"
|
||||
Grid.Column="1">
|
||||
|
||||
<TextBlock Text="About this feature"
|
||||
Style="{StaticResource SettingsGroupTitleStyle}"
|
||||
Margin="{StaticResource XSmallBottomMargin}"/>
|
||||
|
||||
<HyperlinkButton Content="Module overview" NavigateUri="https://github.com/microsoft/PowerToys/tree/master/src/modules/previewpane"/>
|
||||
<HyperlinkButton Content="Give feedback" NavigateUri="https://github.com/microsoft/PowerToys/issues"/>
|
||||
|
||||
<!-- <TextBlock Text="Contributors"
|
||||
Style="{StaticResource SettingsGroupTitleStyle}"/>
|
||||
|
||||
<HyperlinkButton Content="Contributor name"/>
|
||||
<HyperlinkButton Content="Contributor name"/>
|
||||
<HyperlinkButton Content="Contributor name"/>
|
||||
-->
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Page>
|
||||
</Page>
|
@ -16,13 +16,8 @@ using Windows.UI.Xaml.Input;
|
||||
using Windows.UI.Xaml.Media;
|
||||
using Windows.UI.Xaml.Navigation;
|
||||
|
||||
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
||||
/// </summary>
|
||||
public sealed partial class PowerPreviewPage : Page
|
||||
{
|
||||
private const string POWERTOY_NAME = "File Explorer Preview";
|
||||
@ -50,14 +45,6 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
ToggleSwitch_Preview_SVG.IsOn = settings.properties.IDS_PREVPANE_SVG_BOOL_TOGGLE_CONTROLL.value;
|
||||
ToggleSwitch_Preview_MD.IsOn = settings.properties.PREVPANE_MD_BOOL_TOGGLE_CONTROLL_ID.value;
|
||||
}
|
||||
|
||||
ShellPage.ShellHandler.ShowFeatureDetails();
|
||||
|
||||
ShellPage.ShellHandler.SetFeatureDetails(
|
||||
"https://github.com/microsoft/PowerToys/tree/master/src/modules/previewpane",
|
||||
"https://github.com/microsoft/PowerToys/issues");
|
||||
|
||||
ShellPage.ShellHandler.HideContributorsList();
|
||||
}
|
||||
|
||||
private void ToggleSwitch_Preview_SVG_Toggled(object sender, RoutedEventArgs e)
|
||||
|
@ -9,7 +9,7 @@
|
||||
mc:Ignorable="d"
|
||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
|
||||
<Grid ColumnSpacing="32" RowSpacing="32">
|
||||
<Grid ColumnSpacing="{StaticResource DefaultColumnSpacing}" RowSpacing="{StaticResource DefaultRowSpacing}">
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="LayoutVisualStates">
|
||||
<VisualState x:Name="WideLayout">
|
||||
|
@ -75,7 +75,14 @@
|
||||
</winui:NavigationViewItem.Icon>
|
||||
</winui:NavigationViewItem>
|
||||
|
||||
<!-- TO DO: Update icon -->
|
||||
<!-- TO DO: Update icon -->
|
||||
<winui:NavigationViewItem x:Uid="Shell_FancyZones" helpers:NavHelper.NavigateTo="views:FancyZonesPage">
|
||||
<winui:NavigationViewItem.Icon>
|
||||
<FontIcon Glyph=""/>
|
||||
</winui:NavigationViewItem.Icon>
|
||||
</winui:NavigationViewItem>
|
||||
|
||||
<!-- TO DO: Update icon -->
|
||||
<winui:NavigationViewItem x:Uid="Shell_PowerRename" helpers:NavHelper.NavigateTo="views:PowerRenamePage">
|
||||
<winui:NavigationViewItem.Icon>
|
||||
<FontIcon Glyph=""/>
|
||||
@ -96,6 +103,13 @@
|
||||
</winui:NavigationViewItem.Icon>
|
||||
</winui:NavigationViewItem>
|
||||
|
||||
<!-- TO DO: Update icon -->
|
||||
<winui:NavigationViewItem x:Uid="Shell_ImageResizer" helpers:NavHelper.NavigateTo="views:ImageResizerPage">
|
||||
<winui:NavigationViewItem.Icon>
|
||||
<FontIcon Glyph=""/>
|
||||
</winui:NavigationViewItem.Icon>
|
||||
</winui:NavigationViewItem>
|
||||
|
||||
<winui:NavigationViewItem x:Uid="Shell_PowerPreview" helpers:NavHelper.NavigateTo="views:PowerPreviewPage" >
|
||||
<winui:NavigationViewItem.Icon>
|
||||
<PathIcon Data="M608 128q45 0 77 9t58 24 46 31 40 31 44 23 55 10h992q27 0 50 10t40 27 28 41 10 50v384h-128V384H928q-31 0-54 9t-44 24-41 31-45 31-58 23-78 10H128v1152h128v128H0V256q0-27 10-50t27-40 41-28 50-10h480zm0 256q24 0 42-4t33-13 29-20 32-27q-17-15-31-26t-30-20-33-13-42-5H128v128h480zm1440 512v1152H384V896h1664zm-128 128H512v896h1408v-896zm-128 256h-384v-128h384v128zm-128 256h-256v-128h256v128zm0 256h-256v-128h256v128zm-384 0H640v-640h640v640zm-128-512H768v384h384v-384z" ></PathIcon>
|
||||
@ -123,40 +137,9 @@
|
||||
</ic:EventTriggerBehavior>
|
||||
</i:Interaction.Behaviors>
|
||||
<ScrollViewer Grid.Column="0">
|
||||
<Grid RowSpacing="32"
|
||||
Margin="{StaticResource MediumLeftRightBottomMargin}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Frame x:Name="shellFrame" />
|
||||
|
||||
<StackPanel x:Name="SidePanel"
|
||||
Orientation="Vertical"
|
||||
HorizontalAlignment="Left"
|
||||
Width="240"
|
||||
Grid.Column="1">
|
||||
|
||||
<TextBlock Text="About this feature"
|
||||
Style="{StaticResource SettingsGroupTitleStyle}"
|
||||
Margin="{StaticResource XSmallBottomMargin}"/>
|
||||
|
||||
<HyperlinkButton Content="Module overview"/>
|
||||
<HyperlinkButton Content="Give feedback"/>
|
||||
|
||||
<TextBlock Text="Contributors"
|
||||
Style="{StaticResource SettingsGroupTitleStyle}"/>
|
||||
|
||||
<HyperlinkButton Content="Contributor name"/>
|
||||
<HyperlinkButton Content="Contributor name"/>
|
||||
<HyperlinkButton Content="Contributor name"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<Grid Margin="{StaticResource MediumLeftRightBottomMargin}">
|
||||
<Frame x:Name="shellFrame" />
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</winui:NavigationView>
|
||||
</Grid>
|
||||
|
@ -62,48 +62,5 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
Default_SndMSG_Callback = implmentation;
|
||||
}
|
||||
|
||||
public void HideFeatureDetails()
|
||||
{
|
||||
this.Feature_Details_Title.Visibility = Visibility.Collapsed;
|
||||
this.Feature_Details.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
public void ShowFeatureDetails()
|
||||
{
|
||||
this.Feature_Details_Title.Visibility = Visibility.Visible;
|
||||
this.Feature_Details.Visibility = Visibility.Visible;
|
||||
}
|
||||
|
||||
public void SetFeatureDetails(string moduleOverviewLink,string reportBugLink)
|
||||
{
|
||||
this.Module_Overview_LinkButton.NavigateUri = new Uri(moduleOverviewLink);
|
||||
this.Module_Feedback_LinkButton.NavigateUri = new Uri(reportBugLink);
|
||||
}
|
||||
|
||||
public void HideContributorsList()
|
||||
{
|
||||
this.Contributors_List_Title.Visibility = Visibility.Collapsed;
|
||||
this.Contributors_List.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
public void ShowContributorsList()
|
||||
{
|
||||
this.Contributors_List_Title.Visibility = Visibility.Visible;
|
||||
this.Contributors_List.Visibility = Visibility.Visible;
|
||||
}
|
||||
|
||||
public void PopulateContributorsList(List<Contributor> contributors)
|
||||
{
|
||||
this.Contributors_List.Items.Clear();
|
||||
|
||||
foreach (Contributor contributor in contributors)
|
||||
{
|
||||
HyperlinkButton link = new HyperlinkButton();
|
||||
link.Content = contributor.Name;
|
||||
link.NavigateUri = new Uri(contributor.Link);
|
||||
this.Contributors_List.Items.Add(link);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -9,7 +9,7 @@
|
||||
mc:Ignorable="d"
|
||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
|
||||
<Grid ColumnSpacing="32" RowSpacing="32">
|
||||
<Grid ColumnSpacing="{StaticResource DefaultColumnSpacing}" RowSpacing="{StaticResource DefaultRowSpacing}">
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="LayoutVisualStates">
|
||||
<VisualState x:Name="WideLayout">
|
||||
|
Loading…
Reference in New Issue
Block a user