Finishing filters: Vignette, Bloom / Glow, Tonal Contrast (12.9a)
This commit is contained in:
1 parent
96ce546508
commit
fdb62978c5
20 files changed
+756
-35
No files matched your search
@@ -105,6 +105,8 @@ QString ColorPickerTarget::title() const
|
||||
return highlights ? QStringLiteral("Color Picker (Gradient Map Highlights)") : QStringLiteral("Color Picker (Gradient Map Shadows)");
|
||||
if (kind == Kind::effect)
|
||||
return QStringLiteral("Color Picker (%1 Color)").arg(rawValue(effect));
|
||||
if (kind == Kind::vignette)
|
||||
return QStringLiteral("Color Picker (Vignette Color)");
|
||||
return background ? QStringLiteral("Color Picker (Background Color)") : QStringLiteral("Color Picker (Foreground Color)");
|
||||
}
|
||||
|
||||
@@ -241,6 +243,8 @@ void EditorSession::closeColorPicker(bool commit)
|
||||
} else if (picker.target.kind == ColorPickerTarget::Kind::gradientMap) {
|
||||
// The end previewed the working colour; Cancel puts it back.
|
||||
setGradientMapColor(commit ? color : picker.original, picker.target.highlights);
|
||||
} else if (picker.target.kind == ColorPickerTarget::Kind::vignette) {
|
||||
setVignetteColor(commit ? color : picker.original);
|
||||
} else if (picker.target.kind == ColorPickerTarget::Kind::effect) {
|
||||
const PaletteColor chosen = commit ? color : picker.original;
|
||||
changeEffects([&](LayerEffects &effects) { effects.setColor(chosen, picker.target.effect); });
|
||||
@@ -258,6 +262,16 @@ void EditorSession::openGradientMapColorPicker(bool highlights)
|
||||
notify();
|
||||
}
|
||||
|
||||
void EditorSession::openVignetteColorPicker()
|
||||
{
|
||||
// A commit keeps the project busy: no `committing` term.
|
||||
if (!canEditPalette() || m_colorPicker || !m_filterEdit || m_filterEdit->kind != FilterKind::vignette)
|
||||
return;
|
||||
const AdjustmentColor value = m_filterEdit->settings.vignetteColor;
|
||||
m_colorPicker = ColorPickerState({ColorPickerTarget::Kind::vignette}, PaletteColor{value.red, value.green, value.blue});
|
||||
notify();
|
||||
}
|
||||
|
||||
void EditorSession::openEffectColorPicker(LayerEffectKind kind)
|
||||
{
|
||||
if (!canEditPalette() || m_colorPicker || !m_effectsEditing)
|
||||
@@ -281,6 +295,22 @@ void EditorSession::previewGradientMapColor()
|
||||
setGradientMapColor(m_colorPicker->color(), m_colorPicker->target.highlights);
|
||||
}
|
||||
|
||||
void EditorSession::previewVignetteColor()
|
||||
{
|
||||
if (m_colorPicker && m_colorPicker->target.kind == ColorPickerTarget::Kind::vignette)
|
||||
setVignetteColor(m_colorPicker->color());
|
||||
}
|
||||
|
||||
// Its picker lives only while its Vignette edit is open.
|
||||
void EditorSession::setVignetteColor(const PaletteColor &color)
|
||||
{
|
||||
FilterSettings settings = m_filterEdit.value().settings;
|
||||
settings.vignetteColor = AdjustmentColor(color);
|
||||
if (settings == m_filterEdit->settings)
|
||||
return;
|
||||
updateFilter(settings, m_filterEdit->preview);
|
||||
}
|
||||
|
||||
void EditorSession::setGradientMapColor(const PaletteColor &color, bool highlights)
|
||||
{
|
||||
// An adjustment's editor can close under its picker (9.5c).
|
||||
|
||||
Reference in new issue
Block a user