Fix #4953: the Gradient panel's freeform point swatch opens the point's popover

This commit is contained in:
bflatastic
2026-11-01 01:39:08 +07:00
parent 6caa2f74ef
commit 14c4616202
29 changed files with 66 additions and 30 deletions
+1 -1
View File
@@ -906,7 +906,7 @@ font-technology Variable Променливи
Edit Symbol Редактиране на символ
Edit Text Редактиране на текст
Edit the applied effect, or add another one? Да се редактира ли приведеният ефект или да се добави друг?
Edit the selected point's colour in the Color panel Редактиране на цвета на избраната точка в панела Цвят
Edit the point Редактиране на точката
Edit the stop Редактиране на опорната точка
Edit Theme Редактиране на тема
Edit theme Редактиране на тема
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1 -1
View File
@@ -1516,7 +1516,7 @@ lighting Light Svjetlo
Color: Boja:
Delete Stop Izbriši tačku
Edit Gradient Uredi gradijent
Edit the selected point's colour in the Color panel Uredite boju odabrane tačke u panelu Boja
Edit the point Uredi tačku
Edit the stop Uredi tačku
Eyedropper: click the art to sample the stop's colour Kapaljka: kliknite crtež da uzmete uzorak boje tačke
Eyedropper: click the art to sample the key color Kapaljka: kliknite crtež da uzmete uzorak ključne boje
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1 -1
View File
@@ -1309,7 +1309,7 @@
Edit Symbol Edita el símbol
Edit Text Edita el text
Edit the applied effect, or add another one? Vols editar l’efecte aplicat o afegir-ne un altre?
Edit the selected point's colour in the Color panel Edita el color del punt seleccionat al panell Color
Edit the point Edita el punt
Edit the stop Edita la parada
Edit Theme Edita el tema
Edit theme Edita el tema
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1 -1
View File
@@ -1539,7 +1539,7 @@ lighting Light Světlo
Color: Barva:
Delete Stop Odstranit zarážku
Edit Gradient Upravit přechod
Edit the selected point's colour in the Color panel Upravit barvu vybraného bodu v panelu Barva
Edit the point Upravit bod
Edit the stop Upravit zarážku
Eyedropper: click the art to sample the stop's colour Kapátko: kliknutím na kresbu naberete barvu zarážky
Eyedropper: click the art to sample the key color Kapátko: kliknutím na kresbu naberete klíčovou barvu
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1 -1
View File
@@ -1453,7 +1453,7 @@ lighting Light Lys
Color: Farve:
Delete Stop Slet stop
Edit Gradient Redigér gradient
Edit the selected point's colour in the Color panel Redigér det markerede punkts farve i farvepanelet
Edit the point Redigér punktet
Edit the stop Redigér stoppet
Eyedropper: click the art to sample the stop's colour Pipette: klik på grafikken for at prøvetage stoppets farve
Eyedropper: click the art to sample the key color Pipette: klik på grafikken for at prøvetage nøglefarven
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1 -1
View File
@@ -900,7 +900,7 @@ font-technology Variable Variabel
Edit Symbol Symbol bearbeiten
Edit Text Text bearbeiten
Edit the applied effect, or add another one? Den angewendeten Effekt bearbeiten oder einen weiteren hinzufügen?
Edit the selected point's colour in the Color panel Die Farbe des ausgewählten Punkts im Bedienfeld „Farbe“ bearbeiten
Edit the point Punkt bearbeiten
Edit the stop Farbstopp bearbeiten
Edit Theme Thema bearbeiten
Edit theme Thema bearbeiten
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1 -1
View File
@@ -876,7 +876,7 @@ font-technology Variable Μεταβλητές
Edit Symbol Επεξεργασία συμβόλου
Edit Text Επεξεργασία κειμένου
Edit the applied effect, or add another one? Επεξεργασία του εφαρμοσμένου εφέ ή προσθήκη άλλου;
Edit the selected point's colour in the Color panel Επεξεργασία του χρώματος επιλεγμένου σημείου στον πίνακα Χρώμα
Edit the point Επεξεργασία σημείου
Edit the stop Επεξεργασία σημείου ντεγκραντέ
Edit Theme Επεξεργασία θέματος
Edit theme Επεξεργασία θέματος
Can't render this file because it contains an unexpected character in line 164 and column 5.
+1 -1
View File
@@ -921,7 +921,7 @@ font-technology Variable Variables
Edit Symbol Editar símbolo
Edit Text Editar texto
Edit the applied effect, or add another one? ¿Editar el efecto aplicado o agregar otro?
Edit the selected point's colour in the Color panel Edita el color del punto seleccionado en el panel Color
Edit the point Editar el punto
Edit the stop Editar la parada
Edit Theme Editar tema
Edit theme Editar tema
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1 -1
View File
@@ -1513,7 +1513,7 @@ lighting Light Valo
Color: Väri:
Delete Stop Poista väripiste
Edit Gradient Muokkaa liukuväriä
Edit the selected point's colour in the Color panel Muokkaa valitun pisteen väriä Väri-paneelissa
Edit the point Muokkaa pistettä
Edit the stop Muokkaa väripistettä
Eyedropper: click the art to sample the stop's colour Pipetti: ota väripisteen väri näytteeksi napsauttamalla kuvitusta
Eyedropper: click the art to sample the key color Pipetti: ota avainväri näytteeksi napsauttamalla kuvitusta
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1 -1
View File
@@ -924,7 +924,7 @@ font-technology Variable Variables
Edit Symbol Modifier le symbole
Edit Text Modifier le texte
Edit the applied effect, or add another one? Modifier l’effet appliqué ou en ajouter un autre ?
Edit the selected point's colour in the Color panel Modifier la couleur du point sélectionné dans le panneau Couleur
Edit the point Modifier le point
Edit the stop Modifier l’étape de dégradé
Edit Theme Modifier le thème
Edit theme Modifier le thème
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1 -1
View File
@@ -1189,7 +1189,7 @@ font-technology Variable Változó
Edit Symbol Szimbólum szerkesztése
Edit Text Szöveg szerkesztése
Edit the applied effect, or add another one? Szerkeszted az alkalmazott effektust, vagy újat adsz hozzá?
Edit the selected point's colour in the Color panel A kijelölt pont színe a Szín panelen szerkeszthető
Edit the point Pont szerkesztése
Edit the stop Színátmenet-pont szerkesztése
Edit Theme Téma szerkesztése
Edit theme Téma szerkesztése
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1 -1
View File
@@ -1453,7 +1453,7 @@ lighting Light Cahaya
Color: Warna:
Delete Stop Hapus stop
Edit Gradient Edit gradien
Edit the selected point's colour in the Color panel Edit warna titik terpilih di panel Warna
Edit the point Edit titik
Edit the stop Edit stop
Eyedropper: click the art to sample the stop's colour Pipet: klik karya seni untuk mengambil sampel warna stop
Eyedropper: click the art to sample the key color Pipet: klik karya seni untuk mengambil sampel warna kunci
1 # Indonesian (id) catalog. Same format as zh-hant.tsv: context <TAB> source <TAB> translation
1453
1454
1455
1456
1457
1458
1459
+1 -1
View File
@@ -921,7 +921,7 @@ font-technology Variable Variabili
Edit Symbol Modifica simbolo
Edit Text Modifica testo
Edit the applied effect, or add another one? Modificare l'effetto applicato o aggiungerne un altro?
Edit the selected point's colour in the Color panel Modifica il colore del punto selezionato nel pannello Colore
Edit the point Modifica il punto
Edit the stop Modifica il cursore colore
Edit Theme Modifica tema
Edit theme Modifica tema
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1 -1
View File
@@ -1420,7 +1420,7 @@ font-technology Variable バリアブル
Edit or Apply Color Group… カラーグループを編集または適用…
Edit or Apply Colors カラーを編集/適用
Edit the applied effect, or add another one? 適用済みの効果を編集しますか? それとも別の効果を追加しますか?
Edit the selected point's colour in the Color panel 選択したポイントのカラーをカラーパネルで編集
Edit the point ポイントを編集
Edit the stop 分岐点を編集
Edit theme テーマを編集
Edit… 編集…
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1 -1
View File
@@ -1370,7 +1370,7 @@ lighting Light სინათლე
Color: ფერი:
Delete Stop გადასვლის წერტილის წაშლა
Edit Gradient გრადიენტის რედაქტირება
Edit the selected point's colour in the Color panel მონიშნული წერტილის ფერის რედაქტირება ფერის პანელში
Edit the point წერტილის რედაქტირება
Edit the stop გადასვლის წერტილის რედაქტირება
Eyedropper: click the art to sample the stop's colour პიპეტი: დაწკაპეთ ნახატზე გადასვლის წერტილის ფერის ასაღებად
Eyedropper: click the art to sample the key color პიპეტი: დაწკაპეთ ნახატზე საკვანძო ფერის ასაღებად
Can't render this file because it is too large.
+1 -1
View File
@@ -1411,7 +1411,7 @@ font-technology Variable 가변
Edit or Apply Color Group… 색상 그룹 편집 또는 적용…
Edit or Apply Colors 색상 편집 또는 적용
Edit the applied effect, or add another one? 적용된 효과를 편집하거나 다른 효과를 추가하시겠습니까?
Edit the selected point's colour in the Color panel 색상 패널에서 선택한 포인트의 색상 편집
Edit the point 포인트 편집
Edit the stop 정지점 편집
Edit theme 테마 편집
Edit… 편집…
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1 -1
View File
@@ -1467,7 +1467,7 @@ lighting Light Licht
Color: Kleur:
Delete Stop Stoppunt verwijderen
Edit Gradient Verloop bewerken
Edit the selected point's colour in the Color panel Bewerk de kleur van het geselecteerde punt in het Kleur-paneel
Edit the point Punt bewerken
Edit the stop Stoppunt bewerken
Eyedropper: click the art to sample the stop's colour Pipet: klik op de illustratie om de kleur van het stoppunt over te nemen
Eyedropper: click the art to sample the key color Pipet: klik op de illustratie om de sleutelkleur over te nemen
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1 -1
View File
@@ -1453,7 +1453,7 @@ lighting Light Światło
Color: Kolor:
Delete Stop Usuń punkt koloru
Edit Gradient Edytuj gradient
Edit the selected point's colour in the Color panel Edytuj kolor zaznaczonego punktu w panelu Kolor
Edit the point Edytuj punkt
Edit the stop Edytuj punkt koloru
Eyedropper: click the art to sample the stop's colour Kroplomierz: kliknij kompozycję, aby pobrać kolor punktu
Eyedropper: click the art to sample the key color Kroplomierz: kliknij kompozycję, aby pobrać kolor kluczowy
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1 -1
View File
@@ -816,7 +816,7 @@
Edit or Apply Color Group… Editar ou Aplicar Grupo de Cores…
Edit or Apply Colors Editar ou Aplicar Cores
Edit the applied effect, or add another one? Editar o efeito aplicado, ou adicionar outro?
Edit the selected point's colour in the Color panel Edite a cor do ponto selecionado no painel Cor
Edit the point Editar o ponto
Edit the stop Editar a parada
Edit theme Editar tema
Edit… Editar…
Can't render this file because it contains an unexpected character in line 6 and column 47.
+1 -1
View File
@@ -919,7 +919,7 @@ font-technology Variable Вариативные
Edit Symbol Редактировать символ
Edit Text Редактировать текст
Edit the applied effect, or add another one? Редактировать применённый эффект или добавить другой?
Edit the selected point's colour in the Color panel Редактируйте цвет выбранной точки на панели «Цвет»
Edit the point Редактировать точку
Edit the stop Редактировать точку перехода
Edit Theme Редактировать тему
Edit theme Редактировать тему
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1 -1
View File
@@ -908,7 +908,7 @@ font-technology Variable Variabla
Edit Symbol Redigera symbol
Edit Text Redigera text
Edit the applied effect, or add another one? Vill du redigera den använda effekten eller lägga till en till?
Edit the selected point's colour in the Color panel Redigera den markerade punktens färg i panelen Färg
Edit the point Redigera punkten
Edit the stop Redigera stoppet
Edit Theme Redigera tema
Edit theme Redigera tema
Can't render this file because it contains an unexpected character in line 5 and column 25.
+1 -1
View File
@@ -900,7 +900,7 @@ font-technology Variable Değişken
Edit Symbol Sembolü Düzenle
Edit Text Metni Düzenle
Edit the applied effect, or add another one? Uygulanan efekti düzenlemek veya başka bir efekt eklemek mi istiyorsunuz?
Edit the selected point's colour in the Color panel Seçilen noktanın rengini Renk panelinde düzenleyin
Edit the point Noktayı düzenle
Edit the stop Durağı düzenle
Edit Theme Temayı Düzenle
Edit theme Temayı düzenle
Can't render this file because it contains an unexpected character in line 5 and column 25.
+1 -1
View File
@@ -915,7 +915,7 @@ font-technology Variable Варіативні
Edit Symbol Редагувати символ
Edit Text Редагувати текст
Edit the applied effect, or add another one? Редагувати застосований ефект або додати інший?
Edit the selected point's colour in the Color panel Редагуйте колір вибраної точки на панелі «Колір»
Edit the point Редагувати точку
Edit the stop Редагувати точку переходу
Edit Theme Редагувати тему
Edit theme Редагувати тему
Can't render this file because it contains an unexpected character in line 178 and column 5.
+1 -1
View File
@@ -1071,7 +1071,7 @@ font-technology Variable Biến thiên
Edit Symbol Chỉnh sửa ký hiệu
Edit Text Chỉnh sửa văn bản
Edit the applied effect, or add another one? Chỉnh sửa hiệu ứng đã áp dụng, hay thêm hiệu ứng mới?
Edit the selected point's colour in the Color panel Chỉnh sửa màu của điểm đã chọn trong bảng Màu
Edit the point Chỉnh sửa điểm
Edit the stop Chỉnh sửa điểm dừng
Edit Theme Chỉnh sửa bộ màu
Edit theme Chỉnh sửa bộ màu
Can't render this file because it contains an unexpected character in line 200 and column 5.
+1 -1
View File
@@ -861,7 +861,7 @@
Edit Symbol 编辑符号
Edit Text 编辑文字
Edit the applied effect, or add another one? 编辑已应用的效果,还是再添加一个?
Edit the selected point's colour in the Color panel 在颜色面板中编辑所选点的颜色
Edit the point 编辑点
Edit the stop 编辑色标
Edit Theme 编辑主题
Edit theme 编辑主题
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1 -1
View File
@@ -883,7 +883,7 @@ font-technology Variable 可變
Edit Symbol 編輯符號
Edit Text 編輯文字
Edit the applied effect, or add another one? 要編輯已套用的效果,還是新增另一個?
Edit the selected point's colour in the Color panel 在顏色面板中編輯所選點的顏色
Edit the point 編輯點
Edit the stop 編輯色標
Edit Theme 編輯主題
Edit theme 編輯主題
Can't render this file because it contains an unexpected character in line 6 and column 47.
+13 -3
View File
@@ -18,7 +18,7 @@
//!
//! A freeform gradient shows its section instead of the angle, aspect and slider: the Draw
//! toggle (Points or Lines: how the Gradient tool adds points) and the selected point's colour
//! (edited in the Color panel), opacity and spread, with Delete Point.
//! (click: its popover, as a stop's), opacity and spread, with Delete Point.
//!
//! The Presets menu lists ready-made gradients by theme (the built-in gradient libraries), then
//! the gradients saved with the panel menu's Save Gradient Preset…; choosing one applies it to the
@@ -484,13 +484,18 @@ fn freeform_section(app: &mut VectorcraftApp, ui: &mut Ui, g: &GradientPaint) {
let point = sel.map(|i| f.points[i]);
ui.horizontal(|ui| {
widgets::dim_label(ui, tl!("Color:"));
let (r, resp) = ui.allocate_exact_size(vec2(18.0, 18.0), Sense::hover());
let (r, resp) = ui.allocate_exact_size(vec2(18.0, 18.0), Sense::click());
let paint = point.map_or(Paint::None, |p| Paint::solid(p.color));
widgets::swatch_tile(ui, r, &paint, false, resp.hovered());
resp.on_hover_text(tl!("Edit the selected point's colour in the Color panel"));
if let Some(p) = point {
widgets::dim_label(ui, &p.color.to_hex().to_uppercase());
}
// The selected point's popover, as a stop's swatch opens the stop's (#4953).
if let Some(i) = sel
&& resp.on_hover_text(tl!("Edit the point")).clicked()
{
show_popover(app, i, r.left_bottom() + vec2(0.0, 4.0));
}
});
ui.horizontal(|ui| {
ui.add_enabled_ui(sel.is_some(), |ui| {
@@ -640,6 +645,11 @@ pub(crate) fn stop_eyedropper(app: &mut VectorcraftApp) {
/// Open the stop popover for stop `i` at screen position `at`.
fn open_popover(app: &mut VectorcraftApp, i: usize, at: Pos2) {
select_stop(app, Some(i));
show_popover(app, i, at);
}
/// The popover for the selected stop or freeform point `i`, at screen position `at`.
fn show_popover(app: &mut VectorcraftApp, i: usize, at: Pos2) {
app.ui.dialog = Some(Dialog::new("gradientStop", json!({ "index": i, "screen": [at.x, at.y], "tab": "color" })));
}
@@ -543,6 +543,31 @@ fn double_clicking_a_stop_opens_the_shared_popover_beside_it() {
assert_eq!(app.session.selected_stop(), Some(1));
}
/// #4953: with a freeform point selected, clicking the Color swatch opens the popover for that
/// point, which recolours it and leaves the other points as they were.
#[test]
fn the_freeform_color_swatch_opens_the_points_popover() {
let mut app = app(json!({"gradient": {"kind": "freeform"}}));
app.run("paint.freeform.selectPoint", json!({"index": 1})).unwrap();
let mut p = Panel::new();
let texts = p.frame(&mut app, vec![], Modifiers::NONE);
let label = text_at(&texts, "Color:").unwrap_or_else(|| panic!("the Color row: {texts:?}"));
let swatch = p.widget_after(label);
p.click(&mut app, swatch.center());
let d = app.ui.dialog.clone().expect("the popover opened");
assert_eq!(
(d.kind.as_str(), &d.fields["index"], &d.fields["screen"]),
("gradientStop", &json!(1), &json!([swatch.left(), swatch.bottom() + 4.0]))
);
let points = |app: &VectorcraftApp| shown_points(&fill(app)).points.iter().map(|p| p.color.to_hex()).collect::<Vec<_>>();
let before = points(&app);
app.ui.dialog.as_mut().unwrap().fields.insert("color".into(), json!("#ff0000"));
crate::dialogs::confirm(&mut app).unwrap();
let mut want = before.clone();
want[1] = "#ff0000".into();
assert_eq!((fill(&app).gradient.kind, points(&app)), (GradientKind::Freeform, want));
}
#[test]
fn the_stop_eyedropper_arms_the_eyedropper_for_the_stop() {
let mut app = app(json!({"gradient": {}}));
+2 -1
View File
@@ -1,6 +1,6 @@
# UI and interaction parity
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-31 · **Change:** minor (files opened from the file manager while VectorCraft runs open in its window on Windows and Linux, #4892) · **Target:** Adobe Illustrator 2026 (30.x)
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-01 · **Change:** minor (native Save As Version menu, refused-save alert, fixed Contributors table header, freeform point swatch opens its popover: #4931, #4933, #4944, #4953) · **Target:** Adobe Illustrator 2026 (30.x)
## Feature submission evidence
@@ -381,6 +381,7 @@ separate. Scores and hours unchanged. [Behavior and command details](development
| Date | Change | Summary |
|---|---|---|
| 2026-11-01 | minor | VectorCraft Options' Version is a menu of the versions VectorCraft writes, each named by the releases that read it, and an uncompressible version turns Use Compression off (#4931); a save refused before writing shows the Can't save alert with the reason (#4933); About › Contributors' table keeps its header row above the scrolling rows (#4944); the Gradient panel's freeform point swatch opens the point's popover (#4953); scores unchanged |
| 2026-10-31 | minor | A file opened from the file manager while VectorCraft runs opens as a new tab in that window, which comes to the front, on Windows and Linux (#4892); `--new-instance` opts out; scores unchanged |
| 2026-10-31 | minor | Object › Path › Smooth: Auto-Smooth takes a shaky line to one smooth curve, and direct-selected anchors smooth only their section; scores unchanged |
| 2026-10-31 | minor | New Document: More Settings has Save Preset beside the name, as Preset Details does, and saves its settings (#4893); scores and estimates unchanged |