Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Settings] New UX #12470

Merged
merged 89 commits into from
Aug 23, 2021
Merged
Show file tree
Hide file tree
Changes from 84 commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
1302469
Removed hardcoded background
Jul 16, 2021
37110dd
Background
Jul 16, 2021
4bac5d2
Updated pages
Jul 22, 2021
a6c3ca3
Merge branch 'master' into users/niels9001/settings-newstyle
Jul 22, 2021
468709b
Added OOBE to shellpage
Jul 22, 2021
eb8a9bb
Margin fixes
Jul 22, 2021
62d938c
Fix
Jul 22, 2021
f9d9ec9
Resource update
Jul 22, 2021
135a52e
Resource string update
Jul 22, 2021
75e5a5d
Removed reference from installer file
Jul 22, 2021
31b4620
Merge branch 'master' into users/niels9001/settings-newstyle
Jul 27, 2021
dde7b0a
Updated UI fixes and remove conflicts
Jul 27, 2021
9e2f379
Merge branch 'master' into users/niels9001/settings-newstyle
Jul 27, 2021
7d831f4
Adding new settings control
Aug 1, 2021
bb181d9
PowerRename
Aug 1, 2021
31da2e4
Sidepanel updates
Aug 1, 2021
04f2de0
Shortcut Guide
Aug 1, 2021
d11d2a5
Updates screeens
Aug 1, 2021
6c81c95
General page updates
Aug 2, 2021
001527d
Awake UX update
Aug 2, 2021
f059216
Changed order for power preview note
Aug 2, 2021
fc4f2ff
Fixes
Aug 4, 2021
6bf2629
UI fixes
Aug 5, 2021
96171f7
KBM
Aug 8, 2021
db89faf
IsEnabled state support
Aug 8, 2021
adf07ff
Added new controls
Aug 8, 2021
bc93a27
Update
Aug 8, 2021
160b5dc
Updated nugest packages
Aug 9, 2021
9fbb314
Replaced itemscontrol
Aug 9, 2021
0b17828
Introducing setting button style
Aug 9, 2021
d39f341
FancyZones page
Aug 10, 2021
ba4aa3c
Plugin page
Aug 11, 2021
9865b48
Switch case
Aug 11, 2021
f65dd0a
Fixed typo
Aug 11, 2021
d1a0a3b
Plugin manager update
Aug 11, 2021
88c5c07
Introducing SettingExpander
Aug 11, 2021
0c36e3f
Setting automation properties
Aug 11, 2021
e24e069
Accesibility improvements
Aug 12, 2021
468c0a7
VCM and cleanup
Aug 12, 2021
d6ebb55
Refactoring OOBE pages part 1
Aug 13, 2021
491b720
OOBE XAML refactoring
Aug 16, 2021
78f07eb
Added MinWidth to actioncontent controls
Aug 16, 2021
ee4cfca
Updates to various settings
Aug 16, 2021
64a0531
Spell update
Aug 16, 2021
35772d3
Update to author label
Aug 16, 2021
3113bf5
Merge branch 'master' into users/niels9001/settings-newstyle
Aug 16, 2021
028e15f
Clean up
Aug 16, 2021
fe79ec1
Removing redunant files
Aug 16, 2021
2b06c75
Move file
Aug 16, 2021
1a5c887
Updated files
Aug 16, 2021
d66cf61
Revert "Updated files"
Aug 16, 2021
9b13714
Revert "Move file"
Aug 16, 2021
68b1aeb
Revert "Removing redunant files"
Aug 16, 2021
5ec4b8d
Revert "Clean up"
Aug 16, 2021
dfdfd65
Removed redundant styles
Aug 16, 2021
931406f
Revert "Removed redundant styles"
niels9001 Aug 16, 2021
5a124c0
Files cleanup
niels9001 Aug 16, 2021
a7841f2
Removing converter, updating background and paddings
niels9001 Aug 16, 2021
6e3d5ca
Styling updates
Aug 17, 2021
ece6d2d
Unit test updates
Aug 17, 2021
5f770b3
Fixes
Aug 17, 2021
2784607
Installer fixes
Aug 17, 2021
527f2d8
Update Resources.resw
Aug 17, 2021
d253fb1
Shell page updates
Aug 17, 2021
81e84bb
Updated pagelinks
Aug 17, 2021
a310e44
Styles re-ordering
Aug 19, 2021
babd5a1
Updated converter
Aug 19, 2021
6bd5ff7
Updated ToggleSwitch style
Aug 19, 2021
4012d23
Merge branch 'master' into users/niels9001/settings-newstyle
niels9001 Aug 19, 2021
628b7b9
Bugfixes
Aug 19, 2021
d8b5072
Merge branch 'users/niels9001/settings-newstyle' of https://github.co…
Aug 19, 2021
2c28936
Typo fix
Aug 19, 2021
de72843
[Settings] New UX - installer dll fixes (#12818)
jaimecbernardo Aug 20, 2021
cd2a75a
[Settings] New UX - Fix some failing tests (#12822)
jaimecbernardo Aug 20, 2021
f99042f
Bugfixes
Aug 20, 2021
873dc1b
Typo fix
Aug 20, 2021
1d2ec92
Hiding VCM
Aug 20, 2021
8b9c5d2
Bugfixes
Aug 20, 2021
03b58da
Download button fix
Aug 20, 2021
6b0a661
Remove Newtonsoft.Json from installer file
Aug 21, 2021
533980d
Updated visuals
Aug 21, 2021
0bdda65
Bugfixes
Aug 21, 2021
95d00f7
Syntax fix
Aug 22, 2021
98badf2
Updated installer file
Aug 22, 2021
0c77c73
Bugfixes
Aug 22, 2021
40e9280
New label
Aug 23, 2021
599e228
Theming support for OOBE
Aug 23, 2021
faad4c1
Put back in Documentation hyperlink
Aug 23, 2021
976d05f
Right uid
Aug 23, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/actions/spell-check/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ accessibilityinsights
Acl
aclapi
AColumn
Accessible
acos
acrt
Actioncenter
Expand Down Expand Up @@ -270,6 +271,7 @@ codereview
Codespaces
COINIT
colorconv
colorformat
colorhistory
colorhistorylimit
COLORKEY
Expand Down
6 changes: 3 additions & 3 deletions installer/PowerToysSetup/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@
<File Source="$(var.BinX64Dir)Settings\PowerToys.Settings.exe"/>
<File Source="$(var.BinX64Dir)Settings\Microsoft.PowerToys.Settings.UI.exe"/>
<!-- dll -->
<?foreach File in concrt140_app.dll;Microsoft.Bcl.AsyncInterfaces.dll;System.IO.Abstractions.dll;Microsoft.PowerToys.Settings.UI.Lib.dll;PowerToys.Settings.dll;Microsoft.Toolkit.dll;Microsoft.Toolkit.Uwp.dll;Microsoft.Toolkit.Uwp.UI.dll;Microsoft.Toolkit.Win32.UI.XamlHost.dll;Microsoft.Toolkit.Win32.UI.XamlHost.Managed.dll;Microsoft.Toolkit.Wpf.UI.Controls.dll;Microsoft.Toolkit.Wpf.UI.XamlHost.dll;Microsoft.UI.Xaml.dll;Microsoft.Xaml.Interactions.dll;Microsoft.Xaml.Interactivity.dll;msvcp140_1_app.dll;msvcp140_2_app.dll;msvcp140_app.dll;Newtonsoft.Json.dll;PowerToysInterop.dll;System.Runtime.CompilerServices.Unsafe.dll;System.Text.Encodings.Web.dll;System.Text.Json.dll;vcamp140_app.dll;vccorlib140_app.dll;vcomp140_app.dll;vcruntime140_1_app.dll;vcruntime140_app.dll;ManagedTelemetry.dll;ManagedCommon.dll;ColorCode.Core.dll;ColorCode.UWP.dll;Microsoft.Graphics.Canvas.winmd;Microsoft.Toolkit.Parsers.dll;Microsoft.Toolkit.Uwp.UI.Animations.dll;Microsoft.Toolkit.Uwp.UI.Controls.dll?>
<?foreach File in concrt140_app.dll;Microsoft.Bcl.AsyncInterfaces.dll;System.IO.Abstractions.dll;Microsoft.PowerToys.Settings.UI.Lib.dll;PowerToys.Settings.dll;Microsoft.Toolkit.dll;Microsoft.Toolkit.Uwp.dll;Microsoft.Toolkit.Uwp.UI.dll;Microsoft.Toolkit.Win32.UI.XamlHost.dll;Microsoft.Toolkit.Win32.UI.XamlHost.Managed.dll;Microsoft.Toolkit.Wpf.UI.Controls.dll;Microsoft.Toolkit.Wpf.UI.XamlHost.dll;Microsoft.UI.Xaml.dll;Microsoft.Xaml.Interactions.dll;Microsoft.Xaml.Interactivity.dll;msvcp140_1_app.dll;msvcp140_2_app.dll;msvcp140_app.dll;PowerToysInterop.dll;System.Runtime.CompilerServices.Unsafe.dll;System.Text.Encodings.Web.dll;System.Text.Json.dll;vcamp140_app.dll;vccorlib140_app.dll;vcomp140_app.dll;vcruntime140_1_app.dll;vcruntime140_app.dll;ManagedTelemetry.dll;ManagedCommon.dll;ColorCode.Core.dll;ColorCode.UWP.dll;Microsoft.Graphics.Canvas.winmd;Microsoft.Toolkit.Uwp.UI.Controls.Core.dll;Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.dll;Microsoft.Toolkit.Uwp.UI.Controls.Input.dll;Microsoft.Toolkit.Uwp.UI.Controls.Layout.dll;Microsoft.Toolkit.Uwp.UI.Controls.Markdown.dll;Microsoft.Toolkit.Uwp.UI.Controls.Media.dll;Microsoft.Toolkit.Uwp.UI.Controls.Primitives.dll?>
<File Id="SettingsV2_$(var.File)" Source="$(var.BinX64Dir)Settings\$(var.File)" />
<?endforeach?>
<!-- json -->
Expand Down Expand Up @@ -848,7 +848,7 @@
</DirectoryRef>
<DirectoryRef Id="SettingsV2OOBEAssetsFluentIconsInstallFolder" FileSource="$(var.BinX64Dir)Settings\Assets\FluentIcons">
<Component Id="SettingsV2OOBEAssetsFluentIcons" Guid="6A380D5A-DA63-45B5-B68F-06D57CDD1B9C" Win64="yes">
<?foreach File in ColorPicker.png;FancyZones.png;Awake.png;FileExplorerPreview.png;ImageResizer.png;KeyboardManager.png;PowerRename.png;PowerToys.png;PowerToysRun.png;ShortcutGuide.png;VideoConferenceMute.png ?>
<?foreach File in ColorPicker.png;FancyZones.png;Awake.png;FileExplorerPreview.png;ImageResizer.png;KeyboardManager.png;PowerRename.png;PowerToys.png;PowerToysRun.png;Settings.png;ShortcutGuide.png;VideoConferenceMute.png ?>
<File Id="SettingsV2OOBEAssetsFluentIcons_$(var.File)" Source="$(var.BinX64Dir)Settings\Assets\FluentIcons\FluentIcons$(var.File)" />
<?endforeach?>
</Component>
Expand All @@ -869,7 +869,7 @@
</DirectoryRef>
<DirectoryRef Id="SettingsV2StylesInstallFolder" FileSource="$(var.BinX64Dir)Settings\Styles">
<Component Id="SettingsV2Styles" Guid="44B5C0E0-76DA-4604-BB86-FCD27A00EB71" Win64="yes">
<?foreach File in Page.xbf;TextBlock.xbf;_Colors.xbf;_FontSizes.xbf;_Sizes.xbf;_Thickness.xbf;Button.xbf?>
<?foreach File in TextBlock.xbf;Button.xbf?>
<File Id="SettingsV2_Styles_$(var.File)" Source="$(var.BinX64Dir)Settings\Styles\$(var.File)" />
<?endforeach?>
</Component>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@ public GeneralViewModel(ISettingsRepository<GeneralSettings> settingsRepository,
// normalization for switch statements
switch (GeneralSettingsConfig.Theme.ToUpperInvariant())
{
case "LIGHT":
_isLightThemeRadioButtonChecked = true;
break;
case "DARK":
_isDarkThemeRadioButtonChecked = true;
_themeIndex = 0;
break;
case "LIGHT":
_themeIndex = 1;
break;
case "SYSTEM":
_isSystemThemeRadioButtonChecked = true;
_themeIndex = 2;
break;
}

Expand Down Expand Up @@ -116,9 +116,8 @@ public GeneralViewModel(ISettingsRepository<GeneralSettings> settingsRepository,
private bool _isElevated;
private bool _runElevated;
private bool _isAdmin;
private bool _isDarkThemeRadioButtonChecked;
private bool _isLightThemeRadioButtonChecked;
private bool _isSystemThemeRadioButtonChecked;
private int _themeIndex;

private bool _autoDownloadUpdates;

private UpdatingSettings.UpdatingState _updatingState = UpdatingSettings.UpdatingState.UpToDate;
Expand Down Expand Up @@ -255,81 +254,33 @@ public static bool AutoUpdatesEnabled
}
}

[SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "This may throw if the XAML page is not initialized in tests (https://github.com/microsoft/PowerToys/pull/2676)")]
public bool IsDarkThemeRadioButtonChecked
public int ThemeIndex
{
get
{
return _isDarkThemeRadioButtonChecked;
return _themeIndex;
}

set
{
if (value == true)
if (_themeIndex != value)
{
GeneralSettingsConfig.Theme = "dark";
_isDarkThemeRadioButtonChecked = value;
try
switch (value)
{
UpdateUIThemeCallBack(GeneralSettingsConfig.Theme);
}
catch (Exception e)
{
Logger.LogError("Exception encountered when changing Settings theme", e);
case 0: GeneralSettingsConfig.Theme = "dark"; break;
case 1: GeneralSettingsConfig.Theme = "light"; break;
case 2: GeneralSettingsConfig.Theme = "system"; break;
}

NotifyPropertyChanged();
}
}
}
_themeIndex = value;

[SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "This may throw if the XAML page is not initialized in tests (https://github.com/microsoft/PowerToys/pull/2676)")]
public bool IsLightThemeRadioButtonChecked
{
get
{
return _isLightThemeRadioButtonChecked;
}

set
{
if (value == true)
{
GeneralSettingsConfig.Theme = "light";
_isLightThemeRadioButtonChecked = value;
try
{
UpdateUIThemeCallBack(GeneralSettingsConfig.Theme);
}
catch (Exception e)
{
Logger.LogError("Exception encountered when changing Settings theme", e);
}

NotifyPropertyChanged();
}
}
}

[SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "This may throw if the XAML page is not initialized in tests (https://github.com/microsoft/PowerToys/pull/2676)")]
public bool IsSystemThemeRadioButtonChecked
{
get
{
return _isSystemThemeRadioButtonChecked;
}

set
{
if (value == true)
{
GeneralSettingsConfig.Theme = "system";
_isSystemThemeRadioButtonChecked = value;
try
{
UpdateUIThemeCallBack(GeneralSettingsConfig.Theme);
}
#pragma warning disable CA1031 // Do not catch general exception types
catch (Exception e)
#pragma warning restore CA1031 // Do not catch general exception types
{
Logger.LogError("Exception encountered when changing Settings theme", e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,21 +139,6 @@ public string IconPath
}
}

private bool _showAdditionalInfoPanel;

public bool ShowAdditionalInfoPanel
{
get => _showAdditionalInfoPanel;
set
{
if (value != _showAdditionalInfoPanel)
{
_showAdditionalInfoPanel = value;
NotifyPropertyChanged();
}
}
}

public event PropertyChangedEventHandler PropertyChanged;

private void NotifyPropertyChanged([CallerMemberName] string propertyName = "")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,8 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
{
public class PowerLauncherViewModel : Observable
{
private bool _isDarkThemeRadioButtonChecked;
private bool _isLightThemeRadioButtonChecked;
private bool _isSystemThemeRadioButtonChecked;

private bool _isCursorPositionRadioButtonChecked;
private bool _isPrimaryMonitorPositionRadioButtonChecked;
private bool _isFocusPositionRadioButtonChecked;
private int _themeIndex;
private int _monitorPositionIndex;

private string _searchText;

Expand Down Expand Up @@ -75,27 +70,27 @@ public PowerLauncherViewModel(PowerLauncherSettings settings, ISettingsRepositor

switch (settings.Properties.Theme)
{
case Theme.Light:
_isLightThemeRadioButtonChecked = true;
break;
case Theme.Dark:
_isDarkThemeRadioButtonChecked = true;
_themeIndex = 0;
break;
case Theme.Light:
_themeIndex = 1;
break;
case Theme.System:
_isSystemThemeRadioButtonChecked = true;
_themeIndex = 2;
break;
}

switch (settings.Properties.Position)
{
case StartupPosition.Cursor:
_isCursorPositionRadioButtonChecked = true;
_monitorPositionIndex = 0;
break;
case StartupPosition.PrimaryMonitor:
_isPrimaryMonitorPositionRadioButtonChecked = true;
_monitorPositionIndex = 1;
break;
case StartupPosition.Focus:
_isFocusPositionRadioButtonChecked = true;
_monitorPositionIndex = 2;
break;
}

Expand Down Expand Up @@ -199,112 +194,46 @@ public int MaximumNumberOfResults
}
}

public bool IsDarkThemeRadioButtonChecked
{
get
{
return _isDarkThemeRadioButtonChecked;
}

set
{
if (value == true)
{
settings.Properties.Theme = Theme.Dark;
_isDarkThemeRadioButtonChecked = value;

UpdateSettings();
}
}
}

public bool IsLightThemeRadioButtonChecked
{
get
{
return _isLightThemeRadioButtonChecked;
}

set
{
if (value == true)
{
settings.Properties.Theme = Theme.Light;
_isDarkThemeRadioButtonChecked = value;

UpdateSettings();
}
}
}

public bool IsSystemThemeRadioButtonChecked
{
get
{
return _isSystemThemeRadioButtonChecked;
}

set
{
if (value == true)
{
settings.Properties.Theme = Theme.System;
_isDarkThemeRadioButtonChecked = value;

UpdateSettings();
}
}
}

public bool IsCursorPositionRadioButtonChecked
public int ThemeIndex
{
get
{
return _isCursorPositionRadioButtonChecked;
return _themeIndex;
}

set
{
if (value == true)
switch (value)
{
settings.Properties.Position = StartupPosition.Cursor;
_isCursorPositionRadioButtonChecked = value;
UpdateSettings();
case 0: settings.Properties.Theme = Theme.Dark; break;
case 1: settings.Properties.Theme = Theme.Light; break;
case 2: settings.Properties.Theme = Theme.System; break;
}
}
}

public bool IsPrimaryMonitorPositionRadioButtonChecked
{
get
{
return _isPrimaryMonitorPositionRadioButtonChecked;
}

set
{
if (value == true)
{
settings.Properties.Position = StartupPosition.PrimaryMonitor;
_isPrimaryMonitorPositionRadioButtonChecked = value;
UpdateSettings();
}
_themeIndex = value;
UpdateSettings();
}
}

public bool IsFocusPositionRadioButtonChecked
public int MonitorPositionIndex
{
get
{
return _isFocusPositionRadioButtonChecked;
return _monitorPositionIndex;
}

set
{
if (value == true)
if (_monitorPositionIndex != value)
{
settings.Properties.Position = StartupPosition.Focus;
_isFocusPositionRadioButtonChecked = value;
switch (value)
{
case 0: settings.Properties.Position = StartupPosition.Cursor; break;
case 1: settings.Properties.Position = StartupPosition.PrimaryMonitor; break;
case 2: settings.Properties.Position = StartupPosition.Focus; break;
}

_monitorPositionIndex = value;
UpdateSettings();
}
}
Expand Down
Loading