mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 10:46:33 +02:00
Updated UI fixes and remove conflicts
This commit is contained in:
@@ -13,6 +13,10 @@
|
|||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
|
|
||||||
<Grid RowSpacing="{StaticResource DefaultRowSpacing}" Margin="0">
|
<Grid RowSpacing="{StaticResource DefaultRowSpacing}" Margin="0">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
<VisualStateManager.VisualStateGroups>
|
<VisualStateManager.VisualStateGroups>
|
||||||
<VisualStateGroup x:Name="LayoutVisualStates">
|
<VisualStateGroup x:Name="LayoutVisualStates">
|
||||||
<VisualState x:Name="WideLayout">
|
<VisualState x:Name="WideLayout">
|
||||||
@@ -29,7 +33,7 @@
|
|||||||
<Setter Target="SidePanel.(Grid.Column)" Value="0"/>
|
<Setter Target="SidePanel.(Grid.Column)" Value="0"/>
|
||||||
<Setter Target="SidePanel.Width" Value="Auto"/>
|
<Setter Target="SidePanel.Width" Value="Auto"/>
|
||||||
<Setter Target="SidePanel.Margin" Value="24,0,24,0"/>
|
<Setter Target="SidePanel.Margin" Value="24,0,24,0"/>
|
||||||
<Setter Target="ModuleContentPresenter.(Grid.Row)" Value="2" />
|
<Setter Target="ModuleContentPresenter.(Grid.Row)" Value="1" />
|
||||||
<Setter Target="ModuleContentPresenter.Margin" Value="24,0,0,0" />
|
<Setter Target="ModuleContentPresenter.Margin" Value="24,0,0,0" />
|
||||||
<Setter Target="LinksPanel.(RelativePanel.RightOf)" Value="AboutImage" />
|
<Setter Target="LinksPanel.(RelativePanel.RightOf)" Value="AboutImage" />
|
||||||
<Setter Target="LinksPanel.(RelativePanel.AlignTopWith)" Value="AboutImage" />
|
<Setter Target="LinksPanel.(RelativePanel.AlignTopWith)" Value="AboutImage" />
|
||||||
@@ -40,15 +44,6 @@
|
|||||||
</VisualState>
|
</VisualState>
|
||||||
</VisualStateGroup>
|
</VisualStateGroup>
|
||||||
</VisualStateManager.VisualStateGroups>
|
</VisualStateManager.VisualStateGroups>
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
<ColumnDefinition Width="Auto"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<TextBlock x:Name="Header"
|
<TextBlock x:Name="Header"
|
||||||
Text="{x:Bind ModuleTitle}"
|
Text="{x:Bind ModuleTitle}"
|
||||||
@@ -57,25 +52,35 @@
|
|||||||
Margin="48,44,0,0"
|
Margin="48,44,0,0"
|
||||||
VerticalAlignment="Stretch"/>
|
VerticalAlignment="Stretch"/>
|
||||||
|
|
||||||
<ContentPresenter x:Name="ModuleContentPresenter"
|
<ScrollViewer Grid.Row="1">
|
||||||
|
<Grid RowSpacing="{StaticResource DefaultRowSpacing}" Margin="0,0,0,48">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
|
||||||
|
<ContentPresenter x:Name="ModuleContentPresenter"
|
||||||
Content="{x:Bind ModuleContent}"
|
Content="{x:Bind ModuleContent}"
|
||||||
Margin="48,12,48,0"
|
Margin="48,12,48,0"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
Grid.Row="1"
|
|
||||||
MaxWidth="{StaticResource MaxContentWidth}"/>
|
MaxWidth="{StaticResource MaxContentWidth}"/>
|
||||||
|
|
||||||
<RelativePanel Grid.Column="1"
|
<RelativePanel Grid.Column="1"
|
||||||
Grid.Row="1"
|
|
||||||
x:Name="SidePanel"
|
x:Name="SidePanel"
|
||||||
Width="{StaticResource SidePanelWidth}"
|
Width="{StaticResource SidePanelWidth}"
|
||||||
Margin="0,12,48,0">
|
Margin="0,12,48,0">
|
||||||
|
|
||||||
<TextBlock x:Name="AboutDescription"
|
<TextBlock x:Name="AboutDescription"
|
||||||
Text="{x:Bind ModuleDescription}"
|
Text="{x:Bind ModuleDescription}"
|
||||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||||
TextWrapping="Wrap"/>
|
TextWrapping="Wrap"/>
|
||||||
|
|
||||||
<HyperlinkButton x:Name="AboutImage"
|
<HyperlinkButton x:Name="AboutImage"
|
||||||
RelativePanel.Below="AboutDescription"
|
RelativePanel.Below="AboutDescription"
|
||||||
MaxWidth="240"
|
MaxWidth="240"
|
||||||
CornerRadius="8"
|
CornerRadius="8"
|
||||||
@@ -83,46 +88,48 @@
|
|||||||
Padding="0"
|
Padding="0"
|
||||||
NavigateUri="{x:Bind ModuleImageLink}"
|
NavigateUri="{x:Bind ModuleImageLink}"
|
||||||
Margin="0, 12, 0, 12">
|
Margin="0, 12, 0, 12">
|
||||||
<Image>
|
<Image>
|
||||||
<Image.Source>
|
<Image.Source>
|
||||||
<BitmapImage UriSource="{x:Bind ModuleImageSource}" />
|
<BitmapImage UriSource="{x:Bind ModuleImageSource}" />
|
||||||
</Image.Source>
|
</Image.Source>
|
||||||
</Image>
|
</Image>
|
||||||
</HyperlinkButton>
|
</HyperlinkButton>
|
||||||
|
|
||||||
<StackPanel x:Name="LinksPanel"
|
<StackPanel x:Name="LinksPanel"
|
||||||
Margin="0,1,0,0"
|
Margin="0,1,0,0"
|
||||||
RelativePanel.Below="AboutImage"
|
RelativePanel.Below="AboutImage"
|
||||||
Orientation="Vertical">
|
Orientation="Vertical">
|
||||||
|
|
||||||
<StackPanel x:Name="ModuleLinksPanel" Orientation="Vertical">
|
<StackPanel x:Name="ModuleLinksPanel" Orientation="Vertical">
|
||||||
<ItemsControl ItemsSource="{x:Bind ModuleLinks}">
|
<ItemsControl ItemsSource="{x:Bind ModuleLinks}">
|
||||||
<ItemsControl.ItemTemplate>
|
<ItemsControl.ItemTemplate>
|
||||||
<DataTemplate x:DataType="local:SidePanelLink">
|
<DataTemplate x:DataType="local:SidePanelLink">
|
||||||
<HyperlinkButton NavigateUri="{x:Bind Link}" Margin="-12,-3,0,0">
|
<HyperlinkButton NavigateUri="{x:Bind Link}" Margin="-12,-3,0,0">
|
||||||
<TextBlock Text="{x:Bind Label}" TextWrapping="Wrap" />
|
<TextBlock Text="{x:Bind Label}" TextWrapping="Wrap" />
|
||||||
</HyperlinkButton>
|
</HyperlinkButton>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ItemsControl.ItemTemplate>
|
</ItemsControl.ItemTemplate>
|
||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel x:Name="AttributionPanel"
|
<StackPanel x:Name="AttributionPanel"
|
||||||
Visibility="{x:Bind AttributionLinks.Count, Converter={StaticResource doubleToVisibilityConverter}}"
|
Visibility="{x:Bind AttributionLinks.Count, Converter={StaticResource doubleToVisibilityConverter}}"
|
||||||
Orientation="Vertical">
|
Orientation="Vertical">
|
||||||
<TextBlock x:Uid="AttributionTitle" Style="{StaticResource SettingsGroupTitleStyle}" />
|
<TextBlock x:Uid="AttributionTitle" Style="{StaticResource SettingsGroupTitleStyle}" />
|
||||||
|
|
||||||
<ItemsControl x:Name="AttributionLinksItemControl" ItemsSource="{x:Bind AttributionLinks}">
|
<ItemsControl x:Name="AttributionLinksItemControl" ItemsSource="{x:Bind AttributionLinks}">
|
||||||
<ItemsControl.ItemTemplate>
|
<ItemsControl.ItemTemplate>
|
||||||
<DataTemplate x:DataType="local:SidePanelLink">
|
<DataTemplate x:DataType="local:SidePanelLink">
|
||||||
<HyperlinkButton NavigateUri="{x:Bind Link}" Margin="-12,-3,0,0">
|
<HyperlinkButton NavigateUri="{x:Bind Link}" Margin="-12,-3,0,0">
|
||||||
<TextBlock Text="{x:Bind Label}" TextWrapping="Wrap" />
|
<TextBlock Text="{x:Bind Label}" TextWrapping="Wrap" />
|
||||||
</HyperlinkButton>
|
</HyperlinkButton>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ItemsControl.ItemTemplate>
|
</ItemsControl.ItemTemplate>
|
||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</RelativePanel>
|
</RelativePanel>
|
||||||
|
</Grid>
|
||||||
|
</ScrollViewer>
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -126,7 +126,7 @@
|
|||||||
</ItemsControl.ItemContainerTransitions>
|
</ItemsControl.ItemContainerTransitions>
|
||||||
<ListView.ItemTemplate>
|
<ListView.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Grid Width="466" Background="Transparent">
|
<Grid Width="420" Background="Transparent">
|
||||||
<!-- Disabled reordering by dragging
|
<!-- Disabled reordering by dragging
|
||||||
|
|
||||||
<Interactivity:Interaction.Behaviors>
|
<Interactivity:Interaction.Behaviors>
|
||||||
@@ -185,7 +185,7 @@
|
|||||||
IsEnabled="{Binding CanMoveUp}"
|
IsEnabled="{Binding CanMoveUp}"
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
Margin="0,0,24,0"
|
Margin="0,0,24,4"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
Visibility="Collapsed"
|
Visibility="Collapsed"
|
||||||
FontFamily="Segoe MDL2 Assets"
|
FontFamily="Segoe MDL2 Assets"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
xmlns:converters="using:Microsoft.PowerToys.Settings.UI.Converters"
|
xmlns:converters="using:Microsoft.PowerToys.Settings.UI.Converters"
|
||||||
xmlns:toolkitconverters="using:Microsoft.Toolkit.Uwp.UI.Converters"
|
xmlns:toolkitconverters="using:Microsoft.Toolkit.Uwp.UI.Converters"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
AutomationProperties.LandmarkType="Main">
|
AutomationProperties.LandmarkType="Main" x:Name="RootPage">
|
||||||
<Page.Resources>
|
<Page.Resources>
|
||||||
<converters:ImageResizerFitToStringConverter x:Key="ImageResizerFitToStringConverter" />
|
<converters:ImageResizerFitToStringConverter x:Key="ImageResizerFitToStringConverter" />
|
||||||
<converters:ImageResizerUnitToStringConverter x:Key="ImageResizerUnitToStringConverter" />
|
<converters:ImageResizerUnitToStringConverter x:Key="ImageResizerUnitToStringConverter" />
|
||||||
@@ -61,12 +61,12 @@
|
|||||||
<TextBlock Text="{x:Bind Unit, Mode=OneWay, Converter={StaticResource ImageResizerUnitToStringConverter},ConverterParameter=ToLower}" Foreground="{ThemeResource SystemBaseMediumColor}" Margin="0,0,4,0"/>
|
<TextBlock Text="{x:Bind Unit, Mode=OneWay, Converter={StaticResource ImageResizerUnitToStringConverter},ConverterParameter=ToLower}" Foreground="{ThemeResource SystemBaseMediumColor}" Margin="0,0,4,0"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel HorizontalAlignment="Right" Grid.Column="2" Orientation="Horizontal">
|
<StackPanel Spacing="8" HorizontalAlignment="Right" Grid.Column="2" Orientation="Horizontal">
|
||||||
<Button
|
<Button
|
||||||
x:Uid="EditButton"
|
x:Uid="EditButton"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
FontFamily="Segoe MDL2 Assets"
|
FontFamily="Segoe MDL2 Assets"
|
||||||
Width="36"
|
Width="40"
|
||||||
Height="36"
|
Height="36"
|
||||||
Content="">
|
Content="">
|
||||||
<ToolTipService.ToolTip>
|
<ToolTipService.ToolTip>
|
||||||
@@ -126,7 +126,7 @@
|
|||||||
x:Uid="RemoveButton"
|
x:Uid="RemoveButton"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
FontFamily="Segoe MDL2 Assets"
|
FontFamily="Segoe MDL2 Assets"
|
||||||
Width="36"
|
Width="40"
|
||||||
Height="36"
|
Height="36"
|
||||||
Content=""
|
Content=""
|
||||||
Click="DeleteCustomSize"
|
Click="DeleteCustomSize"
|
||||||
|
|||||||
@@ -42,9 +42,6 @@
|
|||||||
<AdaptiveTrigger MinWindowWidth="{StaticResource SmallLayoutMinWidth}" />
|
<AdaptiveTrigger MinWindowWidth="{StaticResource SmallLayoutMinWidth}" />
|
||||||
<AdaptiveTrigger MinWindowWidth="0" />
|
<AdaptiveTrigger MinWindowWidth="0" />
|
||||||
</VisualState.StateTriggers>
|
</VisualState.StateTriggers>
|
||||||
<VisualState.Setters>
|
|
||||||
<Setter Target="navigationView.HeaderTemplate" Value="{StaticResource HeaderSmallTemplate}"/>
|
|
||||||
</VisualState.Setters>
|
|
||||||
</VisualState>
|
</VisualState>
|
||||||
</VisualStateGroup>
|
</VisualStateGroup>
|
||||||
</VisualStateManager.VisualStateGroups>
|
</VisualStateManager.VisualStateGroups>
|
||||||
@@ -58,8 +55,7 @@
|
|||||||
IsBackEnabled="{x:Bind ViewModel.IsBackEnabled, Mode=OneWay}"
|
IsBackEnabled="{x:Bind ViewModel.IsBackEnabled, Mode=OneWay}"
|
||||||
SelectedItem="{x:Bind ViewModel.Selected, Mode=OneWay}"
|
SelectedItem="{x:Bind ViewModel.Selected, Mode=OneWay}"
|
||||||
IsSettingsVisible="False"
|
IsSettingsVisible="False"
|
||||||
CompactModeThresholdWidth="0"
|
CompactModeThresholdWidth="0">
|
||||||
SelectionChanged="NavigationView_SelectionChanged">
|
|
||||||
<winui:NavigationView.MenuItems>
|
<winui:NavigationView.MenuItems>
|
||||||
<winui:NavigationViewItem x:Uid="Shell_General" helpers:NavHelper.NavigateTo="views:GeneralPage" AutomationProperties.HeadingLevel="Level1">
|
<winui:NavigationViewItem x:Uid="Shell_General" helpers:NavHelper.NavigateTo="views:GeneralPage" AutomationProperties.HeadingLevel="Level1">
|
||||||
<winui:NavigationViewItem.Icon>
|
<winui:NavigationViewItem.Icon>
|
||||||
@@ -146,18 +142,12 @@
|
|||||||
</Button>
|
</Button>
|
||||||
</winui:NavigationView.PaneFooter>
|
</winui:NavigationView.PaneFooter>
|
||||||
<i:Interaction.Behaviors>
|
<i:Interaction.Behaviors>
|
||||||
|
|
||||||
<ic:EventTriggerBehavior EventName="ItemInvoked">
|
<ic:EventTriggerBehavior EventName="ItemInvoked">
|
||||||
<ic:InvokeCommandAction Command="{x:Bind ViewModel.ItemInvokedCommand}" />
|
<ic:InvokeCommandAction Command="{x:Bind ViewModel.ItemInvokedCommand}" />
|
||||||
</ic:EventTriggerBehavior>
|
</ic:EventTriggerBehavior>
|
||||||
</i:Interaction.Behaviors>
|
</i:Interaction.Behaviors>
|
||||||
<ScrollViewer x:Name="scrollViewer"
|
<Frame x:Name="shellFrame" />
|
||||||
VerticalScrollBarVisibility="Auto"
|
</winui:NavigationView>
|
||||||
Grid.Column="0">
|
|
||||||
<Grid>
|
|
||||||
<Frame x:Name="shellFrame" />
|
|
||||||
</Grid>
|
|
||||||
</ScrollViewer>
|
|
||||||
</winui:NavigationView>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@@ -161,11 +161,5 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
|||||||
{
|
{
|
||||||
OpenOobeWindowCallback();
|
OpenOobeWindowCallback();
|
||||||
}
|
}
|
||||||
|
|
||||||
[SuppressMessage("Usage", "CA1801:Review unused parameters", Justification = "Params are required for event handler signature requirements.")]
|
|
||||||
private void NavigationView_SelectionChanged(Microsoft.UI.Xaml.Controls.NavigationView sender, Microsoft.UI.Xaml.Controls.NavigationViewSelectionChangedEventArgs args)
|
|
||||||
{
|
|
||||||
scrollViewer.ChangeView(null, 0, null, true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user