mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 19:57:57 +01:00
[PTRun]Fluent UX and switch to WpfUI (#28538)
* New design
* Updating icons
* Adding keywords
* Only show plugins when search query is empty
* Update App.xaml
* Update App.xaml
* Filter plugins
* Fix image name
* refresh plugins overview
* fix context menu icons in win10
* Remove unused animations
* Resolving crashing
* Fix focus visual and a11y
* Remove unused styles
* Revert "Remove unused styles"
This reverts commit 65f29ae6ed.
* Fix value generator light vs dark icon
* Fix tab characters
* Fix CI
* Update SettingsReader.cs
* Adding common OS check helper
* Update MainWindow.xaml.cs
* Fix background
* More tweaks
* XAML styler and updating legacy brushes
* Updates + xaml styling
* Fix CI
* Fix CI2
* fix font family and overview refresh
* Delete shutdown.light-1.png
* Updating icons
* Set DPI
---------
Co-authored-by: Davide Giacometti <davide.giacometti@outlook.it>
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
@@ -14,6 +15,7 @@ using System.Windows.Input;
|
||||
using System.Windows.Threading;
|
||||
using Common.UI;
|
||||
using interop;
|
||||
using Mages.Core.Runtime.Converters;
|
||||
using Microsoft.PowerLauncher.Telemetry;
|
||||
using Microsoft.PowerToys.Telemetry;
|
||||
using PowerLauncher.Helper;
|
||||
@@ -79,7 +81,6 @@ namespace PowerLauncher.ViewModel
|
||||
Results = new ResultsViewModel(_settings, this);
|
||||
History = new ResultsViewModel(_settings, this);
|
||||
_selectedResults = Results;
|
||||
|
||||
InitializeKeyCommands();
|
||||
RegisterResultsUpdatedEvent();
|
||||
}
|
||||
@@ -345,6 +346,15 @@ namespace PowerLauncher.ViewModel
|
||||
if (_queryText != value)
|
||||
{
|
||||
_queryText = value;
|
||||
if (string.IsNullOrEmpty(_queryText) || string.IsNullOrWhiteSpace(_queryText))
|
||||
{
|
||||
PluginsOverviewVisibility = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
PluginsOverviewVisibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
OnPropertyChanged(nameof(QueryText));
|
||||
}
|
||||
}
|
||||
@@ -1199,5 +1209,38 @@ namespace PowerLauncher.ViewModel
|
||||
action.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
public ObservableCollection<PluginPair> Plugins { get; } = new();
|
||||
|
||||
private Visibility _pluginsOverviewVisibility = Visibility.Visible;
|
||||
|
||||
public Visibility PluginsOverviewVisibility
|
||||
{
|
||||
get => _pluginsOverviewVisibility;
|
||||
|
||||
set
|
||||
{
|
||||
if (_pluginsOverviewVisibility != value)
|
||||
{
|
||||
_pluginsOverviewVisibility = value;
|
||||
OnPropertyChanged(nameof(PluginsOverviewVisibility));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void RefreshPluginsOverview()
|
||||
{
|
||||
Log.Info("Refresh plugins overview", GetType());
|
||||
|
||||
Application.Current.Dispatcher.Invoke(() =>
|
||||
{
|
||||
Plugins.Clear();
|
||||
|
||||
foreach (var p in PluginManager.AllPlugins.Where(a => a.IsPluginInitialized && !a.Metadata.Disabled && a.Metadata.ActionKeyword != string.Empty))
|
||||
{
|
||||
Plugins.Add(p);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user