mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 19:57:57 +01:00
[Image Resizer] Add settings button (#13773)
* Add deeplink * Update InputPage.xaml Co-authored-by: Laute <Niels.Laute@philips.com>
This commit is contained in:
@@ -8,6 +8,7 @@ using ImageResizer.Helpers;
|
||||
using ImageResizer.Models;
|
||||
using ImageResizer.Properties;
|
||||
using ImageResizer.Views;
|
||||
using Microsoft.PowerToys.Common.UI;
|
||||
|
||||
namespace ImageResizer.ViewModels
|
||||
{
|
||||
@@ -35,6 +36,7 @@ namespace ImageResizer.ViewModels
|
||||
|
||||
ResizeCommand = new RelayCommand(Resize);
|
||||
CancelCommand = new RelayCommand(Cancel);
|
||||
OpenSettingsCommand = new RelayCommand(OpenSettings);
|
||||
}
|
||||
|
||||
public Settings Settings { get; }
|
||||
@@ -43,6 +45,8 @@ namespace ImageResizer.ViewModels
|
||||
|
||||
public ICommand CancelCommand { get; }
|
||||
|
||||
public ICommand OpenSettingsCommand { get; }
|
||||
|
||||
public bool TryingToResizeGifFiles
|
||||
{
|
||||
get
|
||||
@@ -58,6 +62,11 @@ namespace ImageResizer.ViewModels
|
||||
_mainViewModel.CurrentPage = new ProgressViewModel(_batch, _mainViewModel, _mainView);
|
||||
}
|
||||
|
||||
public static void OpenSettings()
|
||||
{
|
||||
SettingsDeepLink.OpenSettings(SettingsDeepLink.SettingsWindow.ImageResizer);
|
||||
}
|
||||
|
||||
public void Cancel()
|
||||
=> _mainView.Close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user