mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
[Settings] Multiple UX refinements (e.g. OOBE) (#5113)
* Updated FZ page with new resizing logic * Multiple UX fixes. Added updated resizing logic to other pages * Added ImageResizer file format example snippets to tooltip * Added warning icon in hotkeysettingscontrol * Fixed formatting * Keys label can now be set * Replaced custom titleblocks with converter * Updated strings * Added correct links to the images. Added PT description on General page as well. * Colorpicker image updates * Rounded corners * Fix * Added back in correct subtitles
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
<UserControl
|
||||
x:Class="Microsoft.PowerToys.Settings.UI.Controls.BodyTextBlock"
|
||||
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.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:Interactivity="using:Microsoft.Xaml.Interactivity"
|
||||
xmlns:Core="using:Microsoft.Xaml.Interactions.Core"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300"
|
||||
d:DesignWidth="400">
|
||||
|
||||
<Grid>
|
||||
<TextBlock x:Name="CustomTextBlock"
|
||||
Style="{StaticResource BodyTextBlockStyle}"
|
||||
Margin="{StaticResource SmallTopMargin}" >
|
||||
<Interactivity:Interaction.Behaviors>
|
||||
<Core:DataTriggerBehavior Binding="{Binding Tag, ElementName=CustomTextBlock}" Value="False">
|
||||
<Core:ChangePropertyAction TargetObject="{Binding ElementName=CustomTextBlock}" PropertyName="Foreground" Value="{ThemeResource SystemColorGrayTextBrush}" />
|
||||
</Core:DataTriggerBehavior>
|
||||
<Core:DataTriggerBehavior Binding="{Binding Tag, ElementName=CustomTextBlock}" Value="True">
|
||||
<Core:ChangePropertyAction TargetObject="{Binding ElementName=CustomTextBlock}" PropertyName="Foreground" Value="{ThemeResource SystemBaseHighColor}" />
|
||||
</Core:DataTriggerBehavior>
|
||||
</Interactivity:Interaction.Behaviors>
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -1,95 +0,0 @@
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
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;
|
||||
|
||||
// The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236
|
||||
namespace Microsoft.PowerToys.Settings.UI.Controls
|
||||
{
|
||||
public sealed partial class BodyTextBlock : UserControl
|
||||
{
|
||||
public static readonly DependencyProperty TextProperty =
|
||||
DependencyProperty.Register(
|
||||
"Text",
|
||||
typeof(string),
|
||||
typeof(GroupTitleTextBlock),
|
||||
null);
|
||||
|
||||
public string _text;
|
||||
|
||||
public string Text
|
||||
{
|
||||
get
|
||||
{
|
||||
return _text;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
_text = value;
|
||||
CustomTextBlock.Text = value;
|
||||
SetValue(TextProperty, value);
|
||||
}
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty IsActiveProperty =
|
||||
DependencyProperty.Register(
|
||||
"IsActive",
|
||||
typeof(string),
|
||||
typeof(GroupTitleTextBlock),
|
||||
null);
|
||||
|
||||
private string _isActive = "False";
|
||||
|
||||
public string IsActive
|
||||
{
|
||||
get
|
||||
{
|
||||
return _isActive;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
SetValue(IsActiveProperty, value);
|
||||
_isActive = value;
|
||||
CustomTextBlock.Tag = value;
|
||||
}
|
||||
}
|
||||
|
||||
private Windows.UI.Text.FontWeight _fontWeight;
|
||||
|
||||
public Windows.UI.Text.FontWeight FontWeight
|
||||
{
|
||||
get
|
||||
{
|
||||
return _fontWeight;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
_fontWeight = value;
|
||||
CustomTextBlock.FontWeight = value;
|
||||
}
|
||||
}
|
||||
|
||||
public BodyTextBlock()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
CustomTextBlock.Tag = "False";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
<UserControl
|
||||
x:Class="Microsoft.PowerToys.Settings.UI.Controls.GroupTitleTextBlock"
|
||||
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.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:Interactivity="using:Microsoft.Xaml.Interactivity"
|
||||
xmlns:Core="using:Microsoft.Xaml.Interactions.Core"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300"
|
||||
d:DesignWidth="400">
|
||||
|
||||
<Grid>
|
||||
<TextBlock
|
||||
x:Name="CustomTextBlock"
|
||||
Style="{StaticResource SettingsGroupTitleStyle}"
|
||||
Margin="{StaticResource MediumTopMargin}">
|
||||
<Interactivity:Interaction.Behaviors>
|
||||
<Core:DataTriggerBehavior Binding="{Binding Tag, ElementName=CustomTextBlock}" Value="False">
|
||||
<Core:ChangePropertyAction TargetObject="{Binding ElementName=CustomTextBlock}" PropertyName="Foreground" Value="{ThemeResource SystemColorGrayTextBrush}" />
|
||||
</Core:DataTriggerBehavior>
|
||||
<Core:DataTriggerBehavior Binding="{Binding Tag, ElementName=CustomTextBlock}" Value="True">
|
||||
<Core:ChangePropertyAction TargetObject="{Binding ElementName=CustomTextBlock}" PropertyName="Foreground" Value="{ThemeResource SystemBaseHighColor}" />
|
||||
</Core:DataTriggerBehavior>
|
||||
</Interactivity:Interaction.Behaviors>
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -1,73 +0,0 @@
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using Windows.Foundation;
|
||||
using Windows.Foundation.Collections;
|
||||
using Windows.UI.Popups;
|
||||
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;
|
||||
|
||||
// The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236
|
||||
namespace Microsoft.PowerToys.Settings.UI.Controls
|
||||
{
|
||||
public sealed partial class GroupTitleTextBlock : UserControl
|
||||
{
|
||||
public string _text;
|
||||
|
||||
public string Text
|
||||
{
|
||||
get
|
||||
{
|
||||
return _text;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
_text = value;
|
||||
CustomTextBlock.Text = value;
|
||||
}
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty IsActiveProperty =
|
||||
DependencyProperty.Register(
|
||||
"IsActive",
|
||||
typeof(string),
|
||||
typeof(GroupTitleTextBlock),
|
||||
null);
|
||||
|
||||
private string _isActive = "False";
|
||||
|
||||
public string IsActive
|
||||
{
|
||||
get
|
||||
{
|
||||
return _isActive;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
SetValue(IsActiveProperty, value.ToString());
|
||||
_isActive = value.ToString();
|
||||
CustomTextBlock.Tag = value.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
public GroupTitleTextBlock()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
DataContext = this;
|
||||
CustomTextBlock.Tag = "False";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,32 @@
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300"
|
||||
d:DesignWidth="400">
|
||||
<TextBox x:Name="HotkeyTextBox"
|
||||
IsReadOnly="True"
|
||||
Header="{x:Bind Header, Mode=OneTime}"/>
|
||||
</UserControl>
|
||||
<StackPanel Orientation="Vertical">
|
||||
<ToolTipService.ToolTip>
|
||||
<ToolTip>
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock x:Uid="ShortcutWarningLabel"/>
|
||||
<TextBlock Text="{x:Bind Keys, Mode=OneTime}" FontWeight="SemiBold"/>
|
||||
</StackPanel>
|
||||
</ToolTip>
|
||||
</ToolTipService.ToolTip>
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock x:Name="TitleText"
|
||||
Text="{x:Bind Header, Mode=OneTime}"
|
||||
Foreground="{Binding Path=IsEnabled, ElementName=HotkeyTextBox, Converter={StaticResource ModuleEnabledToForegroundConverter}}"
|
||||
/>
|
||||
|
||||
<TextBlock x:Name="TitleGlyph" Text=""
|
||||
FontFamily="Segoe MDL2 Assets"
|
||||
Margin="4,4,0,0"
|
||||
Foreground="{Binding Path=IsEnabled, ElementName=HotkeyTextBox, Converter={StaticResource ModuleEnabledToForegroundConverter}}"
|
||||
/>
|
||||
|
||||
</StackPanel>
|
||||
<TextBox x:Name="HotkeyTextBox"
|
||||
Margin="0,5,0,0"
|
||||
IsReadOnly="True"
|
||||
/>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -3,30 +3,29 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Microsoft.PowerToys.Settings.UI.Lib;
|
||||
using System;
|
||||
using Windows.UI.Core;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Input;
|
||||
using System;
|
||||
using System.Data;
|
||||
|
||||
// The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236
|
||||
namespace Microsoft.PowerToys.Settings.UI.Controls
|
||||
{
|
||||
public sealed partial class HotkeySettingsControl : UserControl
|
||||
{
|
||||
public string Header { get; set; }
|
||||
public string Keys { get; set; }
|
||||
|
||||
public static readonly DependencyProperty IsActiveProperty =
|
||||
DependencyProperty.Register(
|
||||
"Enabled",
|
||||
typeof(string),
|
||||
typeof(bool),
|
||||
typeof(HotkeySettingsControl),
|
||||
null);
|
||||
|
||||
private string _enabled = "False";
|
||||
private bool _enabled = false;
|
||||
|
||||
public string Enabled
|
||||
public bool Enabled
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -38,13 +37,17 @@ namespace Microsoft.PowerToys.Settings.UI.Controls
|
||||
SetValue(IsActiveProperty, value);
|
||||
_enabled = value;
|
||||
|
||||
if (value.ToString().ToLower() == "true")
|
||||
if (value)
|
||||
{
|
||||
HotkeyTextBox.IsEnabled = true;
|
||||
//TitleText.IsActive = "True";
|
||||
//TitleGlyph.IsActive = "True";
|
||||
}
|
||||
else
|
||||
{
|
||||
HotkeyTextBox.IsEnabled = false;
|
||||
//TitleText.IsActive = "False";
|
||||
//TitleGlyph.IsActive = "False";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user