mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-28 19:57:05 -06:00
#962: Inner Glow's Source is a Center/Edge dropdown
The effect dialog showed Inner Glow's `source` as a text field, so the only way to pick Center was to type the parameter value. It now lists Center and Edge like the other fields that pick one of a few values. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
4eaf5e7b50
commit
9216c47204
+1
-1
File diff suppressed because one or more lines are too long
@@ -269,7 +269,7 @@ pub fn effect_catalog() -> Vec<EffectInfo> {
|
||||
"stylize.innerGlow",
|
||||
"Inner Glow…",
|
||||
STYLIZE,
|
||||
"{mode: blend mode (\"screen\"), opacity: % (75), blur: pt (5), color: \"#rrggbb\" (\"#ffffff\"), source: \"edge\"|\"center\"}",
|
||||
"{mode: blend mode (\"screen\"), opacity: % (75), blur: pt (5), color: \"#rrggbb\" (\"#ffffff\"), source: \"center\"|\"edge\" (\"edge\")}",
|
||||
json!({"mode": "screen", "opacity": 75.0, "blur": 5.0, "color": "#ffffff", "source": "edge"}),
|
||||
),
|
||||
r(
|
||||
|
||||
@@ -165,6 +165,7 @@ fn choices(effect: &str, key: &str) -> Option<form::Choices> {
|
||||
("texture.texturizer", "lightDirection") => Some(&vectorcraft_effects::pixel::LIGHT_DIRECTIONS),
|
||||
("video.deinterlace", "eliminate") => Some(&[("Odd Fields", "odd"), ("Even Fields", "even")]),
|
||||
("video.deinterlace", "create") => Some(&[("Duplication", "duplication"), ("Interpolation", "interpolation")]),
|
||||
("stylize.innerGlow", "source") => Some(&[("Center", "center"), ("Edge", "edge")]),
|
||||
("path.offsetPath", "joins") => Some(&[("Miter", "miter"), ("Round", "round"), ("Bevel", "bevel")]),
|
||||
("distort.roughen" | "distort.zigZag", "points") => Some(&[("Smooth", "smooth"), ("Corner", "corner")]),
|
||||
_ => None,
|
||||
@@ -418,7 +419,9 @@ mod tests {
|
||||
#[test]
|
||||
fn fields_that_pick_a_value_are_dropdowns_of_its_values() {
|
||||
// The values come from the effect's parameter documentation (`joins: "miter"|"round"|…`).
|
||||
for (effect, key) in [("path.offsetPath", "joins"), ("distort.zigZag", "points"), ("distort.roughen", "points")] {
|
||||
for (effect, key) in
|
||||
[("path.offsetPath", "joins"), ("distort.zigZag", "points"), ("distort.roughen", "points"), ("stylize.innerGlow", "source")]
|
||||
{
|
||||
let doc = vectorcraft_effects::effect_info(effect).unwrap().params;
|
||||
let listed = doc.split(&format!("{key}: ")).nth(1).unwrap().split([',', '}', ' ']).next().unwrap().to_string();
|
||||
let values: Vec<String> = choices(effect, key).unwrap().iter().map(|(_, v)| format!("\"{v}\"")).collect();
|
||||
|
||||
@@ -3974,3 +3974,4 @@ axis Both Ambos
|
||||
Top Left Arriba a la izquierda
|
||||
Top Right Arriba a la derecha
|
||||
Bottom Right Abajo a la derecha
|
||||
Edge Borde
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -3986,3 +3986,4 @@ axis Both Les deux
|
||||
Top Right En haut à droite
|
||||
Bottom Right En bas à droite
|
||||
effect Soft Doux
|
||||
Edge Bord
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -3976,3 +3976,4 @@ axis Both Entrambi
|
||||
Bottom Right In basso a destra
|
||||
effect Soft Morbido
|
||||
effect Regular Normale
|
||||
Edge Bordo
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -3969,3 +3969,4 @@ theme Appearance 外観
|
||||
effect Soft ソフト
|
||||
effect Horizontal 水平
|
||||
effect Vertical 垂直
|
||||
Edge エッジ
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -3972,3 +3972,4 @@ axis Both Оба
|
||||
Top Left Сверху слева
|
||||
Top Right Сверху справа
|
||||
Bottom Right Снизу справа
|
||||
Edge Край
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -3957,3 +3957,4 @@ axis Both Обидві
|
||||
Top Left Вгорі ліворуч
|
||||
Top Right Вгорі праворуч
|
||||
Bottom Right Знизу праворуч
|
||||
Edge Край
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 659 and column 40.
|
@@ -3605,3 +3605,4 @@ axis Both 两者
|
||||
effect Soft 柔和
|
||||
effect Horizontal 水平
|
||||
effect Vertical 垂直
|
||||
Edge 边缘
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -3386,3 +3386,4 @@ axis Both 兩者
|
||||
Top Right 右上
|
||||
Bottom Right 右下
|
||||
effect Soft 柔和
|
||||
Edge 邊緣
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
Reference in New Issue
Block a user