ZoomIt smooth image zooming (#42200)

Added smooth image option that results in GDI+ image smoothing for
static zoom and Magnifier API image smoothing for live zoom.

---------

Co-authored-by: Mark Russinovich <markruss@ntdev.microsoft.com>
Co-authored-by: Clint Rutkas <clint@rutkas.com>
Co-authored-by: Niels Laute <niels.laute@live.nl>
This commit is contained in:
Mark Russinovich
2025-10-07 11:20:00 -07:00
committed by GitHub
parent 14ff4dbc8c
commit e04e6a11d1
10 changed files with 159 additions and 73 deletions

View File

@@ -81,6 +81,8 @@ namespace Microsoft.PowerToys.Settings.UI.Library
[JsonPropertyName("AnimnateZoom")]
public BoolProperty AnimateZoom { get; set; }
public BoolProperty SmoothImage { get; set; }
public IntProperty ZoominSliderLevel { get; set; }
public IntProperty RecordScaling { get; set; }

View File

@@ -54,6 +54,9 @@
<tkcontrols:SettingsCard Name="ZoomItToggleAnimateZoom" x:Uid="ZoomIt_Toggle_AnimateZoom">
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.AnimateZoom, Mode=TwoWay}" />
</tkcontrols:SettingsCard>
<tkcontrols:SettingsCard Name="ZoomItSmoothZoomedImage" x:Uid="ZoomIt_Toggle_SmoothZoomedImage">
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.SmoothImage, Mode=TwoWay}" />
</tkcontrols:SettingsCard>
<tkcontrols:SettingsCard Name="ZoomItSliderInitialMagnification" x:Uid="ZoomIt_Slider_InitialMagnification">
<Slider
MinWidth="{StaticResource SettingActionControlMinWidth}"

View File

@@ -4662,6 +4662,9 @@ Copy a zoomed screen with Ctrl+C or save it by typing Ctrl+S. Crop the copy or s
<data name="ZoomIt_Toggle_AnimateZoom.Header" xml:space="preserve">
<value>Animate zoom in and zoom out</value>
</data>
<data name="ZoomIt_Toggle_SmoothZoomedImage.Header" xml:space="preserve">
<value>Smooth zoomed image</value>
</data>
<data name="ZoomIt_Slider_InitialMagnification.Header" xml:space="preserve">
<value>Specify the initial level of magnification when zooming in</value>
</data>

View File

@@ -197,6 +197,20 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
}
}
public bool SmoothImage
{
get => _zoomItSettings.Properties.SmoothImage.Value;
set
{
if (_zoomItSettings.Properties.SmoothImage.Value != value)
{
_zoomItSettings.Properties.SmoothImage.Value = value;
OnPropertyChanged(nameof(SmoothImage));
NotifySettingsChanged();
}
}
}
public int ZoominSliderLevel
{
get => _zoomItSettings.Properties.ZoominSliderLevel.Value;