mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-12 21:56:24 +00:00
Merge pull request #6533 from dotCooCoo/fix/char-style-tint-names
Character Styles: the Fill and Stroke Tint fields have distinct names
This commit is contained in:
@@ -804,19 +804,19 @@ fn paint_choice(ui: &mut egui::Ui, d: &mut Dialog, key: &str) {
|
||||
/// the stroke Weight and Overprint Fill and Overprint Stroke, each unset or set.
|
||||
pub(crate) fn color_body(ui: &mut egui::Ui, d: &mut Dialog) {
|
||||
egui::Grid::new("character-style-color").num_columns(2).spacing([18.0, 8.0]).show(ui, |ui| {
|
||||
for (key, caption) in [("fill", tl!("Fill")), ("stroke", tl!("Stroke"))] {
|
||||
for (key, caption, tint_name) in [("fill", tl!("Fill"), tl!("Fill Tint")), ("stroke", tl!("Stroke"), tl!("Stroke Tint"))] {
|
||||
let row = ui.label(caption);
|
||||
ui.label_inputs_by(row.id, |ui| paint_choice(ui, d, key));
|
||||
ui.end_row();
|
||||
let tint_key = format!("{key}_tint");
|
||||
let row = ui.label(tl!("Tint"));
|
||||
ui.label(tl!("Tint"));
|
||||
if d.fields.get(&tint_key).is_none_or(Value::is_null) {
|
||||
d.fields.insert(tint_key.clone(), json!(""));
|
||||
}
|
||||
let linked = d.fields.get(key).and_then(|p| p.get("swatch")).is_some_and(Value::is_string);
|
||||
ui.add_enabled_ui(linked, |ui| {
|
||||
ui.horizontal(|ui| {
|
||||
ui.label_inputs_by(row.id, |ui| form::text(ui, d, &tint_key, 160.0));
|
||||
form::text_named(ui, d, &tint_key, tint_name, 160.0);
|
||||
ui.label("%");
|
||||
});
|
||||
});
|
||||
@@ -1893,6 +1893,46 @@ mod tests {
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn fill_and_stroke_tint_fields_have_distinct_names() {
|
||||
use egui::accesskit::Role;
|
||||
use egui_kittest::kittest::{NodeT, Queryable};
|
||||
for new_style in [false, true] {
|
||||
let mut app = app();
|
||||
app.run("swatch.new", json!({"name": "Brand", "color": "#2050a0", "global": true})).unwrap();
|
||||
if new_style {
|
||||
app.run("ui.newCharStyle", json!({})).unwrap();
|
||||
} else {
|
||||
app.run("charStyle.new", json!({"name": "Body", "attrs": {}})).unwrap();
|
||||
open(&mut app, "Body").unwrap();
|
||||
}
|
||||
let brand = json!(app.session.doc().unwrap().doc.tint_paint("Brand", 1.0).unwrap());
|
||||
{
|
||||
let d = app.ui.dialog.as_mut().unwrap();
|
||||
d.fields.insert("section".into(), json!("color"));
|
||||
d.fields.insert("fill".into(), brand.clone());
|
||||
d.fields.insert("stroke".into(), brand);
|
||||
}
|
||||
let mut fonts = false;
|
||||
let mut h = egui_kittest::Harness::builder().with_size(egui::vec2(1100.0, 900.0)).build_ui_state(
|
||||
move |ui, app: &mut VectorcraftApp| {
|
||||
if !std::mem::replace(&mut fonts, true) {
|
||||
crate::theme::install_fonts(ui.ctx());
|
||||
return;
|
||||
}
|
||||
super::super::show(app, ui.ctx());
|
||||
},
|
||||
app,
|
||||
);
|
||||
h.run_steps(4);
|
||||
for name in ["Fill Tint", "Stroke Tint"] {
|
||||
let field = h.get_by_role_and_label(Role::TextInput, name);
|
||||
assert!(!field.accesskit_node().is_disabled(), "new {new_style}: {name} is enabled for a linked swatch");
|
||||
}
|
||||
assert!(h.query_by_role_and_label(Role::TextInput, "Tint").is_none(), "new {new_style}: a field is named only Tint");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn invalid_number_keeps_last_valid_preview() {
|
||||
let mut app = app();
|
||||
|
||||
@@ -3488,6 +3488,8 @@ digits Malayalam Малаялам
|
||||
Tiles are numbered across, then down; leave the range empty for every tile. Плочките се номерират напречно, след това надолу; оставете диапазона празен за всяка плочка.
|
||||
Copies per Sheet (as many as fit, in a grid) Копия на лист (колкото се побират, в мрежа)
|
||||
Tint Оттенък
|
||||
Fill Tint Оттенък на запълване
|
||||
Stroke Tint Оттенък на щриха
|
||||
Tip extends past the end point Връхът продължава след крайната точка
|
||||
Tip on the end point Връх върху крайната точка
|
||||
Title Case Заглавни букви
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -2258,6 +2258,8 @@ digits Malayalam Malajalam
|
||||
Green Zelena
|
||||
Shifts the tints of global and spot colors; other colors stay. Pomjera nijanse globalnih i spot boja; ostale boje ostaju.
|
||||
Tint Preliv
|
||||
Fill Tint Preliv ispune
|
||||
Stroke Tint Preliv poteza
|
||||
Color Guide Options Opcije vodiča za boje
|
||||
Less Manje
|
||||
Steps: Koraci:
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -4478,6 +4478,8 @@ digits Malayalam Malaiàlam
|
||||
Tilt Inclinació
|
||||
Time (hhmmss) Hora (hhmmss)
|
||||
Tint To
|
||||
Fill Tint To de farciment
|
||||
Stroke Tint To del traç
|
||||
Tint Reduction Reducció de to
|
||||
Tints Tons
|
||||
Tints and Shades Tons i ombres
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -2285,6 +2285,8 @@ digits Malayalam Malajálamské
|
||||
Green Zelená
|
||||
Shifts the tints of global and spot colors; other colors stay. Posune tóny globálních a přímých barev; ostatní barvy zůstanou.
|
||||
Tint Tón
|
||||
Fill Tint Tón výplně
|
||||
Stroke Tint Tón tahu
|
||||
Color Guide Options Možnosti průvodce barvami
|
||||
Less Méně
|
||||
Steps: Kroky:
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -2091,6 +2091,8 @@ digits Malayalam Malayalam
|
||||
Green Grøn
|
||||
Shifts the tints of global and spot colors; other colors stay. Flytter nuancerne af globale farver og spotfarver; andre farver forbliver uændrede.
|
||||
Tint Nuance
|
||||
Fill Tint Fyldnuance
|
||||
Stroke Tint Stregnuance
|
||||
Color Guide Options Indstillinger for farveguide
|
||||
Less Mindre
|
||||
Steps: Trin:
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -3520,6 +3520,8 @@ effect Points Punkte
|
||||
Copies per Sheet (as many as fit, in a grid) Kopien pro Blatt (so viele wie passen, im Raster)
|
||||
Gutter: Zwischenraum:
|
||||
Tint Tonwert
|
||||
Fill Tint Flächentonwert
|
||||
Stroke Tint Konturtonwert
|
||||
Tip extends past the end point Spitze ragt über den Endpunkt hinaus
|
||||
Tip on the end point Spitze auf dem Endpunkt
|
||||
Title Case Wortanfänge groß
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -2085,6 +2085,8 @@ font-technology Variable Μεταβλητές
|
||||
Threshold Κατώφλι
|
||||
Tile Παράθεση
|
||||
Tint Χρωματική απόχρωση
|
||||
Fill Tint Χρωματική απόχρωση γεμίσματος
|
||||
Stroke Tint Χρωματική απόχρωση περιγράμματος
|
||||
Tolerance Ανοχή
|
||||
Tolerance: Ανοχή:
|
||||
Tool Options… Επιλογές εργαλείου…
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -3575,6 +3575,8 @@ digits Malayalam Malayálam
|
||||
Copies per Sheet (as many as fit, in a grid) Copias por hoja (tantas como quepan, en cuadrícula)
|
||||
Gutter: Medianil:
|
||||
Tint Matiz
|
||||
Fill Tint Matiz de relleno
|
||||
Stroke Tint Matiz de trazo
|
||||
Tip extends past the end point La punta se extiende más allá del punto final
|
||||
Tip on the end point Punta en el punto final
|
||||
Title Case Tipo Título
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -2244,6 +2244,8 @@ digits Malayalam Malajalam
|
||||
Green Vihreä
|
||||
Shifts the tints of global and spot colors; other colors stay. Siirtää globaalien värien ja spottivärien sävyjä; muut värit säilyvät.
|
||||
Tint Sävy
|
||||
Fill Tint Täytön sävy
|
||||
Stroke Tint Viivan sävy
|
||||
Color Guide Options Väriopasteen asetukset
|
||||
Less Vähemmän
|
||||
Steps: Vaiheet:
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -3566,6 +3566,8 @@ digits Malayalam Malayalam
|
||||
Copies per Sheet (as many as fit, in a grid) Copies par feuille (autant qu’il en tient, en grille)
|
||||
Tiles are numbered across, then down; leave the range empty for every tile. Les carreaux sont numérotés de gauche à droite, puis de haut en bas ; laissez la plage vide pour tous les carreaux.
|
||||
Tint Teinte
|
||||
Fill Tint Teinte du fond
|
||||
Stroke Tint Teinte du contour
|
||||
Tip extends past the end point La pointe dépasse le point d’extrémité
|
||||
Tip on the end point Pointe sur le point d’extrémité
|
||||
Title Case Majuscule à chaque mot
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -4853,6 +4853,8 @@ antiAlias Sharp शार्प
|
||||
Tilt झुकाव
|
||||
Time (hhmmss) समय (hhmms)
|
||||
Tint टिंट
|
||||
Fill Tint फ़िल टिंट
|
||||
Stroke Tint स्ट्रोक टिंट
|
||||
Tint Reduction टिंट में कमी
|
||||
Tints टिंट्स
|
||||
Tints and Shades टिंट्स और शेड्स
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4249,6 +4249,8 @@ mark-style Japanese Japán
|
||||
Tilt Dőlés
|
||||
Copies per Sheet (as many as fit, in a grid) Példány laponként (ahány elfér, rácsban)
|
||||
Tint Tónus
|
||||
Fill Tint Kitöltés tónusa
|
||||
Stroke Tint Körvonal tónusa
|
||||
Tints Tónusok
|
||||
Tints and Shades Tónusok és árnyalatok
|
||||
Tips Tippek
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -2091,6 +2091,8 @@ digits Malayalam Malayalam
|
||||
Green Hijau
|
||||
Shifts the tints of global and spot colors; other colors stay. Menggeser tint warna global dan warna spot; warna lainnya tetap.
|
||||
Tint Tint
|
||||
Fill Tint Tint isian
|
||||
Stroke Tint Tint stroke
|
||||
Color Guide Options Opsi panduan warna
|
||||
Less Lebih sedikit
|
||||
Steps: Langkah:
|
||||
|
||||
|
@@ -3612,6 +3612,8 @@ digits Malayalam Malayalam
|
||||
Copies per Sheet (as many as fit, in a grid) Copie per foglio (quante ne entrano, in griglia)
|
||||
Gutter: Spazio intermedio:
|
||||
Tint Tinta
|
||||
Fill Tint Tinta riempimento
|
||||
Stroke Tint Tinta traccia
|
||||
Tip extends past the end point La punta si estende oltre il punto finale
|
||||
Tip on the end point Punta sul punto finale
|
||||
Title Case Iniziali maiuscole
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -3890,6 +3890,8 @@ file-filter Templates テンプレート
|
||||
Text Wrap Options テキストの回り込みオプション
|
||||
Tile Full Pages ページ全体を分割
|
||||
Tint 濃度
|
||||
Fill Tint 濃度 (塗り)
|
||||
Stroke Tint 濃度 (線)
|
||||
Tip extends past the end point 先端をパスの端点より先に伸ばす
|
||||
Tip on the end point 先端をパスの端点に合わせる
|
||||
Top 上
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -1995,6 +1995,8 @@ digits Malayalam მალაიალამური
|
||||
Green მწვანე
|
||||
Shifts the tints of global and spot colors; other colors stay. ცვლის გლობალური და სპოტ-ფერების ტონირებებს; სხვა ფერები უცვლელი რჩება.
|
||||
Tint ტონირება
|
||||
Fill Tint შევსების ტონირება
|
||||
Stroke Tint კონტურის ტონირება
|
||||
Color Guide Options ფერის გზამკვლევის პარამეტრები
|
||||
Less ნაკლები
|
||||
Steps: ბიჯები:
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -3878,6 +3878,8 @@ file-filter Templates 템플릿
|
||||
Text Wrap Options 텍스트 감싸기 옵션
|
||||
Tile Full Pages 전체 페이지 타일링
|
||||
Tint 색조
|
||||
Fill Tint 칠 색조
|
||||
Stroke Tint 선 색조
|
||||
Tip extends past the end point 끝이 끝점을 지나 연장됨
|
||||
Tip on the end point 끝이 끝점에 위치
|
||||
Top 위쪽
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -2105,6 +2105,8 @@ digits Malayalam Malayalam
|
||||
Green Groen
|
||||
Shifts the tints of global and spot colors; other colors stay. Verschuift de tinten van globale kleuren en spotkleuren; andere kleuren blijven ongewijzigd.
|
||||
Tint Tint
|
||||
Fill Tint Vultint
|
||||
Stroke Tint Contourtint
|
||||
Color Guide Options Opties voor kleurengids
|
||||
Less Minder
|
||||
Steps: Stappen:
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -2201,6 +2201,8 @@ digits Malayalam Malajalam
|
||||
Green Zielony
|
||||
Shifts the tints of global and spot colors; other colors stay. Przesuwa tinty kolorów globalnych i dodatkowych; pozostałe kolory bez zmian.
|
||||
Tint Tinta
|
||||
Fill Tint Tinta wypełnienia
|
||||
Stroke Tint Tinta obrysu
|
||||
Color Guide Options Opcje przewodnika kolorów
|
||||
Less Mniej
|
||||
Steps: Kroki:
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -5019,6 +5019,8 @@ axis Both Ambos
|
||||
Text Wrap Options Opções de Quebra de Texto
|
||||
Tile Full Pages Dividir em Páginas Inteiras
|
||||
Tint Tom
|
||||
Fill Tint Tom de Preenchimento
|
||||
Stroke Tint Tom do Traçado
|
||||
Tip extends past the end point A ponta se estende além do ponto final
|
||||
Tip on the end point Ponta no ponto final
|
||||
Toolbar: Add Tool Barra de Ferramentas: Adicionar Ferramenta
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
@@ -3606,6 +3606,8 @@ digits Malayalam Малаялам
|
||||
Tiles are numbered across, then down; leave the range empty for every tile. Плитки нумеруются слева направо, затем вниз; оставьте диапазон пустым для всех плиток.
|
||||
Copies per Sheet (as many as fit, in a grid) Копий на лист (сколько поместится, сеткой)
|
||||
Tint Оттенок
|
||||
Fill Tint Оттенок заливки
|
||||
Stroke Tint Оттенок обводки
|
||||
Tip extends past the end point Кончик выходит за конечную точку
|
||||
Tip on the end point Кончик на конечной точке
|
||||
Title Case Как в заголовке
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -3496,6 +3496,8 @@ digits Malayalam Malayalam
|
||||
Tiles are numbered across, then down; leave the range empty for every tile. Rutorna numreras från vänster till höger och sedan nedåt. Lämna omfånget tomt för att få med alla rutor.
|
||||
Copies per Sheet (as many as fit, in a grid) Kopior per ark (så många som får plats, i ett rutnät)
|
||||
Tint Färgton
|
||||
Fill Tint Fyllnadsfärgton
|
||||
Stroke Tint Konturfärgton
|
||||
Tip extends past the end point Spetsen sträcker sig förbi slutpunkten
|
||||
Tip on the end point Spetsen på slutpunkten
|
||||
Title Case Inledande versaler
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 5 and column 25.
|
@@ -3385,6 +3385,8 @@ digits Malayalam Malayalam
|
||||
tile {number} kiremit {number}
|
||||
Tiles are numbered across, then down; leave the range empty for every tile. Fayanslar önce baştan sonra aşağı doğru numaralandırılır; aralığı her döşeme için boş bırakın.
|
||||
Tint Renk tonu
|
||||
Fill Tint Dolgu Renk Tonu
|
||||
Stroke Tint Kontur Renk Tonu
|
||||
Tip extends past the end point İpucu bitiş noktasının ötesine uzanıyor
|
||||
Tip on the end point Bitiş noktasına dair ipucu
|
||||
Title Case Başlık Durumu
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 5 and column 25.
|
@@ -3605,6 +3605,8 @@ effect Points Точки
|
||||
Copies per Sheet (as many as fit, in a grid) Копій на аркуш (скільки поміститься, сіткою)
|
||||
Gutter: Проміжок:
|
||||
Tint Відтінок
|
||||
Fill Tint Відтінок заливки
|
||||
Stroke Tint Відтінок обведення
|
||||
Tip extends past the end point Кінчик виходить за кінцеву точку
|
||||
Tip on the end point Кінчик на кінцевій точці
|
||||
Title Case Як у заголовку
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 182 and column 5.
|
@@ -3952,6 +3952,8 @@ mark-style Japanese Kiểu Nhật
|
||||
Copies per Sheet (as many as fit, in a grid) Nhiều bản sao trên một tờ (xếp vừa bao nhiêu in bấy nhiêu, theo lưới)
|
||||
Gutter: Khoảng cách:
|
||||
Tint Tông màu
|
||||
Fill Tint Tông màu tô
|
||||
Stroke Tint Tông màu nét
|
||||
Tints Sắc pha
|
||||
Tints and Shades Sắc pha và bóng
|
||||
Tips Mẹo
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 204 and column 5.
|
@@ -3438,6 +3438,8 @@ digits Malayalam 马拉雅拉姆数字
|
||||
Tiles are numbered across, then down; leave the range empty for every tile. 拼贴先由左至右再由上至下编号;范围留空表示全部拼贴。
|
||||
Copies per Sheet (as many as fit, in a grid) 每张纸印多份 (尽量排满,按网格排列)
|
||||
Tint 色调
|
||||
Fill Tint 填色色调
|
||||
Stroke Tint 描边色调
|
||||
Tip extends past the end point 箭头超出端点
|
||||
Tip on the end point 箭头位于端点
|
||||
Title Case 词首大写
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -4553,6 +4553,8 @@ digits Malayalam 馬來亞拉姆數字
|
||||
Copies per Sheet (as many as fit, in a grid) 每張紙印多份 (盡量排滿,以格點排列)
|
||||
Gutter: 間距:
|
||||
Tint 色調
|
||||
Fill Tint 填色色調
|
||||
Stroke Tint 筆畫色調
|
||||
Tip extends past the end point 尖端延伸超過終點
|
||||
Tip on the end point 尖端位於終點
|
||||
Title Case 標題式大小寫
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
Reference in New Issue
Block a user