mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-16 07:11:00 +00:00
Color management: Assign Profile offers Don't Color Manage, the working space or a profile
The Assign rows of the Separations panel's Color Settings section (where Edit > Assign Profile... goes) offer the three choices of the help's "Assign or remove a color profile": Don't Color Manage This Document, the working space of the document's color mode with its name, and Profile with the other profiles of that kind. The rows act on the profile of the document's color mode, so an RGB document's RGB profile can be assigned here; before, the row always set the CMYK profile. Picking the working space assigns its profile, which stays when the working space changes later. A choice the document already has runs nothing, and the other model's profile stays as it is. Params text, docs/mcp.md and the evidence line in docs/target-app-parity.md are updated, with catalog rows for the new labels.
This commit is contained in:
@@ -64,7 +64,7 @@ pub fn specs() -> Vec<CommandSpec> {
|
||||
"Assign Profile…",
|
||||
["Edit"],
|
||||
None,
|
||||
"{rgb?: profile|null, cmyk?: profile|null} tag the document with profiles (color numbers are kept; null: the working space). Colors then show and convert through the profiles assigned; the working spaces stay as edit.colorSettings set them → {rgb, cmyk}",
|
||||
"{rgb?: profile|null, cmyk?: profile|null} tag the document with profiles (color numbers are kept; null: no profile, Don't Color Manage This Document, so colors show through the working space; the working space's name: that profile stays assigned when the working space changes). Colors then show and convert through the profiles assigned; the working spaces stay as edit.colorSettings set them → {rgb, cmyk}",
|
||||
has_doc,
|
||||
assign_profile
|
||||
),
|
||||
|
||||
@@ -3953,6 +3953,9 @@ digits Malayalam Малаялам
|
||||
Working CMYK Работен CMYK
|
||||
Working CMYK (don't tag) Работен CMYK (без етикет)
|
||||
Working RGB (don't tag) Работен RGB (без етикет)
|
||||
Don't Color Manage This Document Без управление на цветовете за този документ
|
||||
Working RGB: {name} Работен RGB: {name}
|
||||
Working CMYK: {name} Работен CMYK: {name}
|
||||
Workspace Работно пространство
|
||||
Workspace {i} Работно пространство {i}
|
||||
Wrinkle Tool Инструмент „Набръчкване“
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -2143,6 +2143,9 @@ digits Malayalam Malajalam
|
||||
Use Black Point Compensation Koristi kompenzaciju crne tačke
|
||||
Working CMYK (don't tag) Radni CMYK (bez oznake)
|
||||
Working RGB (don't tag) Radni RGB (bez oznake)
|
||||
Don't Color Manage This Document Ne upravljaj bojama ovog dokumenta
|
||||
Working RGB: {name} Radni RGB: {name}
|
||||
Working CMYK: {name} Radni CMYK: {name}
|
||||
{name} (spot) {name} (spot)
|
||||
Add to Profiles… Dodaj u profile…
|
||||
Align Stroke to Center Poravnaj potez po sredini
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -5152,6 +5152,9 @@ digits Malayalam Malaiàlam
|
||||
Working CMYK CMYK de treball
|
||||
Working CMYK (don't tag) CMYK de treball (sense etiquetar)
|
||||
Working RGB (don't tag) RGB de treball (sense etiquetar)
|
||||
Don't Color Manage This Document No gestionis el color d'aquest document
|
||||
Working RGB: {name} RGB de treball: {name}
|
||||
Working CMYK: {name} CMYK de treball: {name}
|
||||
Working RGB RGB de treball
|
||||
Workspace Espai de treball
|
||||
Workspace {i} Espai de treball {i}
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -2174,6 +2174,9 @@ digits Malayalam Malajálamské
|
||||
Use Black Point Compensation Použít kompenzaci černého bodu
|
||||
Working CMYK (don't tag) Pracovní CMYK (neoznačovat)
|
||||
Working RGB (don't tag) Pracovní RGB (neoznačovat)
|
||||
Don't Color Manage This Document Nespravovat barvy tohoto dokumentu
|
||||
Working RGB: {name} Pracovní RGB: {name}
|
||||
Working CMYK: {name} Pracovní CMYK: {name}
|
||||
{name} (spot) {name} (přímá)
|
||||
Add to Profiles… Přidat do profilů…
|
||||
Align Stroke to Center Zarovnat tah na střed
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -2583,6 +2583,9 @@ digits Malayalam Malayalam
|
||||
Use Black Point Compensation Brug sortpunktskompensation
|
||||
Working CMYK (don't tag) Arbejds-CMYK (mærk ikke)
|
||||
Working RGB (don't tag) Arbejds-RGB (mærk ikke)
|
||||
Don't Color Manage This Document Farvestyr ikke dette dokument
|
||||
Working RGB: {name} Arbejds-RGB: {name}
|
||||
Working CMYK: {name} Arbejds-CMYK: {name}
|
||||
{name} (spot) {name} (spotfarve)
|
||||
Add to Profiles… Tilføj til profiler…
|
||||
Align Stroke to Center Justér kontur til midten
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -3963,6 +3963,9 @@ effect Points Punkte
|
||||
Working CMYK CMYK-Arbeitsfarbraum
|
||||
Working CMYK (don't tag) CMYK-Arbeitsfarbraum (nicht kennzeichnen)
|
||||
Working RGB (don't tag) RGB-Arbeitsfarbraum (nicht kennzeichnen)
|
||||
Don't Color Manage This Document Kein Farbmanagement für dieses Dokument
|
||||
Working RGB: {name} RGB-Arbeitsfarbraum: {name}
|
||||
Working CMYK: {name} CMYK-Arbeitsfarbraum: {name}
|
||||
Workspace Arbeitsbereich
|
||||
Workspace {i} Arbeitsbereich {i}
|
||||
Wrinkle Tool Zerknittern-Werkzeug
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4431,6 +4431,9 @@ digits Malayalam Μαλαγιάλαμ
|
||||
Width Tool Πλάτος (Width Tool)
|
||||
Working CMYK (don't tag) Χώρος εργασίας CMYK (χωρίς ετικέτα)
|
||||
Working RGB (don't tag) Χώρος εργασίας RGB (χωρίς ετικέτα)
|
||||
Don't Color Manage This Document Χωρίς διαχείριση χρωμάτων για αυτό το έγγραφο
|
||||
Working RGB: {name} Χώρος εργασίας RGB: {name}
|
||||
Working CMYK: {name} Χώρος εργασίας CMYK: {name}
|
||||
Workspace {i} Χώρος εργασίας {i}
|
||||
Wrinkle Tool Πτυχώσεις (Wrinkle Tool)
|
||||
Write Layers Εγγραφή επιπέδων
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4045,6 +4045,9 @@ digits Malayalam Malayálam
|
||||
Working CMYK CMYK de trabajo
|
||||
Working CMYK (don't tag) CMYK de trabajo (sin etiquetar)
|
||||
Working RGB (don't tag) RGB de trabajo (sin etiquetar)
|
||||
Don't Color Manage This Document No gestionar el color de este documento
|
||||
Working RGB: {name} RGB de trabajo: {name}
|
||||
Working CMYK: {name} CMYK de trabajo: {name}
|
||||
Workspace Espacio de trabajo
|
||||
Workspace {i} Espacio de trabajo {i}
|
||||
Wrinkle Tool Herramienta Arrugar
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -2135,6 +2135,9 @@ digits Malayalam Malajalam
|
||||
Use Black Point Compensation Käytä mustan pisteen kompensointia
|
||||
Working CMYK (don't tag) Työ-CMYK (ei tunnistetta)
|
||||
Working RGB (don't tag) Työ-RGB (ei tunnistetta)
|
||||
Don't Color Manage This Document Älä hallitse tämän asiakirjan värejä
|
||||
Working RGB: {name} Työ-RGB: {name}
|
||||
Working CMYK: {name} Työ-CMYK: {name}
|
||||
{name} (spot) {name} (spottiväri)
|
||||
Add to Profiles… Lisää profiileihin…
|
||||
Align Stroke to Center Tasaa viiva keskelle
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -4036,6 +4036,9 @@ digits Malayalam Malayalam
|
||||
Working CMYK CMJN de travail
|
||||
Working CMYK (don't tag) CMJN de travail (sans balise)
|
||||
Working RGB (don't tag) RVB de travail (sans balise)
|
||||
Don't Color Manage This Document Ne pas gérer les couleurs de ce document
|
||||
Working RGB: {name} RVB de travail : {name}
|
||||
Working CMYK: {name} CMJN de travail : {name}
|
||||
Workspace Espace de travail
|
||||
Workspace {i} Espace de travail {i}
|
||||
Wrinkle Tool Outil Fronces
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -5564,6 +5564,9 @@ antiAlias Sharp शार्प
|
||||
Working CMYK वर्किंग CMYK
|
||||
Working CMYK (don't tag) कार्य CMYK (टैग नहीं)
|
||||
Working RGB (don't tag) कार्य RGB (टैग नहीं)
|
||||
Don't Color Manage This Document इस दस्तावेज़ का रंग प्रबंधन न करें
|
||||
Working RGB: {name} कार्य RGB: {name}
|
||||
Working CMYK: {name} कार्य CMYK: {name}
|
||||
Working RGB वर्किंग RGB
|
||||
Workspace वर्कस्पेस
|
||||
Workspace {i} वर्कस्पेस {i}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4786,6 +4786,9 @@ mark-style Japanese Japán
|
||||
Working CMYK Munka-CMYK
|
||||
Working CMYK (don't tag) Munka-CMYK (címke nélkül)
|
||||
Working RGB (don't tag) Munka-RGB (címke nélkül)
|
||||
Don't Color Manage This Document Ne legyen színkezelés ebben a dokumentumban
|
||||
Working RGB: {name} Munka-RGB: {name}
|
||||
Working CMYK: {name} Munka-CMYK: {name}
|
||||
Working RGB Munka-RGB
|
||||
Workspace Munkaterület
|
||||
Workspace {i} Munkaterület {i}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -1974,6 +1974,9 @@ digits Malayalam Malayalam
|
||||
Use Black Point Compensation Gunakan kompensasi titik hitam
|
||||
Working CMYK (don't tag) CMYK kerja (tanpa tag)
|
||||
Working RGB (don't tag) RGB kerja (tanpa tag)
|
||||
Don't Color Manage This Document Jangan kelola warna dokumen ini
|
||||
Working RGB: {name} RGB kerja: {name}
|
||||
Working CMYK: {name} CMYK kerja: {name}
|
||||
{name} (spot) {name} (spot)
|
||||
Add to Profiles… Tambahkan ke profil…
|
||||
Align Stroke to Center Ratakan stroke ke tengah
|
||||
|
||||
|
@@ -4092,6 +4092,9 @@ digits Malayalam Malayalam
|
||||
Working CMYK CMYK di lavoro
|
||||
Working CMYK (don't tag) CMYK di lavoro (senza tag)
|
||||
Working RGB (don't tag) RGB di lavoro (senza tag)
|
||||
Don't Color Manage This Document Non gestire il colore di questo documento
|
||||
Working RGB: {name} RGB di lavoro: {name}
|
||||
Working CMYK: {name} CMYK di lavoro: {name}
|
||||
Workspace Area di lavoro
|
||||
Workspace {i} Area di lavoro {i}
|
||||
Wrinkle Tool Strumento Grinza
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4120,6 +4120,9 @@ file-filter Templates テンプレート
|
||||
Windows Windows
|
||||
Working CMYK (don't tag) 作業用 CMYK (タグなし)
|
||||
Working RGB (don't tag) 作業用 RGB (タグなし)
|
||||
Don't Color Manage This Document このドキュメントにカラーマネジメントを適用しない
|
||||
Working RGB: {name} 作業用 RGB: {name}
|
||||
Working CMYK: {name} 作業用 CMYK: {name}
|
||||
Workspace {i} ワークスペース {i}
|
||||
Yellow イエロー
|
||||
[Normal Character Style] [標準文字スタイル]
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -1903,6 +1903,9 @@ digits Malayalam მალაიალამური
|
||||
Use Black Point Compensation შავი წერტილის კომპენსაციის გამოყენება
|
||||
Working CMYK (don't tag) სამუშაო CMYK (ტეგის გარეშე)
|
||||
Working RGB (don't tag) სამუშაო RGB (ტეგის გარეშე)
|
||||
Don't Color Manage This Document ამ დოკუმენტის ფერების მართვის გარეშე
|
||||
Working RGB: {name} სამუშაო RGB: {name}
|
||||
Working CMYK: {name} სამუშაო CMYK: {name}
|
||||
{name} (spot) {name} (სპოტ)
|
||||
Add to Profiles… პროფილებში დამატება…
|
||||
Align Stroke to Center კონტურის ცენტრზე სწორება
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4108,6 +4108,9 @@ file-filter Templates 템플릿
|
||||
Windows Windows
|
||||
Working CMYK (don't tag) 작업용 CMYK (태그 안 함)
|
||||
Working RGB (don't tag) 작업용 RGB (태그 안 함)
|
||||
Don't Color Manage This Document 이 문서에 색상 관리 안 함
|
||||
Working RGB: {name} 작업용 RGB: {name}
|
||||
Working CMYK: {name} 작업용 CMYK: {name}
|
||||
Workspace {i} 작업 영역 {i}
|
||||
Yellow 노랑
|
||||
[Normal Character Style] [기본 문자 스타일]
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -2492,6 +2492,9 @@ digits Malayalam Malayalam
|
||||
Use Black Point Compensation Zwartpuntcompensatie gebruiken
|
||||
Working CMYK (don't tag) Werk-CMYK (niet taggen)
|
||||
Working RGB (don't tag) Werk-RGB (niet taggen)
|
||||
Don't Color Manage This Document Geen kleurbeheer voor dit document
|
||||
Working RGB: {name} Werk-RGB: {name}
|
||||
Working CMYK: {name} Werk-CMYK: {name}
|
||||
{name} (spot) {name} (spotkleur)
|
||||
Add to Profiles… Toevoegen aan profielen…
|
||||
Align Stroke to Center Lijn in het midden uitlijnen
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -2092,6 +2092,9 @@ digits Malayalam Malajalam
|
||||
Use Black Point Compensation Użyj kompensacji punktu czerni
|
||||
Working CMYK (don't tag) Roboczy CMYK (bez znacznika)
|
||||
Working RGB (don't tag) Roboczy RGB (bez znacznika)
|
||||
Don't Color Manage This Document Nie zarządzaj kolorem tego dokumentu
|
||||
Working RGB: {name} Roboczy RGB: {name}
|
||||
Working CMYK: {name} Roboczy CMYK: {name}
|
||||
{name} (spot) {name} (dodatkowy)
|
||||
Add to Profiles… Dodaj do profili…
|
||||
Align Stroke to Center Wyrównaj obrys do środka
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -5315,6 +5315,9 @@ axis Both Ambos
|
||||
Windows Windows
|
||||
Working CMYK (don't tag) CMYK de Trabalho (não marcar)
|
||||
Working RGB (don't tag) RGB de Trabalho (não marcar)
|
||||
Don't Color Manage This Document Não gerenciar as cores deste documento
|
||||
Working RGB: {name} RGB de Trabalho: {name}
|
||||
Working CMYK: {name} CMYK de Trabalho: {name}
|
||||
Workspace {i} Espaço de Trabalho {i}
|
||||
Yellow Amarelo
|
||||
[Normal Character Style] [Estilo de Caractere Normal]
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4077,6 +4077,9 @@ digits Malayalam Малаялам
|
||||
Working CMYK Рабочий CMYK
|
||||
Working CMYK (don't tag) Рабочий CMYK (без пометки)
|
||||
Working RGB (don't tag) Рабочий RGB (без пометки)
|
||||
Don't Color Manage This Document Не управлять цветом этого документа
|
||||
Working RGB: {name} Рабочий RGB: {name}
|
||||
Working CMYK: {name} Рабочий CMYK: {name}
|
||||
Workspace Рабочая среда
|
||||
Workspace {i} Рабочая среда {i}
|
||||
Wrinkle Tool Инструмент «Морщины»
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -3966,6 +3966,9 @@ digits Malayalam Malayalam
|
||||
Working CMYK Arbets-CMYK
|
||||
Working CMYK (don't tag) Arbets-CMYK (tagga inte)
|
||||
Working RGB (don't tag) Arbets-RGB (tagga inte)
|
||||
Don't Color Manage This Document Färghantera inte det här dokumentet
|
||||
Working RGB: {name} Arbets-RGB: {name}
|
||||
Working CMYK: {name} Arbets-CMYK: {name}
|
||||
Workspace Arbetslayout
|
||||
Workspace {i} Arbetslayout {i}
|
||||
Wrinkle Tool Skrynkelverktyg
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -3825,6 +3825,9 @@ digits Malayalam Malayalam
|
||||
Working CMYK CMYK'de çalışıyor
|
||||
Working CMYK (don't tag) CMYK çalışıyor (etiketlemeyin)
|
||||
Working RGB (don't tag) Çalışan RGB (etiketlemeyin)
|
||||
Don't Color Manage This Document Bu belgede renk yönetimi yapma
|
||||
Working RGB: {name} Çalışma RGB'si: {name}
|
||||
Working CMYK: {name} Çalışma CMYK'sı: {name}
|
||||
Workspace Çalışma Alanı
|
||||
Workspace {i} Çalışma Alanı {i}
|
||||
Wrinkle Tool Kırışıklık Aracı
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4085,6 +4085,9 @@ effect Points Точки
|
||||
Working CMYK Робочий CMYK
|
||||
Working CMYK (don't tag) Робочий CMYK (без позначки)
|
||||
Working RGB (don't tag) Робочий RGB (без позначки)
|
||||
Don't Color Manage This Document Не керувати кольором цього документа
|
||||
Working RGB: {name} Робочий RGB: {name}
|
||||
Working CMYK: {name} Робочий CMYK: {name}
|
||||
Workspace Робоче середовище
|
||||
Workspace {i} Робоче середовище {i}
|
||||
Wrinkle Tool Інструмент «Зморшки»
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4460,6 +4460,9 @@ mark-style Japanese Kiểu Nhật
|
||||
Working CMYK CMYK làm việc
|
||||
Working CMYK (don't tag) CMYK làm việc (không gắn thẻ)
|
||||
Working RGB (don't tag) RGB làm việc (không gắn thẻ)
|
||||
Don't Color Manage This Document Không quản lý màu cho tài liệu này
|
||||
Working RGB: {name} RGB làm việc: {name}
|
||||
Working CMYK: {name} CMYK làm việc: {name}
|
||||
Workspace Không gian làm việc
|
||||
Workspace {i} Không gian làm việc {i}
|
||||
Wrinkle Tool Công cụ nhăn
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 204 and column 5.
|
@@ -3924,6 +3924,9 @@ digits Malayalam 马拉雅拉姆数字
|
||||
Working CMYK 工作 CMYK
|
||||
Working CMYK (don't tag) 工作 CMYK (不加标签)
|
||||
Working RGB (don't tag) 工作 RGB (不加标签)
|
||||
Don't Color Manage This Document 不对此文档进行色彩管理
|
||||
Working RGB: {name} 工作 RGB:{name}
|
||||
Working CMYK: {name} 工作 CMYK:{name}
|
||||
Workspace 工作区
|
||||
Workspace {i} 工作区 {i}
|
||||
Wrinkle Tool 褶皱工具
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -5187,6 +5187,9 @@ digits Malayalam 馬來亞拉姆數字
|
||||
Working CMYK 使用中的 CMYK
|
||||
Working CMYK (don't tag) 工作 CMYK (不加標記)
|
||||
Working RGB (don't tag) 工作 RGB (不加標記)
|
||||
Don't Color Manage This Document 不對此文件進行色彩管理
|
||||
Working RGB: {name} 工作 RGB:{name}
|
||||
Working CMYK: {name} 工作 CMYK:{name}
|
||||
Workspace 工作區
|
||||
Workspace {i} 工作區 {i}
|
||||
Wrinkle Tool 皺摺工具
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -147,16 +147,99 @@ fn settings_rows(app: &mut VectorcraftApp, ui: &mut Ui) {
|
||||
}
|
||||
}
|
||||
});
|
||||
if let Some(d) = app.session.active() {
|
||||
let (_, cmyk) = vectorcraft_engine::cmd::colormgmt::doc_profiles(&d.doc);
|
||||
const WORKING: &str = "Working CMYK (don't tag)";
|
||||
ui.horizontal(|ui| {
|
||||
ui.label(tl!("Assign:"));
|
||||
if let Some(n) = profile_dropdown(ui, "cms-assign", cmyk.as_deref().unwrap_or(WORKING), ProfileKind::Cmyk, Some(WORKING)) {
|
||||
let v = if n == WORKING { Value::Null } else { Value::String(n) };
|
||||
run(app, "edit.assignProfile", json!({ "cmyk": v }));
|
||||
if let Some(row) = app.session.active().map(|d| AssignRow::of(&d.doc)) {
|
||||
assign_rows(app, ui, &row);
|
||||
}
|
||||
}
|
||||
|
||||
/// Edit › Assign Profile…'s three choices for the active document's color mode.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
enum AssignChoice {
|
||||
/// Don't Color Manage This Document: no profile, so the colors show through the working space.
|
||||
None,
|
||||
/// The working space of the mode, assigned to the document as its profile.
|
||||
Working,
|
||||
/// Another profile of the mode's kind.
|
||||
Profile,
|
||||
}
|
||||
|
||||
/// What the Assign rows show for a document: the profile of its color mode (`key` is the
|
||||
/// `edit.assignProfile` param), the working space of that mode, and the other profiles of that kind.
|
||||
#[derive(Debug)]
|
||||
struct AssignRow {
|
||||
key: &'static str,
|
||||
mode: vectorcraft_doc::ColorMode,
|
||||
assigned: Option<String>,
|
||||
working: String,
|
||||
others: Vec<String>,
|
||||
}
|
||||
|
||||
impl AssignRow {
|
||||
fn of(doc: &vectorcraft_doc::Document) -> Self {
|
||||
let (rgb, cmyk) = vectorcraft_engine::cmd::colormgmt::doc_profiles(doc);
|
||||
let st = cms::working_settings();
|
||||
let (key, kind, assigned, working) = match doc.color_mode {
|
||||
vectorcraft_doc::ColorMode::Rgb => ("rgb", ProfileKind::Rgb, rgb, st.rgb),
|
||||
vectorcraft_doc::ColorMode::Cmyk => ("cmyk", ProfileKind::Cmyk, cmyk, st.cmyk),
|
||||
};
|
||||
let working = cms::canonical_name(&working).to_string();
|
||||
let others = cms::profiles().into_iter().filter(|p| p.kind == kind && p.name != working).map(|p| p.name).collect();
|
||||
AssignRow { key, mode: doc.color_mode, assigned, working, others }
|
||||
}
|
||||
|
||||
fn choice(&self) -> AssignChoice {
|
||||
match &self.assigned {
|
||||
None => AssignChoice::None,
|
||||
Some(n) if *n == self.working => AssignChoice::Working,
|
||||
Some(_) => AssignChoice::Profile,
|
||||
}
|
||||
}
|
||||
|
||||
/// The `edit.assignProfile` params for `choice` (with `profile`, the profile picked for
|
||||
/// [`AssignChoice::Profile`], else the first of the list), or `None` when the document already
|
||||
/// has it.
|
||||
fn params(&self, choice: AssignChoice, profile: Option<&str>) -> Option<Value> {
|
||||
let v = match choice {
|
||||
AssignChoice::None => Value::Null,
|
||||
AssignChoice::Working => json!(self.working),
|
||||
AssignChoice::Profile => json!(profile.or(self.others.first().map(String::as_str))?),
|
||||
};
|
||||
(v != json!(self.assigned)).then(|| json!({ self.key: v }))
|
||||
}
|
||||
}
|
||||
|
||||
/// The Assign rows: Don't Color Manage This Document, the working space of the document's color
|
||||
/// mode, and Profile with a list of the other profiles of that kind. A pick runs `edit.assignProfile`.
|
||||
fn assign_rows(app: &mut VectorcraftApp, ui: &mut Ui, row: &AssignRow) {
|
||||
let choice = row.choice();
|
||||
let mut pick = None;
|
||||
ui.label(tl!("Assign:"));
|
||||
if widgets::radio(ui, tl!("Don't Color Manage This Document"), choice == AssignChoice::None, true) {
|
||||
pick = row.params(AssignChoice::None, None);
|
||||
}
|
||||
let working = match row.mode {
|
||||
vectorcraft_doc::ColorMode::Rgb => tl!("Working RGB: {name}"),
|
||||
vectorcraft_doc::ColorMode::Cmyk => tl!("Working CMYK: {name}"),
|
||||
};
|
||||
let working = crate::i18n::fmt(working, &[("name", &row.working)]);
|
||||
if widgets::radio(ui, &working, choice == AssignChoice::Working, true) {
|
||||
pick = row.params(AssignChoice::Working, None);
|
||||
}
|
||||
ui.horizontal(|ui| {
|
||||
let on = choice == AssignChoice::Profile;
|
||||
let shown = if on { row.assigned.as_deref() } else { row.others.first().map(String::as_str) };
|
||||
if widgets::radio(ui, tl!("Profile:"), on, !row.others.is_empty()) {
|
||||
pick = row.params(AssignChoice::Profile, shown);
|
||||
}
|
||||
let refs: Vec<&str> = row.others.iter().map(String::as_str).collect();
|
||||
ui.add_enabled_ui(!refs.is_empty(), |ui| {
|
||||
if let Some(i) = widgets::dropdown_names(ui, "cms-assign", shown.unwrap_or_default(), &refs, 210.0) {
|
||||
pick = row.params(AssignChoice::Profile, refs.get(i).copied());
|
||||
}
|
||||
});
|
||||
});
|
||||
if let Some(p) = pick {
|
||||
run(app, "edit.assignProfile", p);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -235,6 +318,67 @@ mod tests {
|
||||
assert!(panel.iter().all(|(id, _)| cms::ProofTarget::parse(id).is_some_and(|t| t.id() == *id)));
|
||||
}
|
||||
|
||||
/// Assign Profile's three choices: no profile, the working space assigned as the profile, or
|
||||
/// another profile; a choice the document already has runs nothing.
|
||||
#[test]
|
||||
fn assign_choices_give_the_profile_params_of_the_color_mode() {
|
||||
let row = |assigned: Option<&str>| AssignRow {
|
||||
key: "rgb",
|
||||
mode: vectorcraft_doc::ColorMode::Rgb,
|
||||
assigned: assigned.map(str::to_string),
|
||||
working: "W".into(),
|
||||
others: vec!["A".into(), "B".into()],
|
||||
};
|
||||
assert_eq!(row(None).choice(), AssignChoice::None);
|
||||
assert_eq!(row(Some("W")).choice(), AssignChoice::Working);
|
||||
assert_eq!(row(Some("B")).choice(), AssignChoice::Profile);
|
||||
assert_eq!(row(None).params(AssignChoice::None, None), None);
|
||||
assert_eq!(row(Some("B")).params(AssignChoice::None, None), Some(json!({"rgb": null})));
|
||||
assert_eq!(row(None).params(AssignChoice::Working, None), Some(json!({"rgb": "W"})));
|
||||
assert_eq!(row(Some("W")).params(AssignChoice::Working, None), None);
|
||||
assert_eq!(row(None).params(AssignChoice::Profile, None), Some(json!({"rgb": "A"})));
|
||||
assert_eq!(row(Some("W")).params(AssignChoice::Profile, Some("B")), Some(json!({"rgb": "B"})));
|
||||
assert_eq!(row(Some("B")).params(AssignChoice::Profile, Some("B")), None);
|
||||
let none = AssignRow { others: vec![], ..row(None) };
|
||||
assert_eq!(none.params(AssignChoice::Profile, None), None, "no other profile to pick");
|
||||
}
|
||||
|
||||
/// The Assign rows follow the document's color mode: an RGB document lists the RGB working space
|
||||
/// and the RGB profiles and assigns its RGB profile, a CMYK document the CMYK ones, and the other
|
||||
/// model's profile stays as it was.
|
||||
#[test]
|
||||
fn assign_rows_follow_the_document_color_mode() {
|
||||
fn texts(s: &egui::Shape, out: &mut Vec<String>) {
|
||||
match s {
|
||||
egui::Shape::Text(t) => out.push(t.galley.text().to_string()),
|
||||
egui::Shape::Vec(v) => v.iter().for_each(|s| texts(s, out)),
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
let mut app = VectorcraftApp::new(Session::new(), Default::default());
|
||||
app.run("file.new", json!({})).unwrap();
|
||||
for (mode, key, kind, other) in [("rgb", "rgb", ProfileKind::Rgb, "cmyk"), ("cmyk", "cmyk", ProfileKind::Cmyk, "rgb")] {
|
||||
app.run("edit.assignProfile", json!({"rgb": null, "cmyk": null})).unwrap();
|
||||
app.run("file.documentColorMode", json!({"mode": mode, "convert": false})).unwrap();
|
||||
let row = AssignRow::of(&app.session.active().unwrap().doc);
|
||||
assert_eq!((row.key, row.choice()), (key, AssignChoice::None));
|
||||
assert!(!row.others.is_empty() && !row.others.contains(&row.working));
|
||||
assert!(row.others.iter().chain([&row.working]).all(|n| cms::profile(n).is_some_and(|p| p.kind == kind)), "{row:?}");
|
||||
let ctx = egui::Context::default();
|
||||
let mut out = ctx.run_ui(egui::RawInput::default(), |ui| settings_rows(&mut app, ui));
|
||||
out.textures_delta.clear();
|
||||
let mut shown = vec![];
|
||||
out.shapes.iter().for_each(|c| texts(&c.shape, &mut shown));
|
||||
let working = format!("Working {}: {}", mode.to_uppercase(), row.working);
|
||||
assert!(shown.contains(&working) && shown.iter().any(|t| t == "Don't Color Manage This Document"), "{shown:?}");
|
||||
app.run("edit.assignProfile", row.params(AssignChoice::Profile, None).unwrap()).unwrap();
|
||||
let doc = &app.session.active().unwrap().doc;
|
||||
let (rgb, cmyk) = vectorcraft_engine::cmd::colormgmt::doc_profiles(doc);
|
||||
let (mine, theirs) = if key == "rgb" { (rgb, cmyk) } else { (cmyk, rgb) };
|
||||
assert_eq!((mine.as_deref(), theirs), (row.others.first().map(String::as_str), None), "{other} stays untagged");
|
||||
}
|
||||
}
|
||||
|
||||
/// #6419: Edit › Assign Profile… and Color Settings… show the panel scrolled to its Color
|
||||
/// Settings section, which a window shorter than the panel (a floated panel stops at 320
|
||||
/// points) otherwise shows only after scrolling past the plates and Proof Setup. Once: a
|
||||
|
||||
@@ -1633,6 +1633,10 @@ preferences (the folder the desktop app uses, so both see the same ones; `VECTOR
|
||||
target of `view.proofSetup` simulates the working CMYK space in such a document too. `color.convert`'s
|
||||
`outOfGamut` and `deltaE`, `color.gamutCheck`, and the out-of-gamut warning of the Color panel and Color Picker
|
||||
check against the assigned CMYK profile, else the working CMYK space; the warning updates when either changes.
|
||||
The Separations panel's Assign rows (where Edit › Assign Profile… goes) act on the profile of the document's
|
||||
color mode: Don't Color Manage This Document runs `edit.assignProfile` with null for that model, Working RGB or
|
||||
Working CMYK with the working space's name, and Profile with another profile of that kind. A choice the document
|
||||
already has runs nothing, and the other model's profile stays as it is.
|
||||
|
||||
Not remembered: the document, anything else. Nothing is read or written when
|
||||
`VECTORCRAFT_NO_PREFS` is set, and a server confined with `--automation-read-root` or
|
||||
|
||||
@@ -746,6 +746,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
|
||||
- **Translucent art blended before the display profile:** with Use Monitor Profile for Canvas converting, translucent art and the anti-aliased edges of art over an artboard's paper, a colored artboard or the transparency grid are blended with it in sRGB and the blend is converted, so the monitor's profile translates the document's colors as they are composited ([the help page](https://help.adobe.com/archive/en_US/illustrator/cs4/illustrator_cs4_help.pdf#page=151)). The frame rendered whole, the part an edit renders again, the render worker's frame, the pan fill and the other windows' panes do the same; over the pasteboard and in Outline the art is converted on its own, and with no profile to convert into nothing changes. Tests `display_profile::tests::translucent_pixels_over_the_paper_are_blended_before_they_are_converted`, `the_transparency_grid_is_blended_cell_by_cell`, `the_backdrop_is_found_through_the_view` and `canvas::tests::translucent_art_over_the_paper_is_blended_before_the_display_profile`.
|
||||
- **Out-of-gamut warning after a profile change:** the out-of-gamut warning and its closest-color correction in the Color panel and Color Picker ([the help page](https://helpx.adobe.com/illustrator/using/adjusting-colors.html)) check the color against the document's assigned CMYK profile, else the working CMYK space, and update when Edit › Assign Profile… or Edit › Color Settings… changes that space or a loaded profile changes, without a change of color. Which CMYK space the warning uses is VectorCraft's own rule. Tests: `gamut_warning_follows_a_profile_change` and `gamut_warning_follows_a_profile_loaded_again` in `dialogs/color_picker/tests.rs`.
|
||||
- **Assign Profile and the working spaces:** Edit › Assign Profile… tags the document and leaves the working spaces of Edit › Color Settings… as they are, in Color Settings, the Separations panel and the settings saved for the next start. Colors show and convert through the profiles assigned; a change in Color Settings keeps the profiles the document in front is assigned in use, and removing an assigned profile in use puts the working space back in its place. The profiles in use follow the document in front: a new, opened or reverted document, a switch to another tab, a close, Undo and Redo of Assign Profile, a failed batch, each step of a batch, Export All Open and the update of placed documents put that document's profiles in use, and the working spaces where it is assigned none or no document is open. With Window › Arrange › Tile or floating document windows, each document behind the front one draws its art, paper and transparency grid through its own assigned profiles, and loading or removing a profile redraws the documents assigned it; placed documents inside it still draw through the front document's profiles. How documents behind the front one draw is VectorCraft's own rule. View › Proof Setup › Working CMYK simulates the working CMYK space of Color Settings in Proof Colors and Separations Preview, also in a document assigned another CMYK profile. Public references: [Changing the color profile for a document and About color working spaces](https://help.adobe.com/archive/en_US/illustrator/cs3/illustrator_cs3_help.pdf#page=150) and [Soft-proof presets](https://help.adobe.com/archive/en_US/illustrator/cs3/illustrator_cs3_help.pdf#page=134). Tests in `engine/tests/color_settings.rs`.
|
||||
- **Assign Profile's three choices:** the Assign rows of Edit › Assign Profile… (the Separations panel's Color Settings section) offer Don't Color Manage This Document, the working space of the document's color mode (Working RGB or Working CMYK, with its name) and Profile with the other profiles of that kind, as [Assign or remove a color profile](https://help.adobe.com/archive/en_US/illustrator/cs3/illustrator_cs3_help.pdf#page=150) lists them. They act on the profile of the document's color mode: an RGB document's RGB profile, a CMYK document's CMYK profile; the other model's profile stays as it is (VectorCraft's own rule; Document Setup › Color sets both). Picking the working space assigns its profile, which stays when the working space changes later. A choice the document already has runs nothing. Tests in `panels/separations.rs`.
|
||||
- **New Document's More Settings and Save Preset:** More Settings opens a pop-up over New Document with only Number of Artboards, the artboard layout, Change to Right-to-Left Layout, Spacing and Columns; Done, Escape or a click outside closes it and keeps the values. Save Preset turns the top of Preset Details into a Save Document Preset heading with the preset's name, Cancel and Save, and hides the document's name, Close and Create until the preset is saved or canceled; nothing in that mode creates a document. Save Preset's default name is the first "Preset N" no saved preset has. VectorCraft's own layout. Harness tests in `dialogs/new_document.rs` cover both.
|
||||
- **New Document profiles:** each built-in category's presets start documents from that category's profile, a native document holding the starting swatches, graphic styles, brushes, symbols and other assets, the ruler and Document Setup options and the print settings ([Create a custom new document profile](https://helpx.adobe.com/illustrator/desktop/add-and-import-files/start-a-new-file/create-a-custom-new-document-profile.html)). New Document's Manage Profiles pop-up opens a profile to edit and resets one to the shipped profile (`file.newProfiles`, `file.newProfiles.edit`, `file.newProfiles.reset`; `file.new {profile}`). The profiles live in VectorCraft's own `New Document Profiles` folder next to the preferences; a profile that cannot be read or is larger than 64 MiB leaves the defaults and is reported. Tests: `tests::newdoc::an_edited_profile_starts_the_documents_of_its_category`, `the_profile_follows_the_preset_access_and_reset`, `profile_errors_name_the_file_by_its_name_outside_the_read_roots`, `a_damaged_or_oversized_profile_leaves_the_defaults_and_is_reported`, `profile_names_are_checked_and_editing_needs_the_folder`, `dialogs::new_document::tests::manage_profiles_edits_and_resets_the_profiles`.
|
||||
- **Control bar with the Artboard tool:** while the Artboard tool is in use, the Control bar shows the active artboard's controls in place of the object controls: Preset, Portrait and Landscape, New Artboard, Delete Artboard, the Name field, Artboard Options, Rearrange All Artboards, the Transform link, Move and Scale Artwork with Artboard and, while the bar has room, the reference point with X and Y, and W and H with the Constrain Width and Height Proportions link. Each runs the command its Properties or Transform panel counterpart runs (`artboard.setProps`, `artboard.new`, `artboard.delete`, `tool.options {tool: "artboard"}`), and the reference point is the one the Transform panel uses. In an 800-point window the controls up to the Transform link fit, Move and Scale Artwork with Artboard show as their boxes alone with their names in tooltips, and the link opens the Transform panel with the artboard's position and size. Pointer and key tests in `panels/artboards.rs` cover the controls, W about the reference point, the orientation and the name. Public reference: [Using multiple artboards](https://web.archive.org/web/20210925094818/https://helpx.adobe.com/illustrator/using/using-multiple-artboards.html) (archived copy).
|
||||
|
||||
Reference in New Issue
Block a user