mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-19 12:38:18 +00:00
Merge pull request #8456 from dotCooCoo/feat/swatches-color-group-options
Swatches: Color Group Options renames the selected color group
This commit is contained in:
@@ -600,6 +600,7 @@ pub(super) const ALLOWED: &[&str] = &[
|
||||
"swatch.move",
|
||||
"swatch.new",
|
||||
"swatch.newGroup",
|
||||
"swatch.renameGroup",
|
||||
"swatch.resetDefaults",
|
||||
"swatch.setSpot",
|
||||
"swatch.sortByKind",
|
||||
|
||||
@@ -9,7 +9,9 @@ use vectorcraft_doc::swatches::{LinkFn, PaintFn, color_name, map_node_paints, ma
|
||||
use vectorcraft_doc::{Document, NodeId};
|
||||
|
||||
use super::paint::paint_from;
|
||||
use super::{CommandSpec, Result, Session, bad, bool_or, check_numbers, check_switches, cmd, color_value, has_doc, index, ok, str_param, switch_or};
|
||||
use super::{
|
||||
CommandSpec, Result, Session, bad, bool_or, check_numbers, check_switches, cmd, color_value, has_doc, index, ok, str_param, switch_or, text_param,
|
||||
};
|
||||
use crate::EngineError;
|
||||
|
||||
pub fn specs() -> Vec<CommandSpec> {
|
||||
@@ -106,6 +108,15 @@ pub fn specs() -> Vec<CommandSpec> {
|
||||
has_doc,
|
||||
swatch_ungroup
|
||||
),
|
||||
cmd!(
|
||||
"swatch.renameGroup",
|
||||
"Color Group Options",
|
||||
["Window", "Swatches"],
|
||||
None,
|
||||
"{group: color group, name: its new name (trimmed)} rename a color group, as one undo step; its swatches, their colors and the art linked to them stay as they are. Swatches and color groups share one set of names, so a name another color group or a swatch has is an error, as is an empty name; the group's own name records no undo step. A drag still in progress becomes an undo step of its own first → {name}",
|
||||
has_doc,
|
||||
swatch_rename_group
|
||||
),
|
||||
cmd!(
|
||||
"swatch.sortByKind",
|
||||
"Sort by Kind",
|
||||
@@ -1200,6 +1211,35 @@ fn swatch_ungroup(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
Ok(json!({ "swatches": moved }))
|
||||
}
|
||||
|
||||
fn swatch_rename_group(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
const C: &str = "swatch.renameGroup";
|
||||
let group = text_param(p, "group", C)?.ok_or_else(|| bad(C, "missing `group`"))?.to_string();
|
||||
let name = text_param(p, "name", C)?.ok_or_else(|| bad(C, "missing `name`"))?.trim().to_string();
|
||||
if name.is_empty() {
|
||||
return Err(bad(C, "`name` is empty"));
|
||||
}
|
||||
let d = &s.doc()?.doc;
|
||||
if !d.swatch_groups.iter().any(|g| g.name == group) {
|
||||
return Err(bad(C, format!("no colour group `{group}`")));
|
||||
}
|
||||
if name == group {
|
||||
return Ok(json!({ "name": name }));
|
||||
}
|
||||
if d.swatch_name_taken(&name) {
|
||||
return Err(bad(C, format!("a swatch or color group named `{name}` already exists")));
|
||||
}
|
||||
// A drag still in progress is a step of its own, so canceling or undoing it leaves the rename.
|
||||
if !s.previewing && s.batch_stash.is_none() && s.in_interaction() {
|
||||
super::settle_interaction(s)?;
|
||||
}
|
||||
s.edit("Color Group Options", |d, _| {
|
||||
let g = d.swatch_groups.iter_mut().find(|g| g.name == group).ok_or_else(|| bad(C, format!("no colour group `{group}`")))?;
|
||||
g.name.clone_from(&name);
|
||||
Ok(())
|
||||
})?;
|
||||
Ok(json!({ "name": name }))
|
||||
}
|
||||
|
||||
fn swatch_sort_by_kind(s: &mut Session, _: &Value) -> Result<Value> {
|
||||
let rank = |w: &Swatch| match &w.paint {
|
||||
Paint::None => 0,
|
||||
|
||||
@@ -569,6 +569,72 @@ fn ungroup_and_sort_by_kind_are_one_undo_step_each() {
|
||||
assert_eq!(n[n.iter().position(|x| x == "Orange").unwrap() + 1], "Ocean", "the spot colour comes after the process ones, then the gradients");
|
||||
}
|
||||
|
||||
/// Color Group Options renames a color group alone, as one undo step: its swatches, their colors
|
||||
/// and the art linked to them stay as they are. A name another group or a swatch has, an empty
|
||||
/// name and a parameter that is missing or not a string are errors that change nothing, and the
|
||||
/// group's own name records no undo step.
|
||||
#[test]
|
||||
fn rename_group_renames_only_the_group_in_one_undo_step() {
|
||||
let mut s = session();
|
||||
run(&mut s, "swatch.edit", json!({"name": "Bright Red", "global": true}));
|
||||
let a = rect_filled(&mut s, json!({"swatch": "Bright Red"}));
|
||||
let linked = fill(&s, a);
|
||||
let members = names(&s, Some("Brights"));
|
||||
let before = doc(&s).clone();
|
||||
let undo = undo_len(&s);
|
||||
assert_eq!(run(&mut s, "swatch.renameGroup", json!({"group": "Brights", "name": " Vivid Colors "}))["name"], "Vivid Colors");
|
||||
assert!(doc(&s).swatch_groups.iter().all(|g| g.name != "Brights"));
|
||||
assert_eq!(names(&s, Some("Vivid Colors")), members);
|
||||
assert_eq!(fill(&s, a), linked, "linked art keeps its swatch and color");
|
||||
assert_eq!(undo_len(&s), undo + 1);
|
||||
run(&mut s, "edit.undo", json!({}));
|
||||
assert_eq!(*doc(&s), before);
|
||||
run(&mut s, "edit.redo", json!({}));
|
||||
assert_eq!(names(&s, Some("Vivid Colors")), members);
|
||||
let renamed = doc(&s).clone();
|
||||
// The group's own name, trimmed, changes nothing.
|
||||
assert_eq!(run(&mut s, "swatch.renameGroup", json!({"group": "Vivid Colors", "name": " Vivid Colors"}))["name"], "Vivid Colors");
|
||||
assert_eq!(undo_len(&s), undo + 1);
|
||||
let refused = [
|
||||
json!({"group": "Vivid Colors", "name": "Grays"}),
|
||||
json!({"group": "Vivid Colors", "name": "White"}),
|
||||
json!({"group": "Vivid Colors", "name": "[None]"}),
|
||||
json!({"group": "Vivid Colors", "name": "[Registration]"}),
|
||||
json!({"group": "Vivid Colors", "name": ""}),
|
||||
json!({"group": "Vivid Colors", "name": " "}),
|
||||
json!({"group": "Vivid Colors"}),
|
||||
json!({"group": "Vivid Colors", "name": null}),
|
||||
json!({"group": "Vivid Colors", "name": 5}),
|
||||
json!({"name": "Bold"}),
|
||||
json!({"group": 5, "name": "Bold"}),
|
||||
json!({"group": "Nope", "name": "Bold"}),
|
||||
json!({"group": "White", "name": "Bold"}),
|
||||
];
|
||||
for p in refused {
|
||||
assert!(s.execute("swatch.renameGroup", &p).is_err(), "{p}");
|
||||
assert_eq!(*doc(&s), renamed, "{p}");
|
||||
assert_eq!(undo_len(&s), undo + 1, "{p}");
|
||||
}
|
||||
}
|
||||
|
||||
/// A color group renamed while a drag is still in progress keeps its new name when the drag is
|
||||
/// canceled: the drag becomes a step of its own first, and the rename is the next step.
|
||||
#[test]
|
||||
fn rename_group_during_a_drag_is_a_step_of_its_own() {
|
||||
let mut s = session();
|
||||
rect_filled(&mut s, json!({"swatch": "Bright Red"}));
|
||||
let undo = undo_len(&s);
|
||||
s.begin_interaction("Move").unwrap();
|
||||
s.preview("object.move", &json!({"dx": 7, "dy": 0})).unwrap();
|
||||
run(&mut s, "swatch.renameGroup", json!({"group": "Brights", "name": "Vivid"}));
|
||||
s.cancel_interaction().ok();
|
||||
assert!(doc(&s).swatch_groups.iter().any(|g| g.name == "Vivid"), "canceling the drag keeps the rename");
|
||||
assert_eq!(undo_len(&s), undo + 2, "the drag and the rename are two steps");
|
||||
run(&mut s, "edit.undo", json!({}));
|
||||
assert!(doc(&s).swatch_groups.iter().any(|g| g.name == "Brights"), "Undo takes back the rename alone");
|
||||
assert_eq!(undo_len(&s), undo + 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_cmyk_document_starts_with_cmyk_swatches_and_stores_new_colours_as_cmyk() {
|
||||
use vectorcraft_color::Color;
|
||||
|
||||
@@ -1002,6 +1002,12 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[
|
||||
"",
|
||||
"{swatches?: [names]} open New Color Group, from those swatches or the selected artwork (dialog `newColorGroup`, engine: swatch.newGroup)",
|
||||
),
|
||||
(
|
||||
"ui.colorGroupOptions",
|
||||
"Color Group Options…",
|
||||
"",
|
||||
"{group?} open Color Group Options for that color group, or without group for the color group selected alone in the Swatches panel (dialog `colorGroupOptions`, field `name`): OK renames the group (engine: swatch.renameGroup); a name that is empty or that another color group or a swatch has keeps the dialog open; when another document is active, or the color group at the group's place in the list no longer has the name and swatches it opened with, OK closes the dialog and renames nothing",
|
||||
),
|
||||
(
|
||||
"ui.colorPicker",
|
||||
"Color Picker…",
|
||||
|
||||
@@ -275,6 +275,10 @@ impl VectorcraftApp {
|
||||
}
|
||||
// A renamed spot color swatch stays the Color Guide's base; a deleted one ends the link.
|
||||
panels::color_guide::after_command(self, id, ¶ms, v, spot_base);
|
||||
// A renamed color group stays selected in the Swatches panel.
|
||||
if let Some(ctx) = self.ui_ctx.clone() {
|
||||
panels::swatches::after_command(&ctx, id, ¶ms, v);
|
||||
}
|
||||
if id == "file.new" {
|
||||
self.status("");
|
||||
// New Document's Pixel preview mode (Overprint Preview is the engine's).
|
||||
|
||||
@@ -25,6 +25,7 @@ pub mod bullets_numbering;
|
||||
pub mod char_style_options;
|
||||
pub mod check_spelling;
|
||||
pub mod color_balance;
|
||||
pub mod color_group_options;
|
||||
pub mod color_guide_options;
|
||||
pub(crate) mod color_picker;
|
||||
mod command;
|
||||
@@ -353,6 +354,7 @@ registry! {
|
||||
MissingFontEdit: [confirm::MISSING_FONT_EDIT] => confirm::MISSING_FONT_EDIT_SPEC,
|
||||
NewSwatch: [new_swatch::KIND] => new_swatch::SPEC,
|
||||
NewColorGroup: [new_color_group::KIND] => new_color_group::SPEC,
|
||||
ColorGroupOptions: [color_group_options::KIND] => color_group_options::SPEC,
|
||||
GraphData: [graph_data::KIND] => graph_data::SPEC,
|
||||
GraphDesign: [graph_design::DESIGN] => graph_design::DESIGN_SPEC,
|
||||
GraphColumn: [graph_design::COLUMN] => graph_design::COLUMN_SPEC,
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
//! Color Group Options: the name of a color group in the Swatches panel. OK renames the group
|
||||
//! (`swatch.renameGroup`) and keeps it selected in the panel; its swatches and their colors stay
|
||||
//! as they are.
|
||||
//!
|
||||
//! Fields: `name`, `__group` (the group being renamed), `__swatches` (the names of its swatches
|
||||
//! when the dialog opened), `__index` (its place in the list of color groups) and `__doc` (the uid
|
||||
//! of its document).
|
||||
|
||||
use serde_json::{Value, json};
|
||||
|
||||
use super::swatch_options::{grid, label};
|
||||
use super::{DialogSpec, form};
|
||||
use crate::VectorcraftApp;
|
||||
use crate::state::Dialog;
|
||||
|
||||
/// The dialog kind of Color Group Options.
|
||||
pub const KIND: &str = "colorGroupOptions";
|
||||
|
||||
pub(super) const SPEC: DialogSpec =
|
||||
DialogSpec { heading: |_| tl!("Color Group Options").into(), body, confirm, min_width: 320.0, ..DialogSpec::FORM };
|
||||
|
||||
/// The field that holds the uid of the document the dialog opened on.
|
||||
const DOC: &str = "__doc";
|
||||
|
||||
/// The field that holds the names of the group's swatches when the dialog opened.
|
||||
const SWATCHES: &str = "__swatches";
|
||||
|
||||
/// The field that holds the group's place in the document's list of color groups.
|
||||
const INDEX: &str = "__index";
|
||||
|
||||
/// `ui.colorGroupOptions {group?}`: open Color Group Options for color group `group`, or without
|
||||
/// `group` for the color group selected alone in the Swatches panel.
|
||||
pub fn open(app: &mut VectorcraftApp, p: &Value) -> Result<Value, String> {
|
||||
let key = "group";
|
||||
let group = match p.get(key) {
|
||||
Some(Value::String(g)) => g.clone(),
|
||||
None | Some(Value::Null) => crate::panels::swatches::sole_selected_group(app).ok_or("missing `group`")?,
|
||||
Some(_) => return Err(format!("`{key}` must be a string")),
|
||||
};
|
||||
let st = app.session.active().ok_or("no document open")?;
|
||||
let at = st.doc.swatch_groups.iter().position(|g| g.name == group).ok_or_else(|| format!("no colour group `{group}`"))?;
|
||||
let g = &st.doc.swatch_groups[at];
|
||||
let swatches: Vec<&str> = g.swatches.iter().map(|w| w.name.as_str()).collect();
|
||||
let fields = json!({ "name": g.name.clone(), "__group": g.name.clone(), SWATCHES: swatches, INDEX: at, DOC: st.uid });
|
||||
app.ui.dialog = Some(Dialog::new(KIND, fields));
|
||||
Ok(Value::Null)
|
||||
}
|
||||
|
||||
/// Whether the dialog's group is still in its document, at the place in the list, under the name
|
||||
/// and with the swatches it opened with, and that document is the active one.
|
||||
fn same_group(app: &VectorcraftApp, d: &Dialog) -> bool {
|
||||
let Some(st) = app.session.active().filter(|st| d.fields.get(DOC).and_then(Value::as_u64) == Some(st.uid)) else { return false };
|
||||
let at = d.fields.get(INDEX).and_then(Value::as_u64).and_then(|i| usize::try_from(i).ok());
|
||||
let opened: Vec<&str> =
|
||||
d.fields.get(SWATCHES).and_then(Value::as_array).map(|a| a.iter().filter_map(Value::as_str).collect()).unwrap_or_default();
|
||||
let group = d.str("__group");
|
||||
at.and_then(|i| st.doc.swatch_groups.get(i))
|
||||
.is_some_and(|g| g.name == group && g.swatches.iter().map(|w| w.name.as_str()).eq(opened.iter().copied()))
|
||||
}
|
||||
|
||||
fn body(_: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) -> bool {
|
||||
grid(ui, |ui| {
|
||||
label(ui, tl!("Name:"));
|
||||
form::text(ui, d, "name", 190.0);
|
||||
ui.end_row();
|
||||
});
|
||||
false
|
||||
}
|
||||
|
||||
/// OK: rename the group (the Swatches panel keeps it selected, [`crate::panels::swatches::after_command`]).
|
||||
/// A name that is empty or that another group or a swatch has keeps the dialog open. When another
|
||||
/// document has become the active one, or the color group at the group's place in the list no
|
||||
/// longer has the name and swatches it opened with, it closes as Cancel does and renames nothing.
|
||||
/// Color groups carry nothing else to tell them apart.
|
||||
fn confirm(app: &mut VectorcraftApp, d: &Dialog) -> Result<Value, String> {
|
||||
if !same_group(app, d) {
|
||||
app.ui.dialog = None;
|
||||
return Ok(json!({}));
|
||||
}
|
||||
let r = app.run("swatch.renameGroup", json!({ "group": d.str("__group"), "name": d.str("name") }));
|
||||
if r.is_ok() {
|
||||
app.ui.dialog = None;
|
||||
}
|
||||
r
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use vectorcraft_engine::Session;
|
||||
|
||||
fn app() -> VectorcraftApp {
|
||||
let mut app = VectorcraftApp::new(Session::new(), Default::default());
|
||||
app.run("file.new", json!({"width": 200, "height": 200})).unwrap();
|
||||
app
|
||||
}
|
||||
|
||||
fn set(app: &mut VectorcraftApp, v: &str) {
|
||||
app.ui.dialog.as_mut().unwrap().fields.insert("name".into(), json!(v));
|
||||
}
|
||||
|
||||
fn groups(app: &VectorcraftApp) -> Vec<String> {
|
||||
app.session.active().unwrap().doc.swatch_groups.iter().map(|g| g.name.clone()).collect()
|
||||
}
|
||||
|
||||
fn undo_len(app: &VectorcraftApp) -> usize {
|
||||
app.session.active().unwrap().history.undo.len()
|
||||
}
|
||||
|
||||
/// The dialog opens on the group's name; OK renames it in one undo step, a taken or empty name
|
||||
/// keeps the dialog open with nothing changed, Cancel changes nothing, and OK with the name
|
||||
/// unchanged records no undo step.
|
||||
#[test]
|
||||
fn renames_the_group_and_keeps_a_refused_name_open() {
|
||||
let mut app = app();
|
||||
app.run("ui.colorGroupOptions", json!({"group": "Brights"})).unwrap();
|
||||
let d = app.ui.dialog.as_ref().unwrap();
|
||||
assert_eq!((d.kind.as_str(), d.str("name").as_str(), d.str("__group").as_str()), (KIND, "Brights", "Brights"));
|
||||
// Drawn headlessly in the shared frame.
|
||||
let ctx = egui::Context::default();
|
||||
crate::theme::install_fonts(&ctx);
|
||||
let mut out = ctx.run_ui(Default::default(), |ui| super::super::show(&mut app, ui.ctx()));
|
||||
out.textures_delta.clear();
|
||||
let undo = undo_len(&app);
|
||||
for taken in ["Grays", "White", " "] {
|
||||
set(&mut app, taken);
|
||||
assert!(super::super::confirm(&mut app).is_err(), "{taken:?}");
|
||||
assert!(app.ui.dialog.is_some(), "{taken:?} keeps the dialog open");
|
||||
assert_eq!(undo_len(&app), undo, "{taken:?}");
|
||||
}
|
||||
set(&mut app, "Vivid");
|
||||
super::super::cancel(&mut app);
|
||||
assert!(app.ui.dialog.is_none() && groups(&app).contains(&"Brights".to_string()), "Cancel keeps the name");
|
||||
assert_eq!(undo_len(&app), undo);
|
||||
app.run("ui.colorGroupOptions", json!({"group": "Brights"})).unwrap();
|
||||
super::super::confirm(&mut app).unwrap();
|
||||
assert!(app.ui.dialog.is_none());
|
||||
assert_eq!(undo_len(&app), undo, "the same name records no undo step");
|
||||
app.run("ui.colorGroupOptions", json!({"group": "Brights"})).unwrap();
|
||||
set(&mut app, "Vivid");
|
||||
super::super::confirm(&mut app).unwrap();
|
||||
assert!(app.ui.dialog.is_none() && groups(&app).contains(&"Vivid".to_string()));
|
||||
assert_eq!(undo_len(&app), undo + 1);
|
||||
assert!(app.run("ui.colorGroupOptions", json!({"group": "Brights"})).is_err());
|
||||
assert!(app.run("ui.colorGroupOptions", json!({"group": "White"})).is_err(), "a swatch is not a group");
|
||||
assert!(app.run("ui.colorGroupOptions", json!({})).is_err());
|
||||
assert!(app.run("ui.colorGroupOptions", json!({"group": 5})).is_err());
|
||||
}
|
||||
|
||||
/// OK closes the dialog and renames nothing when another document has become the active one,
|
||||
/// or when another group took the name of the group it opened on while it was open.
|
||||
#[test]
|
||||
fn renames_only_the_group_it_opened_on() {
|
||||
let mut app = app();
|
||||
app.run("file.new", json!({"width": 200, "height": 200})).unwrap();
|
||||
app.run("document.activate", json!({"index": 0})).unwrap();
|
||||
app.run("ui.colorGroupOptions", json!({"group": "Brights"})).unwrap();
|
||||
app.run("document.activate", json!({"index": 1})).unwrap();
|
||||
set(&mut app, "Vivid");
|
||||
super::super::confirm(&mut app).unwrap();
|
||||
assert!(app.ui.dialog.is_none());
|
||||
assert!(groups(&app).contains(&"Brights".to_string()), "the document made active keeps its group");
|
||||
app.run("document.activate", json!({"index": 0})).unwrap();
|
||||
assert!(groups(&app).contains(&"Brights".to_string()), "the group it opened on keeps its name");
|
||||
// Its group ungrouped, and another group renamed to its name.
|
||||
app.run("ui.colorGroupOptions", json!({"group": "Brights"})).unwrap();
|
||||
app.run("swatch.ungroup", json!({"name": "Brights"})).unwrap();
|
||||
app.run("swatch.renameGroup", json!({"group": "Grays", "name": "Brights"})).unwrap();
|
||||
set(&mut app, "Vivid");
|
||||
super::super::confirm(&mut app).unwrap();
|
||||
assert!(app.ui.dialog.is_none());
|
||||
assert!(groups(&app).contains(&"Brights".to_string()) && !groups(&app).contains(&"Vivid".to_string()));
|
||||
// Its group moved to another place in the list.
|
||||
app.run("swatch.newGroup", json!({"name": "Extra", "swatches": ["White"]})).unwrap();
|
||||
let first = groups(&app)[0].clone();
|
||||
app.run("ui.colorGroupOptions", json!({"group": first})).unwrap();
|
||||
app.run("swatch.move", json!({"names": [first]})).unwrap();
|
||||
set(&mut app, "Vivid");
|
||||
super::super::confirm(&mut app).unwrap();
|
||||
assert!(app.ui.dialog.is_none() && groups(&app).contains(&first) && !groups(&app).contains(&"Vivid".to_string()));
|
||||
}
|
||||
}
|
||||
@@ -4155,6 +4155,8 @@ digits Malayalam Малаялам
|
||||
Unembed… Премахване на връзка…
|
||||
Ungroup Разгрупиране
|
||||
Ungroup Color Group Разгрупиране на цветова група
|
||||
Color Group Options Опции за цветова група
|
||||
Color Group Options… Опции за цветова група…
|
||||
Unicode Уникод
|
||||
Unicode (UTF-16) Уникод (UTF-16)
|
||||
Unicode (UTF-8) Уникод (UTF-8)
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4338,6 +4338,8 @@ theme Appearance Izgled
|
||||
Spot Colors (0) Spot boje (0)
|
||||
Swatch Options Opcije uzorka boje
|
||||
Ungroup Color Group Razgrupiši grupu boja
|
||||
Color Group Options Opcije grupe boja
|
||||
Color Group Options… Opcije grupe boja…
|
||||
Copy to User Defined Kopiraj u korisnički definisano
|
||||
Swatch Library Biblioteka uzoraka boja
|
||||
Clear All Tabs Očisti sve tabulatore
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -5659,6 +5659,8 @@ digits Malayalam Malaiàlam
|
||||
Unembed… Desincrusta…
|
||||
Ungroup Desagrupa
|
||||
Ungroup Color Group Desagrupa el grup de colors
|
||||
Color Group Options Opcions del grup de colors
|
||||
Color Group Options… Opcions del grup de colors…
|
||||
Unicode Unicode
|
||||
Unicode (UTF-16) Unicode (UTF-16)
|
||||
Unicode (UTF-8) Unicode (UTF-8)
|
||||
@@ -6118,6 +6120,9 @@ digits Malayalam Malaiàlam
|
||||
@msg a freeform gradient keeps at least one point un degradat de forma lliure conserva com a mínim un punt
|
||||
@msg a gradient needs at least two stops un degradat necessita com a mínim dues parades
|
||||
@msg a graphic style named `{to}` already exists ja existeix un estil gràfic anomenat `{to}`
|
||||
@msg a swatch or color group named `{name}` already exists ja existeix una mostra o un grup de colors anomenat `{name}`
|
||||
@msg missing `group` falta `group`
|
||||
@msg no colour group `{group}` no hi ha el grup de colors `{group}`
|
||||
@msg a key object sits on that point hi ha un objecte clau en aquest punt
|
||||
@msg a layer couldn't be read no s’ha pogut llegir una capa
|
||||
@msg a linked image can't become a gradient mesh: embed it first una imatge enllaçada no pot esdevenir una malla de degradat: incrusteu-la primer
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4447,6 +4447,8 @@ theme Appearance Motiv
|
||||
Spot Colors (0) Přímé barvy (0)
|
||||
Swatch Options Možnosti položky vzorníku
|
||||
Ungroup Color Group Zrušit skupinu barev
|
||||
Color Group Options Možnosti skupiny barev
|
||||
Color Group Options… Možnosti skupiny barev…
|
||||
Copy to User Defined Kopírovat do uživatelských
|
||||
Swatch Library Knihovna vzorníku
|
||||
Clear All Tabs Vymazat všechny tabulátory
|
||||
@@ -5445,6 +5447,7 @@ liquify-list-end {0}, {1} {0} a {1}
|
||||
@msg a freeform gradient keeps at least one point volný přechod si ponechává alespoň jeden bod
|
||||
@msg a gradient needs at least two stops přechod potřebuje alespoň dvě zarážky
|
||||
@msg a graphic style named `{to}` already exists grafický styl s názvem `{to}` už existuje
|
||||
@msg a swatch or color group named `{name}` already exists položka vzorníku nebo skupina barev s názvem `{name}` už existuje
|
||||
@msg a key object sits on that point na tomto bodě leží klíčový objekt
|
||||
@msg a page is missing chybí stránka
|
||||
@msg a page out of range stránka mimo rozsah
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -6881,6 +6881,8 @@ theme Appearance Udseende
|
||||
Spot Colors (0) Spotfarver (0)
|
||||
Swatch Options Indstillinger for farveprøve
|
||||
Ungroup Color Group Afgruppér farvegruppe
|
||||
Color Group Options Indstillinger for farvegruppe
|
||||
Color Group Options… Indstillinger for farvegruppe…
|
||||
Copy to User Defined Kopiér til brugerdefinerede
|
||||
Swatch Library Farveprøvebibliotek
|
||||
Clear All Tabs Ryd alle tabulatorer
|
||||
@@ -7654,6 +7656,7 @@ imageTrace Outline Kontur
|
||||
@msg a freeform gradient keeps at least one point en freeform-gradient bevarer mindst ét punkt
|
||||
@msg a gradient needs at least two stops en gradient skal have mindst to stop
|
||||
@msg a graphic style named `{to}` already exists der findes allerede en grafikstil med navnet `{to}`
|
||||
@msg a swatch or color group named `{name}` already exists der findes allerede en farveprøve eller farvegruppe med navnet `{name}`
|
||||
@msg a page is missing en side mangler
|
||||
@msg a page out of range en side uden for området
|
||||
@msg a page tree kid isn't a reference et barn i sidetræet er ikke en reference
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4265,6 +4265,8 @@ effect Points Punkte
|
||||
Unembed… Einbettung aufheben…
|
||||
Ungroup Gruppierung aufheben
|
||||
Ungroup Color Group Farbgruppe auflösen
|
||||
Color Group Options Farbgruppenoptionen
|
||||
Color Group Options… Farbgruppenoptionen…
|
||||
Unicode Unicode
|
||||
Unicode (UTF-16) Unicode (UTF-16)
|
||||
Unicode (UTF-8) Unicode (UTF-8)
|
||||
@@ -5021,6 +5023,7 @@ liquify-list-end {0}, {1} {0} und {1}
|
||||
@msg a freeform gradient keeps at least one point ein Freiformverlauf behält mindestens einen Punkt
|
||||
@msg a gradient needs at least two stops ein Verlauf braucht mindestens zwei Farbstopps
|
||||
@msg a graphic style named `{to}` already exists ein Grafikstil namens `{to}` ist bereits vorhanden
|
||||
@msg a swatch or color group named `{name}` already exists ein Farbfeld oder eine Farbgruppe namens `{name}` ist bereits vorhanden
|
||||
@msg a key object sits on that point auf diesem Punkt liegt ein Basisobjekt
|
||||
@msg a page is missing eine Seite fehlt
|
||||
@msg a page out of range eine Seite außerhalb des Bereichs
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4858,6 +4858,8 @@ digits Malayalam Μαλαγιάλαμ
|
||||
Unembedded to {} Καταργήθηκε η ενσωμάτωση στο {}
|
||||
Unembed… Κατάργηση ενσωμάτωσης…
|
||||
Ungroup Color Group Κατάργηση ομαδοποίησης χρωμάτων
|
||||
Color Group Options Επιλογές ομάδας χρωμάτων
|
||||
Color Group Options… Επιλογές ομάδας χρωμάτων…
|
||||
Unique Μοναδικό
|
||||
Unite Ένωση
|
||||
Unite and Simplify Ένωση και απλοποίηση
|
||||
@@ -5085,6 +5087,9 @@ digits Malayalam Μαλαγιάλαμ
|
||||
@msg a freeform gradient keeps at least one point το ντεγκραντέ ελεύθερης μορφής χρειάζεται τουλάχιστον ένα σημείο
|
||||
@msg a gradient needs at least two stops το ντεγκραντέ χρειάζεται τουλάχιστον δύο σημεία χρώματος
|
||||
@msg a graphic style named `{to}` already exists υπάρχει ήδη στυλ γραφικών με όνομα `{to}`
|
||||
@msg a swatch or color group named `{name}` already exists υπάρχει ήδη δείγμα χρώματος ή ομάδα χρωμάτων με όνομα `{name}`
|
||||
@msg missing `group` λείπει το `group`
|
||||
@msg no colour group `{group}` δεν υπάρχει ομάδα χρωμάτων `{group}`
|
||||
@msg a key object sits on that point σε αυτό το σημείο βρίσκεται βασικό αντικείμενο
|
||||
@msg a page is missing λείπει μια σελίδα
|
||||
@msg a page out of range η σελίδα βρίσκεται εκτός εύρους
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4315,6 +4315,8 @@ digits Malayalam Malayálam
|
||||
Unembed… Desincrustar…
|
||||
Ungroup Desagrupar
|
||||
Ungroup Color Group Desagrupar grupo de colores
|
||||
Color Group Options Opciones de grupo de colores
|
||||
Color Group Options… Opciones de grupo de colores…
|
||||
Unicode Unicode
|
||||
Unicode (UTF-16) Unicode (UTF-16)
|
||||
Unicode (UTF-8) Unicode (UTF-8)
|
||||
@@ -5133,6 +5135,7 @@ liquify-list-end {0}, {1} {0}, {1}
|
||||
@msg a freeform gradient keeps at least one point un degradado de forma libre conserva al menos un punto
|
||||
@msg a gradient needs at least two stops un degradado necesita al menos dos paradas
|
||||
@msg a graphic style named `{to}` already exists ya existe un estilo gráfico llamado `{to}`
|
||||
@msg a swatch or color group named `{name}` already exists ya existe una muestra o un grupo de colores llamado `{name}`
|
||||
@msg a key object sits on that point hay un objeto clave en ese punto
|
||||
@msg a page is missing falta una página
|
||||
@msg a page out of range una página fuera de rango
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4364,6 +4364,8 @@ theme Appearance Ulkoasu
|
||||
Spot Colors (0) Spottivärit (0)
|
||||
Swatch Options Värimallin asetukset
|
||||
Ungroup Color Group Pura väriryhmä
|
||||
Color Group Options Väriryhmän asetukset
|
||||
Color Group Options… Väriryhmän asetukset…
|
||||
Copy to User Defined Kopioi käyttäjän määrittämiin
|
||||
Swatch Library Värimallikirjasto
|
||||
Clear All Tabs Tyhjennä kaikki sarkaimet
|
||||
@@ -5370,6 +5372,9 @@ liquify-list-end {0}, {1} {0} ja {1}
|
||||
@msg a freeform gradient keeps at least one point vapaamuotoisessa liukuvärissä on oltava vähintään yksi piste
|
||||
@msg a gradient needs at least two stops liukuvärissä on oltava vähintään kaksi väripistettä
|
||||
@msg a graphic style named `{to}` already exists grafiikkatyyli nimeltä `{to}` on jo olemassa
|
||||
@msg a swatch or color group named `{name}` already exists värimalli tai väriryhmä nimeltä `{name}` on jo olemassa
|
||||
@msg missing `group` `group` puuttuu
|
||||
@msg no colour group `{group}` ei väriryhmää `{group}`
|
||||
@msg a key object sits on that point pisteessä on avainobjekti
|
||||
@msg a page is missing sivu puuttuu
|
||||
@msg a page out of range sivu alueen ulkopuolella
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4299,6 +4299,8 @@ digits Malayalam Malayalam
|
||||
Unembed… Annuler l’incorporation…
|
||||
Ungroup Dissocier
|
||||
Ungroup Color Group Dissocier le groupe de couleurs
|
||||
Color Group Options Options du groupe de couleurs
|
||||
Color Group Options… Options du groupe de couleurs…
|
||||
Unicode Unicode
|
||||
Unicode (UTF-16) Unicode (UTF-16)
|
||||
Unicode (UTF-8) Unicode (UTF-8)
|
||||
@@ -5092,6 +5094,7 @@ liquify-list-end {0}, {1} {0} et {1}
|
||||
@msg a freeform gradient keeps at least one point un dégradé de forme libre garde au moins un point
|
||||
@msg a gradient needs at least two stops un dégradé doit avoir au moins deux étapes de dégradé
|
||||
@msg a graphic style named `{to}` already exists un style graphique nommé `{to}` existe déjà
|
||||
@msg a swatch or color group named `{name}` already exists une nuance ou un groupe de couleurs nommé `{name}` existe déjà
|
||||
@msg a key object sits on that point un objet clé se trouve sur ce point
|
||||
@msg a page is missing une page est manquante
|
||||
@msg a page out of range une page hors limites
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4389,6 +4389,8 @@
|
||||
Unembed… એમ્બેડ દૂર કરો…
|
||||
Ungroup અનગ્રુપ કરો
|
||||
Ungroup Color Group રંગ ગ્રુપ અનગ્રુપ કરો
|
||||
Color Group Options રંગ ગ્રુપ વિકલ્પો
|
||||
Color Group Options… રંગ ગ્રુપ વિકલ્પો…
|
||||
Uniform યુનિફોર્મ
|
||||
Uniformly Scaled સમાન રીતે સ્કેલ કરેલ
|
||||
Unite યુનાઇટ
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 72 and column 5.
|
@@ -6072,6 +6072,8 @@ antiAlias Sharp शार्प
|
||||
Unembedded to {} एम्बेड हटाकर {} में रखा गया
|
||||
Ungroup समूह तोड़ें
|
||||
Ungroup Color Group रंग समूह का ग्रूपिंग हटाएँ
|
||||
Color Group Options रंग समूह ऑप्शन्स
|
||||
Color Group Options… रंग समूह ऑप्शन्स…
|
||||
Unicode यूनिकोड
|
||||
Unicode (UTF-16) यूनिकोड (UTF-16)
|
||||
Unicode (UTF-8) यूनिकोड (UTF-8)
|
||||
@@ -7076,6 +7078,7 @@ antiAlias Sharp शार्प
|
||||
@msg a graph has at most {_1} series, so it transposes with at most that many categories एक ग्राफ में सबसे {_1} श्रृंखला है, इसलिए यह उस कई श्रेणियों के साथ ट्रांसपोजित होता है।
|
||||
@msg a graph's records don't end where they should: its art was read as it is एक ग्राफ का रिकॉर्ड अंत नहीं है जहां उन्हें होना चाहिए: इसकी कला को पढ़ा गया क्योंकि यह है
|
||||
@msg a graphic style named `{to}` already exists `{to}` नामक एक ग्राफिक स्टाइल पहले से मौजूद है
|
||||
@msg a swatch or color group named `{name}` already exists `{name}` नामक एक स्वॉच या रंग समूह पहले से मौजूद है
|
||||
@msg a group crosses a multi-layer mask एक समूह एक बहुलेयर मास्क पार करता है
|
||||
@msg a key object sits on that point एक प्रमुख ऑब्जेक्ट उस बिंदु पर बैठती है
|
||||
@msg a layer can't be merged into its own sublayer एक लेयर को अपने खुद के सबलेयर में विलय नहीं किया जा सकता है
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -5068,6 +5068,8 @@ mark-style Japanese Japán
|
||||
Unembed… Beágyazás megszüntetése…
|
||||
Ungroup Csoportbontás
|
||||
Ungroup Color Group Színcsoport bontása
|
||||
Color Group Options Színcsoport beállításai
|
||||
Color Group Options… Színcsoport beállításai…
|
||||
Unicode Unicode
|
||||
Unicode (UTF-16) Unicode (UTF-16)
|
||||
Unicode (UTF-8) Unicode (UTF-8)
|
||||
@@ -5454,6 +5456,7 @@ imageTrace Outline Körvonal
|
||||
@msg a freeform gradient keeps at least one point a szabad formájú színátmenetben legalább egy pont marad
|
||||
@msg a gradient needs at least two stops a színátmenethez legalább két színátmenet-pont kell
|
||||
@msg a graphic style named `{to}` already exists már van ilyen nevű grafikai stílus: `{to}`
|
||||
@msg a swatch or color group named `{name}` already exists már van ilyen nevű színminta vagy színcsoport: `{name}`
|
||||
@msg a key object sits on that point ezen a ponton kulcsobjektum van
|
||||
@msg a layer couldn't be read egy réteg nem olvasható
|
||||
@msg a page is missing hiányzik egy oldal
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4767,6 +4767,8 @@ theme Appearance Tampilan
|
||||
Spot Colors (0) Warna spot (0)
|
||||
Swatch Options Opsi sampel
|
||||
Ungroup Color Group Lepaskan grup warna
|
||||
Color Group Options Opsi grup warna
|
||||
Color Group Options… Opsi grup warna…
|
||||
Copy to User Defined Salin ke Buatan Pengguna
|
||||
Swatch Library Pustaka sampel
|
||||
Clear All Tabs Hapus semua tab
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 55 and column 36.
|
@@ -4368,6 +4368,8 @@ digits Malayalam Malayalam
|
||||
Unembed… Rimuovi incorporamento…
|
||||
Ungroup Separa
|
||||
Ungroup Color Group Separa gruppo colori
|
||||
Color Group Options Opzioni gruppo colori
|
||||
Color Group Options… Opzioni gruppo colori…
|
||||
Unicode Unicode
|
||||
Unicode (UTF-16) Unicode (UTF-16)
|
||||
Unicode (UTF-8) Unicode (UTF-8)
|
||||
@@ -5159,6 +5161,7 @@ liquify-list-end {0}, {1} {0} e {1}
|
||||
@msg a freeform gradient keeps at least one point una sfumatura a forma libera mantiene almeno un punto
|
||||
@msg a gradient needs at least two stops una sfumatura richiede almeno due cursori colore
|
||||
@msg a graphic style named `{to}` already exists esiste già uno stile grafico denominato `{to}`
|
||||
@msg a swatch or color group named `{name}` already exists esiste già un campione o un gruppo colori denominato `{name}`
|
||||
@msg a key object sits on that point su quel punto si trova un oggetto chiave
|
||||
@msg a page is missing manca una pagina
|
||||
@msg a page out of range una pagina fuori intervallo
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -3916,6 +3916,8 @@ mark-style Japanese 日本式
|
||||
Unembed 埋め込みを解除
|
||||
Unembed… 埋め込みを解除…
|
||||
Ungroup Color Group カラーグループを解除
|
||||
Color Group Options カラーグループオプション
|
||||
Color Group Options… カラーグループオプション…
|
||||
Uniform 縦横比を固定
|
||||
Unite 合体
|
||||
Units 単位
|
||||
@@ -5177,6 +5179,7 @@ variable-list-end {0}, {1} {0}、{1}
|
||||
@msg select a stroke with a variable width 可変幅の線を選択してください
|
||||
@msg the selected stroke's profile is already listed as {_1} 選択した線のプロファイルは、すでに {_1} として登録されています
|
||||
@msg a graphic style named `{to}` already exists `{to}` という名前のグラフィックスタイルはすでに存在します
|
||||
@msg a swatch or color group named `{name}` already exists `{name}` という名前のスウォッチまたはカラーグループはすでに存在します
|
||||
@msg a key object sits on that point そのポイントにはキーオブジェクトがあります
|
||||
@msg no graphic style `{name}` グラフィックスタイル `{name}` が見つかりません
|
||||
@msg node {_1} is not text ノード {_1} はテキストではありません
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -6178,6 +6178,8 @@ theme Appearance იერსახე
|
||||
Spot Colors სპოტ-ფერები
|
||||
Swatch Options ფერის ნიმუშის პარამეტრები
|
||||
Ungroup Color Group ფერების ჯგუფის დაშლა
|
||||
Color Group Options ფერების ჯგუფის პარამეტრები
|
||||
Color Group Options… ფერების ჯგუფის პარამეტრები…
|
||||
Copy to User Defined მომხმარებლის განსაზღვრულში კოპირება
|
||||
Swatch Library ფერის ნიმუშების ბიბლიოთეკა
|
||||
Clear All Tabs ყველა ტაბულაციის გასუფთავება
|
||||
@@ -6921,6 +6923,7 @@ font-technology Variable ცვლადი
|
||||
@msg a freeform gradient keeps at least one point თავისუფალი ფორმის გრადიენტი ინარჩუნებს მინიმუმ ერთ წერტილს
|
||||
@msg a gradient needs at least two stops გრადიენტს სჭირდება მინიმუმ ორი გადასვლის წერტილი
|
||||
@msg a graphic style named `{to}` already exists გრაფიკული სტილი სახელით `{to}` უკვე არსებობს
|
||||
@msg a swatch or color group named `{name}` already exists ფერის ნიმუში ან ფერების ჯგუფი სახელით `{name}` უკვე არსებობს
|
||||
@msg a page is missing გვერდი აკლია
|
||||
@msg a page out of range გვერდი დიაპაზონს გარეთაა
|
||||
@msg a page tree kid isn't a reference გვერდების ხის შვილობილი მიმართვა არ არის
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -3907,6 +3907,8 @@ mark-style Japanese 일본식
|
||||
Unembed 포함 해제
|
||||
Unembed… 포함 해제…
|
||||
Ungroup Color Group 색상 그룹 해제
|
||||
Color Group Options 색상 그룹 옵션
|
||||
Color Group Options… 색상 그룹 옵션…
|
||||
Uniform 균일
|
||||
Unite 합치기
|
||||
Units 단위
|
||||
@@ -5106,6 +5108,7 @@ variable-list-end {0}, {1} {0} 및 {1}
|
||||
@msg select a stroke with a variable width 가변 너비 선을 선택하세요
|
||||
@msg the selected stroke's profile is already listed as {_1} 선택한 선의 프로파일이 이미 {_1}(으)로 등록되어 있습니다
|
||||
@msg a graphic style named `{to}` already exists `{to}` 그래픽 스타일이 이미 있습니다
|
||||
@msg a swatch or color group named `{name}` already exists `{name}` 견본 또는 색상 그룹이 이미 있습니다
|
||||
@msg a key object sits on that point 그 포인트에 키 개체가 있습니다
|
||||
@msg no graphic style `{name}` `{name}` 그래픽 스타일이 없습니다
|
||||
@msg node {_1} is not text 노드 {_1}은(는) 텍스트가 아닙니다
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4752,6 +4752,8 @@ theme Appearance Vormgeving
|
||||
Spot Colors (0) Spotkleuren (0)
|
||||
Swatch Options Kleurstaalopties
|
||||
Ungroup Color Group Kleurgroep opheffen
|
||||
Color Group Options Opties voor kleurgroep
|
||||
Color Group Options… Opties voor kleurgroep…
|
||||
Copy to User Defined Kopiëren naar Gebruikergedefinieerd
|
||||
Swatch Library Bibliotheek met kleurstalen
|
||||
Clear All Tabs Alle tabs wissen
|
||||
@@ -5526,6 +5528,7 @@ imageTrace Outline Contour
|
||||
@msg a freeform gradient keeps at least one point een verloop met vrije vorm behoudt minstens één punt
|
||||
@msg a gradient needs at least two stops een verloop heeft minstens twee stops nodig
|
||||
@msg a graphic style named `{to}` already exists er bestaat al een grafische stijl met de naam `{to}`
|
||||
@msg a swatch or color group named `{name}` already exists er bestaat al een kleurstaal of kleurgroep met de naam `{name}`
|
||||
@msg a page is missing er ontbreekt een pagina
|
||||
@msg a page out of range een pagina buiten het bereik
|
||||
@msg a page tree kid isn't a reference een kind van de paginaboom is geen verwijzing
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4308,6 +4308,8 @@ theme Appearance Wygląd
|
||||
Spot Colors Kolory dodatkowe
|
||||
Swatch Options Opcje próbki
|
||||
Ungroup Color Group Rozgrupuj grupę kolorów
|
||||
Color Group Options Opcje grupy kolorów
|
||||
Color Group Options… Opcje grupy kolorów…
|
||||
Copy to User Defined Kopiuj do zdefiniowanych przez użytkownika
|
||||
Swatch Library Biblioteka próbek
|
||||
Clear All Tabs Usuń wszystkie tabulatory
|
||||
@@ -5262,6 +5264,7 @@ liquify-list-end {0}, {1} {0} i {1}
|
||||
@msg a freeform gradient keeps at least one point gradient dowolny musi mieć co najmniej jeden punkt
|
||||
@msg a gradient needs at least two stops gradient potrzebuje co najmniej dwóch punktów koloru
|
||||
@msg a graphic style named `{to}` already exists styl graficzny o nazwie `{to}` już istnieje
|
||||
@msg a swatch or color group named `{name}` already exists próbka lub grupa kolorów o nazwie `{name}` już istnieje
|
||||
@msg a key object sits on that point w tym punkcie leży obiekt kluczowy
|
||||
@msg a page is missing brak strony
|
||||
@msg a page out of range strona spoza zakresu
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -3529,6 +3529,8 @@ digits Malayalam Malaiala
|
||||
Unembed… Desincorporar…
|
||||
Ungroup Desagrupar
|
||||
Ungroup Color Group Desagrupar Grupo de Cores
|
||||
Color Group Options Opções de Grupo de Cores
|
||||
Color Group Options… Opções de Grupo de Cores…
|
||||
Uniform Uniforme
|
||||
Unite Unir
|
||||
Units Unidades
|
||||
@@ -4416,6 +4418,7 @@ axis Both Ambos
|
||||
@msg a freeform gradient keeps at least one point um gradiente de forma livre mantém pelo menos um ponto
|
||||
@msg a gradient needs at least two stops um gradiente precisa de pelo menos duas paradas
|
||||
@msg a graphic style named `{to}` already exists já existe um estilo gráfico chamado `{to}`
|
||||
@msg a swatch or color group named `{name}` already exists já existe uma amostra ou um grupo de cores chamado `{name}`
|
||||
@msg a key object sits on that point há um objeto-chave nesse ponto
|
||||
@msg a page is missing falta uma página
|
||||
@msg a page out of range uma página fora do intervalo
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4344,6 +4344,8 @@ digits Malayalam Малаялам
|
||||
Unembed… Извлечь…
|
||||
Ungroup Разгруппировать
|
||||
Ungroup Color Group Разгруппировать цветовую группу
|
||||
Color Group Options Параметры цветовой группы
|
||||
Color Group Options… Параметры цветовой группы…
|
||||
Unicode Unicode
|
||||
Unicode (UTF-16) Unicode (UTF-16)
|
||||
Unicode (UTF-8) Unicode (UTF-8)
|
||||
@@ -5154,6 +5156,7 @@ liquify-list-end {0}, {1} {0} и {1}
|
||||
@msg a freeform gradient keeps at least one point произвольный градиент сохраняет как минимум одну точку
|
||||
@msg a gradient needs at least two stops градиенту нужны как минимум две точки перехода
|
||||
@msg a graphic style named `{to}` already exists графический стиль с именем `{to}` уже существует
|
||||
@msg a swatch or color group named `{name}` already exists образец или цветовая группа с именем `{name}` уже существует
|
||||
@msg a key object sits on that point в этой точке находится ключевой объект
|
||||
@msg a page is missing страница отсутствует
|
||||
@msg a page out of range страница вне диапазона
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4222,6 +4222,8 @@ digits Malayalam Malayalam
|
||||
Unembed… Ta bort inbäddning…
|
||||
Ungroup Dela upp grupp
|
||||
Ungroup Color Group Dela upp färggrupp
|
||||
Color Group Options Färggruppsalternativ
|
||||
Color Group Options… Färggruppsalternativ…
|
||||
Unicode Unicode
|
||||
Unicode (UTF-16) Unicode (UTF-16)
|
||||
Unicode (UTF-8) Unicode (UTF-8)
|
||||
@@ -5025,6 +5027,8 @@ liquify-list-end {0}, {1} {0} och {1}
|
||||
@msg a freeform gradient keeps at least one point en fri gradient behåller minst en punkt
|
||||
@msg a gradient needs at least two stops en gradient behöver minst två stopp
|
||||
@msg a graphic style named `{to}` already exists det finns redan en grafisk stil med namnet `{to}`
|
||||
@msg a swatch or color group named `{name}` already exists det finns redan en färgruta eller färggrupp med namnet `{name}`
|
||||
@msg no colour group `{group}` ingen färggrupp `{group}`
|
||||
@msg a key object sits on that point ett nyckelobjekt ligger på den punkten
|
||||
@msg a page is missing en sida saknas
|
||||
@msg a page out of range en sida utanför intervallet
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4080,6 +4080,8 @@ digits Malayalam Malayalam
|
||||
Unembed… Gömmeyi kaldır…
|
||||
Ungroup Grubu Çöz
|
||||
Ungroup Color Group Renk Grubunun Grubunu Çöz
|
||||
Color Group Options Renk Grubu Seçenekleri
|
||||
Color Group Options… Renk Grubu Seçenekleri…
|
||||
Unicode Unicode
|
||||
Unicode (UTF-16) Unicode (UTF-16)
|
||||
Unicode (UTF-8) Unicode (UTF-8)
|
||||
@@ -4840,6 +4842,7 @@ liquify-list-end {0}, {1} {0} ve {1}
|
||||
@msg a freeform gradient keeps at least one point serbest biçimli bir degrade en az bir noktayı korur
|
||||
@msg a gradient needs at least two stops bir degradenin en az iki durağa ihtiyacı vardır
|
||||
@msg a graphic style named `{to}` already exists `{to}` adlı bir grafik stili zaten mevcut
|
||||
@msg a swatch or color group named `{name}` already exists `{name}` adlı bir renk örneği veya renk grubu zaten mevcut
|
||||
@msg a page is missing bir sayfa eksik
|
||||
@msg a page out of range aralık dışında bir sayfa
|
||||
@msg a page tree kid isn't a reference sayfa ağacı çocuğu bir referans değildir
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4361,6 +4361,8 @@ effect Points Точки
|
||||
Unembed… Витягти…
|
||||
Ungroup Розгрупувати
|
||||
Ungroup Color Group Розгрупувати колірну групу
|
||||
Color Group Options Параметри колірної групи
|
||||
Color Group Options… Параметри колірної групи…
|
||||
Unicode Unicode
|
||||
Unicode (UTF-16) Unicode (UTF-16)
|
||||
Unicode (UTF-8) Unicode (UTF-8)
|
||||
@@ -5143,6 +5145,7 @@ liquify-list-end {0}, {1} {0} і {1}
|
||||
@msg a freeform gradient keeps at least one point довільний градієнт зберігає як мінімум одну точку
|
||||
@msg a gradient needs at least two stops градієнту потрібні як мінімум дві точки переходу
|
||||
@msg a graphic style named `{to}` already exists графічний стиль з ім’ям `{to}` вже існує
|
||||
@msg a swatch or color group named `{name}` already exists зразок або колірна група з ім’ям `{name}` вже існує
|
||||
@msg a key object sits on that point у цій точці розташований ключовий об’єкт
|
||||
@msg a page is missing сторінка відсутня
|
||||
@msg a page out of range сторінка поза діапазоном
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4784,6 +4784,8 @@ mark-style Japanese Kiểu Nhật
|
||||
Unembed… Bỏ nhúng…
|
||||
Ungroup Bỏ nhóm
|
||||
Ungroup Color Group Bỏ nhóm màu
|
||||
Color Group Options Tùy chọn nhóm màu
|
||||
Color Group Options… Tùy chọn nhóm màu…
|
||||
Unicode Unicode
|
||||
Unicode (UTF-16) Unicode (UTF-16)
|
||||
Unicode (UTF-8) Unicode (UTF-8)
|
||||
@@ -5126,6 +5128,9 @@ theme Appearance Giao diện
|
||||
@msg a freeform gradient keeps at least one point chuyển sắc tự do cần giữ ít nhất một điểm
|
||||
@msg a gradient needs at least two stops chuyển sắc cần ít nhất hai điểm dừng
|
||||
@msg a graphic style named `{to}` already exists đã có kiểu đồ họa tên `{to}`
|
||||
@msg a swatch or color group named `{name}` already exists đã có mẫu màu hoặc nhóm màu tên `{name}`
|
||||
@msg missing `group` thiếu `group`
|
||||
@msg no colour group `{group}` không có nhóm màu `{group}`
|
||||
@msg a key object sits on that point có đối tượng khóa nằm trên điểm đó
|
||||
@msg a layer couldn't be read một lớp không thể đọc được
|
||||
@msg a page is missing thiếu một trang
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4171,6 +4171,8 @@ digits Malayalam 马拉雅拉姆数字
|
||||
Unembed… 取消嵌入…
|
||||
Ungroup 取消编组
|
||||
Ungroup Color Group 取消编组颜色组
|
||||
Color Group Options 颜色组选项
|
||||
Color Group Options… 颜色组选项…
|
||||
Unicode Unicode
|
||||
Unicode (UTF-16) Unicode (UTF-16)
|
||||
Unicode (UTF-8) Unicode (UTF-8)
|
||||
@@ -4858,6 +4860,7 @@ imageTrace Outline 轮廓
|
||||
@msg select a stroke with a variable width 请选择一个宽度可变的描边
|
||||
@msg the selected stroke's profile is already listed as {_1} 所选描边的配置文件已列为 {_1}
|
||||
@msg a graphic style named `{to}` already exists 名为 `{to}` 的图形样式已存在
|
||||
@msg a swatch or color group named `{name}` already exists 名为 `{name}` 的色板或颜色组已存在
|
||||
@msg no graphic style `{name}` 没有图形样式 `{name}`
|
||||
@msg node {_1} is not text 节点 {_1} 不是文字
|
||||
@msg node {_1} is on a locked artboard 节点 {_1} 位于已锁定的画板上
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -2299,6 +2299,7 @@ file-filter Templates 範本
|
||||
@msg select a stroke with a variable width 請選取寬度可變的筆畫
|
||||
@msg the selected stroke's profile is already listed as {_1} 所選筆畫的描述檔已列為 {_1}
|
||||
@msg a graphic style named `{to}` already exists 名為 `{to}` 的繪圖樣式已存在
|
||||
@msg a swatch or color group named `{name}` already exists 名為 `{name}` 的色票或顏色群組已存在
|
||||
@msg no graphic style `{name}` 沒有繪圖樣式 `{name}`
|
||||
@msg node {_1} is not text 節點 {_1} 不是文字
|
||||
@msg node {_1} is on a locked artboard 節點 {_1} 位於已鎖定的工作區域上
|
||||
@@ -5618,6 +5619,8 @@ digits Malayalam 馬來亞拉姆數字
|
||||
Unembed… 取消嵌入…
|
||||
Ungroup 解散群組
|
||||
Ungroup Color Group 解散顏色群組
|
||||
Color Group Options 顏色群組選項
|
||||
Color Group Options… 顏色群組選項…
|
||||
Unicode Unicode
|
||||
Unicode (UTF-16) Unicode (UTF-16)
|
||||
Unicode (UTF-8) Unicode (UTF-8)
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -794,6 +794,7 @@ fn run_ui_part7(app: &mut VectorcraftApp, id: &str, p: &Value) -> Option<Result<
|
||||
let names = p.get("swatches").and_then(Value::as_array).map(|a| a.iter().filter_map(Value::as_str).map(str::to_string).collect());
|
||||
crate::dialogs::new_color_group::open(app, names.unwrap_or_default())
|
||||
}
|
||||
"ui.colorGroupOptions" => crate::dialogs::color_group_options::open(app, p),
|
||||
"ui.colorPicker" => crate::dialogs::open_color_picker(app, p),
|
||||
"ui.sampleScreenColor" => crate::screen_color::start(app, p),
|
||||
"ui.graphicStyleOptions" => crate::dialogs::graphic_style_options::open(app, s("name").as_deref()),
|
||||
|
||||
@@ -281,7 +281,7 @@ pub fn enabled(app: &VectorcraftApp, id: &str) -> bool {
|
||||
}
|
||||
"ui.missingFontsDialog" => !cfg!(target_arch = "wasm32") && app.session.active().is_some(),
|
||||
"ui.findFontsInFolder" => crate::picks::can(app, &crate::picks::PickRequest::Folder) && app.session.active().is_some(),
|
||||
"ui.swatchOptions" | "ui.newSwatch" | "ui.newColorGroup" => app.session.active().is_some(),
|
||||
"ui.swatchOptions" | "ui.newSwatch" | "ui.newColorGroup" | "ui.colorGroupOptions" => app.session.active().is_some(),
|
||||
"ui.graphicStyleOptions" | "ui.charStyleOptions" | "ui.paraStyleOptions" | "ui.newCharStyle" | "ui.newParaStyle" => {
|
||||
app.session.active().is_some()
|
||||
}
|
||||
|
||||
@@ -1003,6 +1003,12 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[
|
||||
"",
|
||||
"{swatches?: [names]} open New Color Group, from those swatches or the selected artwork (dialog `newColorGroup`, engine: swatch.newGroup)",
|
||||
),
|
||||
(
|
||||
"ui.colorGroupOptions",
|
||||
"Color Group Options…",
|
||||
"",
|
||||
"{group?} open Color Group Options for that color group, or without group for the color group selected alone in the Swatches panel (dialog `colorGroupOptions`, field `name`): OK renames the group (engine: swatch.renameGroup); a name that is empty or that another color group or a swatch has keeps the dialog open; when another document is active, or the color group at the group's place in the list no longer has the name and swatches it opened with, OK closes the dialog and renames nothing",
|
||||
),
|
||||
(
|
||||
"ui.colorPicker",
|
||||
"Color Picker…",
|
||||
|
||||
@@ -325,8 +325,8 @@ pub(crate) fn after_command(app: &mut VectorcraftApp, id: &str, params: &Value,
|
||||
/// replied `reply` in its document, or `None` when the command may have removed it or made it a
|
||||
/// process color: Swatch Options making it a process color, Delete Swatch naming it or its group,
|
||||
/// Merge Swatches merging it into another and Edit Color Group leaving it out of its group.
|
||||
/// `group` follows the step: New Color Group, Move Swatch, Edit Color Group and Ungroup Color
|
||||
/// Group.
|
||||
/// `group` follows the step: New Color Group, Move Swatch, Edit Color Group, Ungroup Color Group
|
||||
/// and Color Group Options.
|
||||
fn follow_step(id: &str, p: &Value, reply: &Value, name: String, group: &mut Option<String>) -> Option<String> {
|
||||
let ours = |v: &Value| v == name.as_str();
|
||||
let in_group = |key: &str| group.as_deref().is_some_and(|g| p[key] == g);
|
||||
@@ -346,6 +346,7 @@ fn follow_step(id: &str, p: &Value, reply: &Value, name: String, group: &mut Opt
|
||||
let moved = match id {
|
||||
"swatch.newGroup" | "swatch.editGroup" if members("swatches") => Some(reply["name"].as_str().map(str::to_string)),
|
||||
"swatch.ungroup" if in_group("name") => Some(None),
|
||||
"swatch.renameGroup" if in_group("group") => Some(reply["name"].as_str().map(str::to_string)),
|
||||
"swatch.move" if ours(&p["name"]) || p["names"].as_array().is_some_and(|a| a.iter().any(ours)) => {
|
||||
Some(p["group"].as_str().map(str::to_string))
|
||||
}
|
||||
@@ -1566,8 +1567,8 @@ mod tests {
|
||||
assert!(linked(&app, &ctx));
|
||||
}
|
||||
|
||||
/// Deleting the color group that holds the spot color base's swatch ends the link; an Edit
|
||||
/// Color Group that keeps it does not.
|
||||
/// Deleting the color group that holds the spot color base's swatch ends the link, also under
|
||||
/// a name Color Group Options gave it; an Edit Color Group that keeps it does not.
|
||||
#[test]
|
||||
fn a_deleted_color_group_ends_the_link() {
|
||||
let mut app = spot_app(1.0);
|
||||
@@ -1599,6 +1600,16 @@ mod tests {
|
||||
]);
|
||||
app.run("command.batch", json!({"commands": steps})).unwrap();
|
||||
assert!(!linked(&app, &ctx), "moved into a group that was deleted");
|
||||
// Its group renamed by Color Group Options and deleted under the new name in the same batch.
|
||||
relink(&mut app);
|
||||
let steps = json!([
|
||||
{"command": "swatch.newGroup", "params": {"name": "Spots", "swatches": ["Ink"]}},
|
||||
{"command": "swatch.renameGroup", "params": {"group": "Spots", "name": "Spot Inks"}},
|
||||
{"command": "swatch.delete", "params": {"names": ["Spot Inks"]}},
|
||||
{"command": "swatch.new", "params": {"name": "Ink", "color": "#669933", "spot": true}},
|
||||
]);
|
||||
app.run("command.batch", json!({"commands": steps})).unwrap();
|
||||
assert!(!linked(&app, &ctx), "its group renamed, then deleted");
|
||||
// Edit Color Group that keeps it, with a new group name, keeps the link.
|
||||
relink(&mut app);
|
||||
app.run("swatch.newGroup", json!({"name": "Spots", "swatches": ["Ink"]})).unwrap();
|
||||
|
||||
@@ -212,6 +212,89 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) {
|
||||
body(app, ui, TILE);
|
||||
}
|
||||
|
||||
/// The color group selected alone in the panel (what Color Group Options opens on), if any.
|
||||
pub(crate) fn sole_selected_group(app: &VectorcraftApp) -> Option<String> {
|
||||
let (ctx, st) = (app.ui_ctx.as_ref()?, app.session.active()?);
|
||||
if !body::selection_is_current(app, ctx) {
|
||||
return None;
|
||||
}
|
||||
let mut sel: Vec<String> = pstate(ctx, "swatch-selected");
|
||||
sel.retain(|n| n == REGISTRATION || st.doc.swatch_name_taken(n));
|
||||
actions::sole_group(app, &sel)
|
||||
}
|
||||
|
||||
/// Command `id` ran with `params` and replied `reply`: a color group that `swatch.renameGroup`
|
||||
/// or `swatch.editGroup` renamed stays selected in the panel under its new name, and Shift-click still extends the
|
||||
/// selection from it. Ungroup Color Group and Delete Swatch take the names they removed out of the
|
||||
/// selection, so a group that later takes such a name is not selected in its place. The steps of a
|
||||
/// `command.batch` are followed in order up to the first step that is not one of [`KEEPS_GROUPS`]:
|
||||
/// such a step may switch documents or replace a group, and the selection stays as it is from there.
|
||||
pub(crate) fn after_command(ctx: &egui::Context, id: &str, params: &Value, reply: &Value) {
|
||||
let rename = |old: &str, new: Option<&str>| {
|
||||
let mut sel: Vec<String> = pstate(ctx, "swatch-selected");
|
||||
match new {
|
||||
Some(new) => sel.iter_mut().filter(|n| *n == old).for_each(|n| *n = new.to_string()),
|
||||
None => sel.retain(|n| n != old),
|
||||
}
|
||||
set_pstate(ctx, "swatch-selected", sel);
|
||||
if pstate::<String>(ctx, "swatch-anchor") == old {
|
||||
set_pstate(ctx, "swatch-anchor", new.unwrap_or_default().to_string());
|
||||
}
|
||||
};
|
||||
match id {
|
||||
"swatch.renameGroup" | "swatch.editGroup" => {
|
||||
if let (Some(old), Some(new)) = (params["group"].as_str(), reply["name"].as_str()) {
|
||||
rename(old, Some(new));
|
||||
}
|
||||
}
|
||||
"swatch.ungroup" => {
|
||||
if let Some(name) = params["name"].as_str() {
|
||||
rename(name, None);
|
||||
}
|
||||
}
|
||||
"swatch.delete" => {
|
||||
let names = params["names"].as_array().map(Vec::as_slice).unwrap_or_default();
|
||||
for name in names.iter().chain(std::iter::once(¶ms["name"])).filter_map(Value::as_str) {
|
||||
rename(name, None);
|
||||
}
|
||||
}
|
||||
"command.batch" => {
|
||||
let steps = params["commands"].as_array().map(Vec::as_slice).unwrap_or_default();
|
||||
let results = reply["results"].as_array().map(Vec::as_slice).unwrap_or_default();
|
||||
for (step, r) in steps.iter().zip(results) {
|
||||
let id = step["command"].as_str().unwrap_or_default();
|
||||
if !KEEPS_GROUPS.contains(&id) {
|
||||
break;
|
||||
}
|
||||
after_command(ctx, id, &step["params"], r);
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
/// The batch steps the panel's selection follows: they act on the active document only, and
|
||||
/// remove no color group except the ones they name.
|
||||
const KEEPS_GROUPS: &[&str] = &[
|
||||
"swatch.renameGroup",
|
||||
"swatch.ungroup",
|
||||
"swatch.delete",
|
||||
"swatch.new",
|
||||
"swatch.newGroup",
|
||||
"swatch.edit",
|
||||
"swatch.move",
|
||||
"swatch.merge",
|
||||
"swatch.duplicate",
|
||||
"swatch.addUsedColors",
|
||||
"swatch.sortByKind",
|
||||
"swatch.sortByName",
|
||||
"swatch.editGroup",
|
||||
"swatch.spotOptions",
|
||||
"swatch.setSpot",
|
||||
"swatch.list",
|
||||
"swatch.unused",
|
||||
];
|
||||
|
||||
/// Item actions target the clicked swatch, independently of the paint or other selected chips.
|
||||
fn item_context_menu(app: &mut VectorcraftApp, ui: &Ui, resp: &Response, e: &Entry) {
|
||||
if e.is_folder() {
|
||||
|
||||
@@ -34,6 +34,14 @@ pub(super) fn selected_group(app: &VectorcraftApp, sel: &[String]) -> Option<Str
|
||||
sel.iter().find(|n| d.swatch_groups.iter().any(|g| g.name == **n)).cloned()
|
||||
}
|
||||
|
||||
/// The selected color group when it is the whole selection (Color Group Options).
|
||||
pub(super) fn sole_group(app: &VectorcraftApp, sel: &[String]) -> Option<String> {
|
||||
match sel {
|
||||
[_] => selected_group(app, sel),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
/// Edit or Apply Color Group: Recolor Artwork on colour group `group` (and the selected art).
|
||||
pub(super) fn edit_group(app: &mut VectorcraftApp, group: &str) {
|
||||
app.run("ui.recolorDialog", json!({ "group": group })).ok();
|
||||
@@ -253,6 +261,12 @@ pub fn menu(app: &mut VectorcraftApp, ui: &mut Ui) {
|
||||
{
|
||||
app.run("swatch.ungroup", json!({ "name": g })).ok();
|
||||
}
|
||||
let sole = sole_group(app, &selected);
|
||||
if menu_item(ui, tl!("Color Group Options…"), sole.is_some(), false)
|
||||
&& let Some(g) = sole
|
||||
{
|
||||
app.run("ui.colorGroupOptions", json!({ "group": g })).ok();
|
||||
}
|
||||
if menu_item(ui, tl!("Select All Unused"), true, false)
|
||||
&& let Ok(r) = app.run("swatch.unused", json!({}))
|
||||
{
|
||||
|
||||
@@ -197,6 +197,14 @@ pub(super) fn focus_swatch(app: &VectorcraftApp, ui: &Ui, active: Option<&str>)
|
||||
active.filter(|_| changed).map(str::to_string)
|
||||
}
|
||||
|
||||
/// Whether the panel's selection is still the one it showed last: neither another document nor
|
||||
/// other art has been selected since, which [`focus_swatch`] clears it for on the next frame.
|
||||
pub(super) fn selection_is_current(app: &VectorcraftApp, ctx: &egui::Context) -> bool {
|
||||
let art: Option<SelectedArt> = app.session.active().map(|st| (st.uid, st.selection.objects.iter().map(|id| id.0).collect()));
|
||||
let (last_art, _): (Option<Option<SelectedArt>>, Option<String>) = pstate(ctx, "swatch-focus");
|
||||
last_art.is_none_or(|l| l == art)
|
||||
}
|
||||
|
||||
/// The swatch the active paint comes from: a linked colour's global swatch (a tint's tint swatch
|
||||
/// when there is one), a process colour's swatch of that colour (a colour no swatch has: none, so
|
||||
/// text in a colour of its own highlights nothing), a gradient's gradient swatch, or None; nothing
|
||||
|
||||
@@ -1652,6 +1652,140 @@ fn click_menu_item(app: &mut VectorcraftApp, ctx: &egui::Context, label: &str) {
|
||||
menu_frame(app, ctx, vec![button(false)]);
|
||||
}
|
||||
|
||||
/// The panel menu's Color Group Options… opens on the selected color group when that group is the
|
||||
/// whole selection; with nothing selected, a swatch alone, or a swatch or a second group beside the
|
||||
/// group, it opens nothing. After OK, and after `swatch.renameGroup` run on its own or in a batch,
|
||||
/// the group stays selected under its new name.
|
||||
#[test]
|
||||
fn color_group_options_opens_on_a_sole_selected_group() {
|
||||
let mut app = app();
|
||||
let ctx = context();
|
||||
for sel in [vec![], vec!["Red"], vec!["Brights", "Red"], vec!["Brights", "Grays"]] {
|
||||
set_pstate(&ctx, "swatch-selected", sel.iter().map(|s| s.to_string()).collect::<Vec<_>>());
|
||||
click_menu_item(&mut app, &ctx, "Color Group Options…");
|
||||
assert!(app.ui.dialog.is_none(), "{sel:?}");
|
||||
}
|
||||
set_pstate(&ctx, "swatch-selected", vec!["Grays".to_string()]);
|
||||
click_menu_item(&mut app, &ctx, "Color Group Options…");
|
||||
let d = app.ui.dialog.as_ref().expect("Color Group Options opens");
|
||||
assert_eq!((d.kind.as_str(), d.str("__group").as_str()), (crate::dialogs::color_group_options::KIND, "Grays"));
|
||||
// OK keeps the renamed group selected, so the item opens on it again.
|
||||
app.ui_ctx = Some(ctx.clone());
|
||||
set_pstate(&ctx, "swatch-anchor", "Grays".to_string());
|
||||
app.ui.dialog.as_mut().unwrap().fields.insert("name".into(), json!("Neutrals"));
|
||||
crate::dialogs::confirm(&mut app).unwrap();
|
||||
assert_eq!(selected(&ctx), ["Neutrals"]);
|
||||
assert_eq!(pstate::<String>(&ctx, "swatch-anchor"), "Neutrals", "Shift-click extends from the renamed group");
|
||||
click_menu_item(&mut app, &ctx, "Color Group Options…");
|
||||
assert_eq!(app.ui.dialog.as_ref().map(|d| d.str("__group")).as_deref(), Some("Neutrals"));
|
||||
crate::dialogs::cancel(&mut app);
|
||||
// The command run on its own, and as batch steps, keeps the selection the same way.
|
||||
app.run("swatch.renameGroup", json!({"group": "Neutrals", "name": "Stone"})).unwrap();
|
||||
assert_eq!((selected(&ctx), pstate::<String>(&ctx, "swatch-anchor")), (vec!["Stone".to_string()], "Stone".to_string()));
|
||||
let steps = json!([
|
||||
{"command": "swatch.renameGroup", "params": {"group": "Stone", "name": "Slate"}},
|
||||
{"command": "swatch.renameGroup", "params": {"group": "Slate", "name": "Ash"}},
|
||||
]);
|
||||
app.run("command.batch", json!({"commands": steps})).unwrap();
|
||||
assert_eq!((selected(&ctx), pstate::<String>(&ctx, "swatch-anchor")), (vec!["Ash".to_string()], "Ash".to_string()));
|
||||
}
|
||||
|
||||
/// Color Group Options from the command palette (no `group`) opens on the color group selected
|
||||
/// alone in the panel; without one it opens nothing and reports the missing group.
|
||||
#[test]
|
||||
fn color_group_options_without_a_group_opens_on_the_selected_group() {
|
||||
let mut app = app();
|
||||
let ctx = context();
|
||||
app.ui_ctx = Some(ctx.clone());
|
||||
for sel in [vec![], vec!["Red"], vec!["Brights", "Grays"]] {
|
||||
set_pstate(&ctx, "swatch-selected", sel.iter().map(|s| s.to_string()).collect::<Vec<_>>());
|
||||
assert!(app.run("ui.colorGroupOptions", json!({})).is_err() && app.ui.dialog.is_none(), "{sel:?}");
|
||||
}
|
||||
set_pstate(&ctx, "swatch-selected", vec!["Grays".to_string()]);
|
||||
app.run("ui.colorGroupOptions", json!({})).unwrap();
|
||||
assert_eq!(app.ui.dialog.as_ref().map(|d| d.str("__group")).as_deref(), Some("Grays"));
|
||||
crate::dialogs::cancel(&mut app);
|
||||
// The panel showed the selection in this document; another document made active since then
|
||||
// does not take it.
|
||||
let uid = app.session.active().unwrap().uid;
|
||||
set_pstate(&ctx, "swatch-focus", (Some(Some((uid, Vec::<u64>::new()))), None::<String>));
|
||||
app.run("ui.colorGroupOptions", json!({})).unwrap();
|
||||
crate::dialogs::cancel(&mut app);
|
||||
app.run("file.new", json!({"width": 200, "height": 200})).unwrap();
|
||||
assert!(app.run("ui.colorGroupOptions", json!({})).is_err() && app.ui.dialog.is_none(), "another document");
|
||||
}
|
||||
|
||||
/// Renames in a batch move the selection to another group neither after an Ungroup of the
|
||||
/// selected group nor in another document; a batch step that keeps the groups (Sort by Kind) does
|
||||
/// not stop the selection from following a rename, and Delete Swatch on the group ends it.
|
||||
#[test]
|
||||
fn a_batch_moves_the_selection_only_with_its_group() {
|
||||
let mut app = app();
|
||||
let ctx = context();
|
||||
app.ui_ctx = Some(ctx.clone());
|
||||
let select = |sel: &str| {
|
||||
set_pstate(&ctx, "swatch-selected", vec![sel.to_string()]);
|
||||
set_pstate(&ctx, "swatch-anchor", sel.to_string());
|
||||
};
|
||||
select("Brights");
|
||||
let steps = json!([
|
||||
{"command": "swatch.ungroup", "params": {"name": "Brights"}},
|
||||
{"command": "swatch.renameGroup", "params": {"group": "Grays", "name": "Brights"}},
|
||||
{"command": "swatch.renameGroup", "params": {"group": "Brights", "name": "Vivid"}},
|
||||
]);
|
||||
app.run("command.batch", json!({"commands": steps})).unwrap();
|
||||
assert_eq!((selected(&ctx), pstate::<String>(&ctx, "swatch-anchor")), (Vec::<String>::new(), String::new()), "Ungroup ends the selection");
|
||||
// A step that keeps the groups, then a rename of the selected group.
|
||||
select("Vivid");
|
||||
let steps = json!([
|
||||
{"command": "swatch.sortByKind", "params": {}},
|
||||
{"command": "swatch.renameGroup", "params": {"group": "Vivid", "name": "Bold"}},
|
||||
]);
|
||||
app.run("command.batch", json!({"commands": steps})).unwrap();
|
||||
assert_eq!((selected(&ctx), pstate::<String>(&ctx, "swatch-anchor")), (vec!["Bold".to_string()], "Bold".to_string()));
|
||||
app.run("swatch.delete", json!({"name": "Bold"})).unwrap();
|
||||
assert_eq!((selected(&ctx), pstate::<String>(&ctx, "swatch-anchor")), (Vec::<String>::new(), String::new()), "Delete Swatch ends the selection");
|
||||
// Brights selected in one new document, renamed in another.
|
||||
for _ in 0..2 {
|
||||
app.run("file.new", json!({"width": 200, "height": 200})).unwrap();
|
||||
}
|
||||
app.run("document.activate", json!({"index": 1})).unwrap();
|
||||
select("Brights");
|
||||
let steps = json!([
|
||||
{"command": "document.activate", "params": {"index": 2}},
|
||||
{"command": "swatch.renameGroup", "params": {"group": "Brights", "name": "Vivid"}},
|
||||
{"command": "document.activate", "params": {"index": 1}},
|
||||
]);
|
||||
app.run("command.batch", json!({"commands": steps})).unwrap();
|
||||
assert_eq!((selected(&ctx), pstate::<String>(&ctx, "swatch-anchor")), (vec!["Brights".to_string()], "Brights".to_string()));
|
||||
}
|
||||
|
||||
/// Sort by Name keeps the groups, so a rename after it in a batch still moves the selection, and
|
||||
/// Edit Color Group's `rename` moves it as Color Group Options does, alone or in a batch.
|
||||
#[test]
|
||||
fn the_selection_follows_sorting_and_group_edits() {
|
||||
let mut app = app();
|
||||
let ctx = context();
|
||||
app.ui_ctx = Some(ctx.clone());
|
||||
set_pstate(&ctx, "swatch-selected", vec!["Brights".to_string()]);
|
||||
set_pstate(&ctx, "swatch-anchor", "Brights".to_string());
|
||||
let follows = |name: &str| (vec![name.to_string()], name.to_string());
|
||||
let steps = json!([
|
||||
{"command": "swatch.sortByName", "params": {}},
|
||||
{"command": "swatch.renameGroup", "params": {"group": "Brights", "name": "Vivid"}},
|
||||
]);
|
||||
app.run("command.batch", json!({"commands": steps})).unwrap();
|
||||
assert_eq!((selected(&ctx), pstate::<String>(&ctx, "swatch-anchor")), follows("Vivid"), "Sort by Name");
|
||||
app.run("swatch.editGroup", json!({"group": "Vivid", "colors": ["#ff0000"], "rename": "Bold"})).unwrap();
|
||||
assert_eq!((selected(&ctx), pstate::<String>(&ctx, "swatch-anchor")), follows("Bold"), "Edit Color Group");
|
||||
let steps = json!([
|
||||
{"command": "swatch.editGroup", "params": {"group": "Bold", "colors": ["#00ff00"], "rename": "Loud"}},
|
||||
{"command": "swatch.renameGroup", "params": {"group": "Loud", "name": "Calm"}},
|
||||
]);
|
||||
app.run("command.batch", json!({"commands": steps})).unwrap();
|
||||
assert_eq!((selected(&ctx), pstate::<String>(&ctx, "swatch-anchor")), follows("Calm"), "Edit Color Group in a batch");
|
||||
}
|
||||
|
||||
/// The panel menu's Show Recent Colors hides and shows the panel's Recent Colors row (#6617):
|
||||
/// checked by default, applied colors still join the list while the row is hidden, and the Color
|
||||
/// panel keeps its own row and setting.
|
||||
|
||||
@@ -150,7 +150,11 @@ those rows with `layer.delete` in the document the question was asked in. `layer
|
||||
New swatches and colour groups: `ui.newSwatch {spot?, global?, group?}` opens the `newSwatch` dialog prefilled from the active
|
||||
fill or stroke (fields as in `swatchOptions` plus `group`; a gradient or pattern only takes `name`) and
|
||||
`ui.newColorGroup {swatches?}` opens `newColorGroup` (fields `name`, `fromArtwork`, `toGlobal`, `includeTints`,
|
||||
`swatches`); `ui.dialog.confirm` runs `swatch.new` / `swatch.newGroup`.
|
||||
`swatches`); `ui.dialog.confirm` runs `swatch.new` / `swatch.newGroup`. `ui.colorGroupOptions {group?}` opens
|
||||
`colorGroupOptions` (fields `name`, `__group`, `__swatches`, `__index` and `__doc`) for `group`, or without it for the
|
||||
color group selected alone in the Swatches panel; its `ui.dialog.confirm` runs `swatch.renameGroup`. A refused name keeps
|
||||
the dialog open; when another document is active, or the color group at the group's place in the list no longer has the
|
||||
name and swatches it opened with, the confirm closes the dialog and renames nothing.
|
||||
|
||||
The Color Picker is a dialog too: `engine.execute {command: "ui.colorPicker", params: {stroke?, color?}}` opens it for the fill (or stroke) proxy; `ui.dialog.set {field: "hex", value: "00FF00"}` (or `color`, `channel`, `webOnly`, `swatches`) then `ui.dialog.confirm` applies the colour through `paint.setFill` / `paint.setStroke`.
|
||||
|
||||
|
||||
+3
-1
@@ -1104,7 +1104,9 @@ in the app runs `paint.setFill` (or `paint.setStroke`, the active proxy) with `i
|
||||
The Swatches panel menu's commands: `swatch.addUsedColors {selection?, global?}`, `swatch.unused` (a query: the
|
||||
names Select All Unused selects; a spot swatch counts as used while an image placed from a DCS file has a plate of
|
||||
its ink), `swatch.merge {names}` (the first is kept; gradient stops linked to the others drop their process
|
||||
plates), `swatch.ungroup {name}` and
|
||||
plates), `swatch.ungroup {name}`, `swatch.renameGroup {group, name}` (Color Group Options: renames the group alone
|
||||
in one undo step; the name is trimmed, and a name that is empty or that another color group or a swatch has is an
|
||||
error; the group's own name records no undo step, and a drag still in progress becomes an undo step of its own first) and
|
||||
`swatch.sortByKind`.
|
||||
`brush.move {name | names, to?, type?}` reorders brushes among the brushes of their type, as dragging one onto
|
||||
another of its type in the Brushes panel does. `to` is an index among the brushes of that type in `brush.list`
|
||||
|
||||
@@ -1888,6 +1888,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
|
||||
Editing, renaming, deleting or merging a global swatch also changes the colors linked to it in graph designs, the art of brushes and the tile that pattern editing's Cancel puts back, in the same undo step as the rest of the art; Default Swatches with replace unlinks them there too.
|
||||
A swatch step in `command.batch` (Delete, Swatch Options, Merge, Edit Color Group) changes the fill and stroke for new art as the command run on its own does, so art drawn later in the batch or after it takes the same paint; a batch that fails, and a canceled batch preview, put back the paints it started with, and a canceled Swatch Options preview leaves them as they were. These swatch commands also change the fills and strokes of the appearance new art takes, and Undo and Redo of the command or the batch put the paints for new art back with the swatches. Spot Colors options (`swatch.spotOptions`) and Default Swatches with replace (`swatch.resetDefaults {replace: true}`) as `command.batch` steps also change the fill and stroke for new art as each command run on its own does: a fill or stroke linked to a Lab spot swatch keeps its link and tint and takes the Lab values or their CMYK equivalent, and one linked to a swatch the replace removes keeps its color and loses the link. Evidence: `swatch_steps_in_a_batch_change_the_new_art_paints_as_commands_do`, `spot_colors_options_in_a_batch_change_the_new_art_paints_as_the_command_does`, `default_swatches_replace_in_a_batch_unlinks_the_new_art_paints_as_the_command_does`, `undo_and_redo_of_a_swatch_edit_put_back_the_new_art_paints`, `swatch_edits_reach_the_paints_of_the_new_art_template`, `a_failed_batch_puts_back_the_new_art_paints_a_swatch_step_changed` and `canceling_a_swatch_options_preview_keeps_the_new_art_paints` in `crates/engine/src/tests/swatches.rs`.
|
||||
Add Used Colors (`swatch.addUsedColors`) and Select All Unused (`swatch.unused`) look colors, swatch names, links, tints and gradients up in hash sets instead of searching every swatch and color for each color or linked paint (New Color Group from artwork too), and New Swatch with several colors (`swatch.new`), New Color Group (`swatch.newGroup`) and Edit Color Group (`swatch.editGroup`) name their new swatches from one set of the names already taken. The new swatches keep their names, order and links, and Select All Unused lists the same swatches. Evidence: `add_used_colors_adds_each_new_color_once_with_free_names`, `add_used_colors_global_links_every_paint_of_a_new_color`, `unused_matches_links_tints_colors_gradients_and_patterns_exactly`, `new_swatches_from_colors_are_numbered_after_names_already_taken`, `new_color_group_numbers_its_colors_after_the_group_and_its_moved_swatches`, `new_color_group_from_artwork_lists_each_color_once_with_free_names` and `edit_color_group_numbers_extra_colors_after_the_names_it_keeps` in `crates/engine/src/tests/swatchcmds.rs`; `free_swatch_names_match_naming_each_swatch_as_it_is_added` and `free_swatch_names_match_new_swatch_names_as_swatches_are_added` in `crates/doc/src/swatches.rs`.
|
||||
Color Group Options… in the Swatches panel menu names the selected color group: its dialog shows the group's name in a Name field, and OK renames the group (`swatch.renameGroup`, `ui.colorGroupOptions`) while its swatches, their colors and the art linked to them stay as they are ([help page](https://helpx.adobe.com/illustrator/desktop/manage-colors/learn-color-basics/create-color-groups-in-the-color-guide-panel.html)). VectorCraft's own rules: the item is available only when that one group is the whole panel selection; the name is trimmed; a name that is empty or that another color group or a swatch has (swatches and groups share one set of names) is an error and keeps the dialog open; a rename is one undo step, and the group's own name records none. Double-clicking a group's folder and the options button still open Edit or Apply Color Group. Evidence: `rename_group_renames_only_the_group_in_one_undo_step` in `crates/engine/src/tests/swatchcmds.rs`, `renames_the_group_and_keeps_a_refused_name_open` in `crates/ui-egui/src/dialogs/color_group_options.rs` and `color_group_options_opens_on_a_sole_selected_group` in `crates/ui-egui/src/panels/swatches/tests.rs`.
|
||||
When Add Used Colors and New Color Group link the selected art's paints to global swatches, they look each selected object's groups and layer up in a set of the selected ids instead of searching the whole selection for each one, so linking 20,000 selected rectangles takes 16 ms of CPU time instead of 128 ms (`cargo run --release -p vectorcraft-engine --example link_colors_bench`). The same paints are linked, in the same order. Evidence: `mapping_within_ids_matches_a_search_of_the_ids` in `crates/doc/src/swatches.rs`.
|
||||
- **Colorized images (#1466):** a fill color applied to a selected grayscale or 1-bit image (`paint.setFill`) colorizes it with black, white, a process color or a spot color, and refuses a process color when the image has an alpha channel ([Convert color modes](https://web.archive.org/web/20251220223850/https://helpx.adobe.com/illustrator/desktop/manage-colors/select-and-adjust-colors/convert-color-modes.html), "Colorize Grayscale or 1-bit images"); black and white are accepted there too. The canvas draws each pixel in the color as far as the pixel is dark, with white pixels transparent; PDF export writes the image in the color (a spot color as its ink, Registration in every ink) with the image as its soft mask; Separations Preview and printed separations show it on its color's plates; native files keep the color. SVG writes the fill color through a coverage mask (or a colorized PNG in Tiny 1.2); EPS writes binary coverage as an image mask in the color's ink, and a grayscale image as ink samples scaled by coverage, with white pixels left out at Level 3 and gray midtones written over white.
|
||||
The prompt for deleting several swatches and groups uses the interface language's plural form for the count. Evidence: `deleting_several_swatches_uses_each_count_form` in `crates/ui-egui/src/panels/swatches/tests.rs`.
|
||||
|
||||
Reference in New Issue
Block a user