Skip to content

Added ConfigurableEffect base class for configurable effects - #2371

Merged
cameronwhite merged 3 commits into
PintaProject:masterfrom
Lehonti:refactor/configurable_effect
Nov 7, 2026
Merged

cameronwhite merged 3 commits into
PintaProject:masterfrom
Lehonti:refactor/configurable_effect

Conversation

@Lehonti

@Lehonti Lehonti commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Follow-up on #2327.

Almost all configurable effects in Pinta override IsConfigurable => true and launch SimpleEffectDialog as their configuration UI.

This change adds a ConfigurableEffect base class that sets IsConfigurable => true and launches the simple effect dialog by default in LaunchConfiguration (ILivePreviewSession).

Also, BrightnessContrastEffect is updated to inherit from it and serve as a sample of how it would work. Once the remaining configurable effects are migrated, the parameterless LaunchConfiguration overload on BaseEffect can be removed.

And I am considering that later we could pattern-match instead of checking the IsConfigurable property, for better type safety.

@cameronwhite

Copy link
Copy Markdown
Member

Looks good to me 👍 My only suggestion would be adding some brief doc comments to the class since this will be used for add-ins

@Lehonti

Lehonti commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

@cameronwhite I added a short description explaining the default mechanism

Added XML documentation for the ConfigurableEffect class.
@cameronwhite
cameronwhite merged commit ba7918b into PintaProject:master Nov 7, 2026
7 of 8 checks passed
@Lehonti
Lehonti deleted the refactor/configurable_effect branch November 7, 2026 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants