-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Theming for powertoys run #4007
Conversation
Think we will need some TLC on high contrast but awesome! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed with @crutkas - I think we need to atleast change the hover visual to purple/green.
I realized that Windows provides different contrast themes. Which one do we support? What is part of this PR is I similar to HighContrast White.
@niels9001 I have found a way in which we handle all the four types of contrast separately. I will push the changes and let you know. |
@@ -787,7 +787,7 @@ | |||
<Fragment> | |||
<ComponentGroup Id="LauncherComponents"> | |||
<Component Id="launcherInstallComponent" Directory="LauncherInstallFolder" Guid="5E688DB4-C522-4268-BA54-ED1CDFFE9DB6"> | |||
<?foreach File in concrt140_app.dll;ICSharpCode.SharpZipLib.dll;JetBrains.Annotations.dll;Mages.Core.dll;Microsoft.Search.Interop.dll;EntityFramework.SqlServer.dll;EntityFramework.dll;Mono.Cecil.dll;Mono.Cecil.Mdb.dll;Mono.Cecil.Pdb.dll;Mono.Cecil.Rocks.dll;msvcp140_1_app.dll;msvcp140_2_app.dll;msvcp140_app.dll;Newtonsoft.Json.dll;NHotkey.dll;NHotkey.Wpf.dll;NLog.dll;NLog.Extensions.Logging.dll;Pinyin4Net.dll;PowerLauncher.deps.json;PowerLauncher.dll;PowerLauncher.exe;Microsoft.Toolkit.Win32.UI.XamlHost.Managed.dll;Microsoft.Toolkit.Wpf.UI.XamlHost.dll;Microsoft.Xaml.Behaviors.dll;System.Text.Json.dll;sni.dll;System.Data.SQLite.EF6.dll;PowerLauncher.runtimeconfig.json;SQLite.Interop.dll;System.Data.OleDb.dll;System.Data.SqlClient.dll;System.Data.SQLite.dll;vcamp140_app.dll;vccorlib140_app.dll;vcomp140_app.dll;vcruntime140_1_app.dll;vcruntime140_app.dll;WindowsInput.dll;Wox.Core.dll;Wox.dll;Wox.Infrastructure.dll;Wox.Plugin.dll;PowerToysInterop.dll;Telemetry.dll;PowerLauncher.Telemetry.dll;PropertyChanged.dll;Microsoft.Extensions.Configuration.Abstractions.dll;Microsoft.Extensions.Configuration.Binder.dll;Microsoft.Extensions.Configuration.dll;Microsoft.Extensions.DependencyInjection.Abstractions.dll;Microsoft.Extensions.DependencyInjection.dll;Microsoft.Extensions.Logging.Abstractions.dll;Microsoft.Extensions.Logging.dll;Microsoft.Extensions.Options.dll;Microsoft.Extensions.Primitives.dll?> | |||
<?foreach File in concrt140_app.dll;ICSharpCode.SharpZipLib.dll;JetBrains.Annotations.dll;Mages.Core.dll;Microsoft.Search.Interop.dll;EntityFramework.SqlServer.dll;EntityFramework.dll;Mono.Cecil.dll;Mono.Cecil.Mdb.dll;Mono.Cecil.Pdb.dll;Mono.Cecil.Rocks.dll;msvcp140_1_app.dll;msvcp140_2_app.dll;msvcp140_app.dll;Newtonsoft.Json.dll;NHotkey.dll;NHotkey.Wpf.dll;NLog.dll;NLog.Extensions.Logging.dll;Pinyin4Net.dll;PowerLauncher.deps.json;PowerLauncher.dll;PowerLauncher.exe;Microsoft.Toolkit.Win32.UI.XamlHost.Managed.dll;Microsoft.Toolkit.Wpf.UI.XamlHost.dll;Microsoft.Xaml.Behaviors.dll;System.Text.Json.dll;sni.dll;System.Data.SQLite.EF6.dll;PowerLauncher.runtimeconfig.json;SQLite.Interop.dll;System.Data.OleDb.dll;System.Data.SqlClient.dll;System.Data.SQLite.dll;vcamp140_app.dll;vccorlib140_app.dll;vcomp140_app.dll;vcruntime140_1_app.dll;vcruntime140_app.dll;WindowsInput.dll;Wox.Core.dll;Wox.dll;Wox.Infrastructure.dll;Wox.Plugin.dll;PowerToysInterop.dll;Telemetry.dll;PowerLauncher.Telemetry.dll;PropertyChanged.dll;Microsoft.Extensions.Configuration.Abstractions.dll;Microsoft.Extensions.Configuration.Binder.dll;Microsoft.Extensions.Configuration.dll;Microsoft.Extensions.DependencyInjection.Abstractions.dll;Microsoft.Extensions.DependencyInjection.dll;Microsoft.Extensions.Logging.Abstractions.dll;Microsoft.Extensions.Logging.dll;Microsoft.Extensions.Options.dll;Microsoft.Extensions.Primitives.dll;ControlzEx.dll;MahApps.Metro.dll?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the following dll's at the end: ControlzEx.dll, MahApps.Metro.dll
That'd be great! Once that's in I'll make sure to update all the high contrast themes right colors. |
Sound good! Thanks a lot, Niels 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the accent colors changing in PT Run when I change the windows accent. Is that expected behavior? Personally I would like my accent colors to be the same as that of windows. Doesn't have to be a part of this PR if we choose to go ahead with it.
nit: Can you pls update the reference link in the Summary of this PR to https://mahapps.com/docs/themes/thememanager, it shows a 404 when I click on the present link.
Let’s log a new bug for that with what accent isn’t correct. |
I think WPF requires you to restart the app for the Accebt brush update. I recall we had something like that in the Fancy Zones editor as well. |
For updating accent color, #2988 might help😊 |
@alekhyareddy28 Updating with accent color wasn't in the scope of this PR. We used controlzex to register a callback for theme change but it doesn't fire a callback on accent changes and only on light/dark base color changes. Also as Niels pointed out, if we use Mahapps accent brushes they would require system to be restarted before the changes can take effect. I will file a bug for accent color so we can track this. |
@AnuthaDev Correct me if I am wrong but your changes in #2988 would only be applied on launcher startup and not on accent changes at runtime? |
Everytime the visibility of launcher is changed, i.e. whenever you launch it using alt+space |
Its a simple solution, whenever the launcher visibility changes, query and set the accentcolor |
Something like this would have greatly simplified the code, but afaik its uwp only: https://docs.microsoft.com/en-us/windows/uwp/data-binding/function-bindings |
@AnuthaDev I have created an issue for this. Let's move this discussion to #4107. |
@somil55 Bro you disabled cleartype with this🙄. Don't change the opacity of colors to change the color value. The alpha channel should always be FF. |
@AnuthaDev Please look at #4119 for any color-related settings for this PR. |
Summary of the Pull Request
Added support for light, dark and high contrast themes in PowerToys run
References
PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed
Manually validated that theme is changed when toggled between dark, light, high contrast 1, high contrast 2, high contrast black and high contrast white modes.
Know Issues
Dark Theme
High contrastTheme
LightTheme