From 1840cc9b62b402cab19ceda9be81ad6af494c62e Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Wed, 10 Mar 2021 08:16:34 -0800 Subject: [PATCH] Getting the settings UI to show Espresso. --- src/espresso/EspressoUI/EspressoUI.csproj | 25 ++++ src/espresso/EspressoUI/Themes/Dark.xaml | 18 +++ .../EspressoUI/Themes/HighContrast1.xaml | 18 +++ .../EspressoUI/Themes/HighContrast2.xaml | 19 +++ .../EspressoUI/Themes/HighContrastBlack.xaml | 18 +++ .../EspressoUI/Themes/HighContrastWhite.xaml | 18 +++ src/espresso/EspressoUI/Themes/Light.xaml | 18 +++ .../Microsoft.PowerToys.Settings.UI.csproj | 7 ++ .../Strings/en-us/Resources.resw | 4 + .../Views/EspressoPage.xaml | 113 ++++++++++++++++++ .../Views/EspressoPage.xaml.cs | 20 ++++ .../Views/ShellPage.xaml | 6 + 12 files changed, 284 insertions(+) create mode 100644 src/espresso/EspressoUI/Themes/Dark.xaml create mode 100644 src/espresso/EspressoUI/Themes/HighContrast1.xaml create mode 100644 src/espresso/EspressoUI/Themes/HighContrast2.xaml create mode 100644 src/espresso/EspressoUI/Themes/HighContrastBlack.xaml create mode 100644 src/espresso/EspressoUI/Themes/HighContrastWhite.xaml create mode 100644 src/espresso/EspressoUI/Themes/Light.xaml create mode 100644 src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml create mode 100644 src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml.cs diff --git a/src/espresso/EspressoUI/EspressoUI.csproj b/src/espresso/EspressoUI/EspressoUI.csproj index 8ba1d0db41..41864b724f 100644 --- a/src/espresso/EspressoUI/EspressoUI.csproj +++ b/src/espresso/EspressoUI/EspressoUI.csproj @@ -6,4 +6,29 @@ true + + + + + + + $(DefaultXamlRuntime) + + + $(DefaultXamlRuntime) + + + $(DefaultXamlRuntime) + + + $(DefaultXamlRuntime) + + + $(DefaultXamlRuntime) + + + $(DefaultXamlRuntime) + + + diff --git a/src/espresso/EspressoUI/Themes/Dark.xaml b/src/espresso/EspressoUI/Themes/Dark.xaml new file mode 100644 index 0000000000..f0d0cb1339 --- /dev/null +++ b/src/espresso/EspressoUI/Themes/Dark.xaml @@ -0,0 +1,18 @@ + + + + Dark.Accent1 + PowerToysImageResizer + Accent1 (Dark) + Dark + Accent1 + Black + + + + + + + \ No newline at end of file diff --git a/src/espresso/EspressoUI/Themes/HighContrast1.xaml b/src/espresso/EspressoUI/Themes/HighContrast1.xaml new file mode 100644 index 0000000000..7bfaf2e19d --- /dev/null +++ b/src/espresso/EspressoUI/Themes/HighContrast1.xaml @@ -0,0 +1,18 @@ + + + + HighContrast.Accent2 + PowerToysImageResizer + Accent2 (HighContrast) + HighContrast + Accent2 + White + + + + + + + \ No newline at end of file diff --git a/src/espresso/EspressoUI/Themes/HighContrast2.xaml b/src/espresso/EspressoUI/Themes/HighContrast2.xaml new file mode 100644 index 0000000000..15f7f1b639 --- /dev/null +++ b/src/espresso/EspressoUI/Themes/HighContrast2.xaml @@ -0,0 +1,19 @@ + + + + HighContrast.Accent3 + PowerToysImageResizer + Accent3 (HighContrast) + HighContrast + Accent3 + White + + + + + + + + \ No newline at end of file diff --git a/src/espresso/EspressoUI/Themes/HighContrastBlack.xaml b/src/espresso/EspressoUI/Themes/HighContrastBlack.xaml new file mode 100644 index 0000000000..3f5458dabb --- /dev/null +++ b/src/espresso/EspressoUI/Themes/HighContrastBlack.xaml @@ -0,0 +1,18 @@ + + + + HighContrast.Accent4 + PowerToysImageResizer + Accent4 (HighContrast) + HighContrast + Accent4 + White + + + + + + + \ No newline at end of file diff --git a/src/espresso/EspressoUI/Themes/HighContrastWhite.xaml b/src/espresso/EspressoUI/Themes/HighContrastWhite.xaml new file mode 100644 index 0000000000..40ccf7f047 --- /dev/null +++ b/src/espresso/EspressoUI/Themes/HighContrastWhite.xaml @@ -0,0 +1,18 @@ + + + + HighContrast.Accent5 + PowerToysImageResizer + Accent5 (HighContrast) + HighContrast + Accent5 + White + + + + + + + \ No newline at end of file diff --git a/src/espresso/EspressoUI/Themes/Light.xaml b/src/espresso/EspressoUI/Themes/Light.xaml new file mode 100644 index 0000000000..9b8e55a430 --- /dev/null +++ b/src/espresso/EspressoUI/Themes/Light.xaml @@ -0,0 +1,18 @@ + + + + Light.Accent1 + PowerToysImageResizer + Accent1 (Light) + Light + Accent1 + White + + + + + + + \ No newline at end of file diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Microsoft.PowerToys.Settings.UI.csproj b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Microsoft.PowerToys.Settings.UI.csproj index c6c91d8a9a..694b388dfc 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Microsoft.PowerToys.Settings.UI.csproj +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Microsoft.PowerToys.Settings.UI.csproj @@ -151,6 +151,9 @@ + + EspressoPage.xaml + ColorPickerPage.xaml @@ -344,6 +347,10 @@ MSBuild:Compile Designer + + MSBuild:Compile + Designer + Designer MSBuild:Compile diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw index 10af378234..f03f4f34a0 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw @@ -121,6 +121,10 @@ General Navigation view item name for General + + Espresso + Product name: Navigation view item name for Espresso + PowerToys Run Product name: Navigation view item name for PowerToys Run diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml new file mode 100644 index 0000000000..2e48e226c2 --- /dev/null +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml.cs b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml.cs new file mode 100644 index 0000000000..84bec4bf0e --- /dev/null +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml.cs @@ -0,0 +1,20 @@ +// 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.IO.Abstractions; +using Microsoft.PowerToys.Settings.UI.Library; +using Microsoft.PowerToys.Settings.UI.Library.ViewModels; +using Windows.UI.Xaml.Controls; + +namespace Microsoft.PowerToys.Settings.UI.Views +{ + public sealed partial class EspressoPage : Page + { + public EspressoPage() + { + var settingsUtils = new SettingsUtils(); + InitializeComponent(); + } + } +} diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/ShellPage.xaml b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/ShellPage.xaml index 96a250ed32..3d99a81869 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/ShellPage.xaml +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/ShellPage.xaml @@ -78,6 +78,12 @@ + + + + + +