mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 10:46:33 +02:00
Somil55/merge wpf to master (#3840)
* Basic WPF searchbox working * Updated key navigation and removed coldstart for searhbox * refactored and added code back in commented * Removed XAML Island references * Basic searchbox+listview working * Getting a bit more back * got color there * Result list bit better now * Added image loader for WPF Image * Partially got the context menus rendering again * adjusting coldstart to load, control will load with main form * getting context menus back * mouse over works now * Click now works, started to remove Win.XAML references * being a bit more forcusful on focus * Shadow text is not aligned * fixing focus if listbox was used * small tweak to fix shadow text * inputs don't work but gotta figure out why. commenting out * preview text * adding back in delay * fixed height issue * Applied the correct context button styles * Created custom ItemContainerStyle to fix the blue highlights behind the command buttons * Applied the correct highlight / mouseover styling * Removed vertical scrollbar in listview * fixed for alt-space prompt * Fixed right click focus issue * Somil55/wpf modifier keys (#3378) * Removed DPI change as it was not required * Global key hooks for context menu items * Updated Key for shell, folder and indexer plugin * Updated key mapping for indexer plugin * Somil55/wpf context menu selection (#3389) * Removed DPI change as it was not required * Global key hooks for context menu items * Updated Key for shell, folder and indexer plugin * Updated key mapping for indexer plugin * Add trigger to selection on tabbing * Minor shadow adjustments so its more similiar to default shell shadow. Added intro/outro animations * Added UWP-like scrollbar style for the results list * Fixed formating and naming * Removed Powerlauncher UI project * Update PowerToys.sln * Commented out scrollbar and fade in/out animations * Added missing features from UWP branch * Fixed formatting for Product.wxs * Add dragging to WPF window Co-authored-by: Clint Rutkas <clint@rutkas.com> Co-authored-by: Niels Laute <niels.laute@live.nl>
This commit is contained in:
committed by
GitHub
parent
5680a34ec1
commit
397b1533f0
@@ -14,8 +14,8 @@ namespace Wox.ViewModel
|
||||
public string Glyph { get; set; }
|
||||
public string FontFamily { get; set; }
|
||||
public ICommand Command { get; set; }
|
||||
public string AcceleratorKey { get; set; }
|
||||
public string AcceleratorModifiers { get; set; }
|
||||
public Key AcceleratorKey { get; set; }
|
||||
public ModifierKeys AcceleratorModifiers { get; set; }
|
||||
public bool IsAcceleratorKeyEnabled { get; set; }
|
||||
|
||||
public void SendTelemetryEvent(LauncherResultActionEvent.TriggerType triggerType)
|
||||
|
||||
@@ -17,10 +17,10 @@ using Wox.Infrastructure.Hotkey;
|
||||
using Wox.Infrastructure.Storage;
|
||||
using Wox.Infrastructure.UserSettings;
|
||||
using Wox.Plugin;
|
||||
using Microsoft.PowerLauncher.Telemetry;
|
||||
using Microsoft.PowerLauncher.Telemetry;
|
||||
using Wox.Storage;
|
||||
using Microsoft.PowerToys.Telemetry;
|
||||
|
||||
using Microsoft.PowerToys.Telemetry;
|
||||
|
||||
namespace Wox.ViewModel
|
||||
{
|
||||
public class MainViewModel : BaseModel, ISavable
|
||||
@@ -305,18 +305,19 @@ namespace Wox.ViewModel
|
||||
|
||||
public Visibility ProgressBarVisibility { get; set; }
|
||||
|
||||
private Visibility _visibility = Visibility.Collapsed;
|
||||
public Visibility MainWindowVisibility {
|
||||
private Visibility _visibility;
|
||||
|
||||
public Visibility MainWindowVisibility {
|
||||
get { return _visibility; }
|
||||
set {
|
||||
set {
|
||||
_visibility = value;
|
||||
if(value == Visibility.Visible)
|
||||
{
|
||||
PowerToysTelemetry.Log.WriteEvent(new LauncherShowEvent());
|
||||
if(value == Visibility.Visible)
|
||||
{
|
||||
PowerToysTelemetry.Log.WriteEvent(new LauncherShowEvent());
|
||||
}
|
||||
else
|
||||
{
|
||||
PowerToysTelemetry.Log.WriteEvent(new LauncherHideEvent());
|
||||
else
|
||||
{
|
||||
PowerToysTelemetry.Log.WriteEvent(new LauncherHideEvent());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -457,7 +458,7 @@ namespace Wox.ViewModel
|
||||
|
||||
queryTimer.Stop();
|
||||
var queryEvent = new LauncherQueryEvent()
|
||||
{
|
||||
{
|
||||
QueryTimeMs = queryTimer.ElapsedMilliseconds,
|
||||
NumResults = Results.Results.Count,
|
||||
QueryLength = query.RawQuery.Length
|
||||
@@ -686,6 +687,22 @@ namespace Wox.ViewModel
|
||||
};
|
||||
}
|
||||
|
||||
public void HandleContextMenu(Key AcceleratorKey, ModifierKeys AcceleratorModifiers)
|
||||
{
|
||||
var results = SelectedResults;
|
||||
if (results.SelectedItem != null)
|
||||
{
|
||||
foreach (ContextMenuItemViewModel contextMenuItems in results.SelectedItem.ContextMenuItems)
|
||||
{
|
||||
if (contextMenuItems.AcceleratorKey == AcceleratorKey && contextMenuItems.AcceleratorModifiers == AcceleratorModifiers)
|
||||
{
|
||||
MainWindowVisibility = Visibility.Collapsed;
|
||||
contextMenuItems.Command.Execute(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
using Wox.Plugin;
|
||||
using Wox.Core.Resource;
|
||||
using Wox.Infrastructure.Image;
|
||||
using Windows.UI.Xaml.Media;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace Wox.ViewModel
|
||||
{
|
||||
|
||||
@@ -4,13 +4,13 @@ using System.Collections.ObjectModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Windows.Controls.Ribbon;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using Wox.Core.Plugin;
|
||||
using Wox.Infrastructure;
|
||||
using Wox.Infrastructure.Hotkey;
|
||||
using Wox.Infrastructure.Image;
|
||||
using Wox.Infrastructure.Logger;
|
||||
using Wox.Plugin;
|
||||
using Windows.UI.Xaml.Media;
|
||||
|
||||
|
||||
namespace Wox.ViewModel
|
||||
@@ -65,7 +65,6 @@ namespace Wox.ViewModel
|
||||
}
|
||||
public void ActivateContextButtons(ActivationType activationType)
|
||||
{
|
||||
|
||||
if (ContextMenuItems == null)
|
||||
{
|
||||
LoadContextMenu();
|
||||
|
||||
Reference in New Issue
Block a user