mirror of
https://github.com/cyanfish/naps2.git
synced 2024-09-11 15:26:55 +03:00
28 lines
932 B
C#
28 lines
932 B
C#
using Eto.Drawing;
|
|
using NAPS2.EtoForms.Widgets;
|
|
|
|
namespace NAPS2.EtoForms.Ui;
|
|
|
|
public class HueSatForm : UnaryImageFormBase
|
|
{
|
|
private readonly SliderWithTextBox _hueSlider = new();
|
|
private readonly SliderWithTextBox _saturationSlider = new();
|
|
|
|
public HueSatForm(Naps2Config config, UiImageList imageList, ThumbnailController thumbnailController,
|
|
IIconProvider iconProvider) :
|
|
base(config, imageList, thumbnailController)
|
|
{
|
|
Icon = new Icon(1f, Icons.color_management.ToEtoImage());
|
|
Title = UiStrings.HueSaturation;
|
|
|
|
_hueSlider.Icon = iconProvider.GetIcon("color_wheel");
|
|
_saturationSlider.Icon = iconProvider.GetIcon("color_gradient");
|
|
Sliders = [_hueSlider, _saturationSlider];
|
|
}
|
|
|
|
protected override List<Transform> Transforms =>
|
|
[
|
|
new HueTransform(_hueSlider.IntValue),
|
|
new SaturationTransform(_saturationSlider.IntValue)
|
|
];
|
|
} |