mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-20 13:39:39 +01:00
[MouseJump]Reduce winforms dependency, thumbnail size settings, shortcut keys(#25487)
* [Mouse Jump] - reorganise existing NativeMethods (#25482) * Mouse Jump] - reorganise Helper classes / main form code (#25482) * Mouse Jump] - replace use of System.Windows.Forms.Screen with Native Methods (#25482) * Mouse Jump] - replace use of System.Windows.Forms.SystemInformation with Native Methods (#25482) * [Mouse Jump] - replace use of System.Windows.Forms.Cursor with Native Methods (#25482) * [Mouse Jump] - improve popup responsiveness (#25484) * [Mouse Jump] - fixed spellchecker errors (#25484) * [Mouse Jump] - add settings card for thumbnail size (#24564) * [Mouse Jump] - shortcut keys to jump to centres of screens (#25069) * [Mouse Jump] - fix spelling (#25069) * [Mouse Jump] - fix spelling - numpad (#25069) * [Mouse Jump] - updated "thumbnail size" settings text (#24564)
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
using global::PowerToys.GPOWrapper;
|
||||
using Microsoft.PowerToys.Settings.UI.Library;
|
||||
@@ -86,6 +87,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
}
|
||||
|
||||
MouseJumpSettingsConfig = mouseJumpSettingsRepository.SettingsConfig;
|
||||
MouseJumpSettingsConfig.Properties.ThumbnailSize.PropertyChanged += MouseJumpThumbnailSizePropertyChanged;
|
||||
|
||||
if (mousePointerCrosshairsSettingsRepository == null)
|
||||
{
|
||||
@@ -599,6 +601,29 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
public MouseJumpThumbnailSize MouseJumpThumbnailSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return MouseJumpSettingsConfig.Properties.ThumbnailSize;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if ((MouseJumpSettingsConfig.Properties.ThumbnailSize.Width != value?.Width)
|
||||
&& (MouseJumpSettingsConfig.Properties.ThumbnailSize.Height != value?.Height))
|
||||
{
|
||||
MouseJumpSettingsConfig.Properties.ThumbnailSize = value;
|
||||
NotifyMouseJumpPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void MouseJumpThumbnailSizePropertyChanged(object sender, PropertyChangedEventArgs e)
|
||||
{
|
||||
NotifyMouseJumpPropertyChanged(nameof(MouseJumpThumbnailSize));
|
||||
}
|
||||
|
||||
public void NotifyMouseJumpPropertyChanged([CallerMemberName] string propertyName = null)
|
||||
{
|
||||
OnPropertyChanged(propertyName);
|
||||
|
||||
Reference in New Issue
Block a user