PhotoCraft: An open-source, photo editor written by scratch in pure Rust
Merge PR #3921: feat(layer-style): expose Bevel & Emboss highlight and shadow shading
aiongg3a72e25b0270
diff --cc crates/engine/src/layer_style.rsindex 1647e8782,a07bdb60a..a2b249693--- a/crates/engine/src/layer_style.rs+++ b/crates/engine/src/layer_style.rs@@@ -98,7 -98,7 +98,7 @@@ pub fn effect_defaults(kind: &str) -> V}"patternOverlay" => json!({"blend": "Normal", "opacity": 100, "pattern": "", "angle": 0, "scale": 100, "link": true}),"bevelEmboss" => {- json!({"style": "inner", "technique": "smooth", "depth": 100, "direction": "up", "size": 5, "soften": 0, "angle": 120, "useGlobalLight": true, "altitude": 30, "glossContour": "Linear", "glossAntiAlias": false, "contour": false, "contourName": "Linear", "contourRange": 50, "contourAntiAlias": false})- json!({"style": "inner", "technique": "smooth", "depth": 100, "direction": "up", "size": 5, "soften": 0, "angle": 120, "useGlobalLight": true, "altitude": 30, "glossContour": "Linear", "highlightBlend": "Screen", "highlightColor": "#ffffff", "highlightOpacity": 75, "shadowBlend": "Multiply", "shadowColor": "#000000", "shadowOpacity": 75, "contour": false, "contourName": "Linear", "contourRange": 50, "contourAntiAlias": false})++ json!({"style": "inner", "technique": "smooth", "depth": 100, "direction": "up", "size": 5, "soften": 0, "angle": 120, "useGlobalLight": true, "altitude": 30, "glossContour": "Linear", "glossAntiAlias": false, "highlightBlend": "Screen", "highlightColor": "#ffffff", "highlightOpacity": 75, "shadowBlend": "Multiply", "shadowColor": "#000000", "shadowOpacity": 75, "contour": false, "contourName": "Linear", "contourRange": 50, "contourAntiAlias": false})}"satin" => {json!({"blend": "Multiply", "color": "#000000", "opacity": 50, "angle": 19, "distance": 11, "size": 14, "contour": "Linear", "antiAlias": true, "invert": true})@@@ -795,7 -792,21 +795,22 @@@ pub fn overlay_effect(fx: &mut Effect,bv.use_global_light = x;}set_contour(p, "glossContour", &mut bv.gloss_contour);+ set_bool(p, "glossAntiAlias", &mut bv.gloss_anti_alias);+ // Keep imported PSD shading settings when a command edits other bevel fields.+ if let Some(blend) = p.get("highlightBlend").and_then(Value::as_str).and_then(blend_from_str) {+ bv.highlight.blend = blend;+ }+ if let Some(blend) = p.get("shadowBlend").and_then(Value::as_str).and_then(blend_from_str) {+ bv.shadow.blend = blend;+ }+ set_color(p, "highlightColor", &mut bv.highlight_color);+ set_color(p, "shadowColor", &mut bv.shadow_color);+ if let Some(x) = f_of(p, "highlightOpacity") {+ bv.highlight.opacity = (x / 100.0).clamp(0.0, 1.0);+ }+ if let Some(x) = f_of(p, "shadowOpacity") {+ bv.shadow.opacity = (x / 100.0).clamp(0.0, 1.0);+ }// The Contour element: `contour` turns it on/off; its curve, Range and// Anti-aliased edit the element in place, so an imported curve survives.match b_of(p, "contour") {@@@ -1148,48 -1159,39 +1163,81 @@@ mod testsassert_eq!((t.name.as_str(), t.depth, t.invert), ("Bubbles", -2.0, true));}+ /// #6698 review: a glow's Range runs 1..100 %, as its slider and Photoshop's do. A 0 is+ /// held at the 1 % floor, and 100 is kept.+ #[test]+ fn glow_range_is_held_to_one_through_one_hundred() {+ for kind in ["outerGlow", "innerGlow"] {+ for (sent, kept) in [(0.0, 0.01), (-5.0, 0.01), (1.0, 0.01), (50.0, 0.5), (100.0, 1.0), (250.0, 1.0)] {+ let mut s = session();+ s.execute(&format!("layer.layerStyle.{kind}"), json!({"range": sent})).unwrap();+ let range = match &effects(&s)[0] {+ Effect::OuterGlow(g) | Effect::InnerGlow(g) => g.range,+ other => panic!("{other:?}"),+ };+ assert!((range - kept).abs() < 1e-6, "{kind} range {sent} kept as {range}, not {kept}");+ }+ }+ let doc = |id: &str| specs().into_iter().find(|c| c.id == id).map(|c| c.params).unwrap_or_default();+ assert!(doc("layer.layerStyle.outerGlow").contains(r#""range":1..100=50"#));+ assert!(doc("layer.layerStyle.innerGlow").contains(r#""range":1..100=50"#));+ }++ #[test]+ fn bevel_gloss_anti_alias_is_a_param() {+ let mut s = session();+ s.execute("layer.layerStyle.bevelEmboss", json!({"glossContour": "Ring - Double", "glossAntiAlias": true})).unwrap();+ let Effect::BevelEmboss(b) = &effects(&s)[0] else { panic!() };+ assert!(b.gloss_anti_alias);+ s.execute("layer.layerStyle.bevelEmboss", json!({"glossAntiAlias": false})).unwrap();+ let Effect::BevelEmboss(b) = &effects(&s)[0] else { panic!() };+ assert!(!b.gloss_anti_alias);+ }++ #[test]+ fn stroke_overprint_is_a_param() {+ let mut s = session();+ s.execute("layer.layerStyle.stroke", json!({"size": 4, "overprint": true})).unwrap();+ let Effect::Stroke(st) = &effects(&s)[0] else { panic!() };+ assert!(st.overprint);+ s.execute("layer.layerStyle.stroke", json!({"overprint": false})).unwrap();+ let Effect::Stroke(st) = &effects(&s)[0] else { panic!() };+ assert!(!st.overprint);+ }++ #[test]+ fn bevel_shading_fields_are_independent_and_preserved_on_partial_edits() {+ let mut s = session();+ s.execute(+ "layer.layerStyle.bevelEmboss",+ json!({+ "highlightBlend": "Normal", "highlightColor": "#ff0000", "highlightOpacity": 35,+ "shadowBlend": "Color Burn", "shadowColor": "#0000ff", "shadowOpacity": 60+ }),+ )+ .unwrap();+ let fx = effects(&s);+ let Effect::BevelEmboss(bevel) = &fx[0] else { panic!("{fx:?}") };+ assert_eq!(bevel.highlight.blend, BlendMode::Normal);+ assert_eq!(bevel.highlight_color, Color::rgb(1.0, 0.0, 0.0));+ assert!((bevel.highlight.opacity - 0.35).abs() < 0.001);+ assert_eq!(bevel.shadow.blend, BlendMode::ColorBurn);+ assert_eq!(bevel.shadow_color, Color::rgb(0.0, 0.0, 1.0));+ assert!((bevel.shadow.opacity - 0.60).abs() < 0.001);++ let mut changed = fx[0].clone();+ overlay_effect(&mut changed, &json!({"size": 12}));+ let Effect::BevelEmboss(partial) = &changed else { panic!("expected bevel") };+ assert_eq!(partial.highlight, bevel.highlight);+ assert_eq!(partial.highlight_color, bevel.highlight_color);+ assert_eq!(partial.shadow, bevel.shadow);+ assert_eq!(partial.shadow_color, bevel.shadow_color);++ overlay_effect(&mut changed, &json!({"highlightOpacity": 120, "shadowOpacity": -30}));+ let Effect::BevelEmboss(limits) = &changed else { panic!("expected bevel") };+ assert_eq!((limits.highlight.opacity, limits.shadow.opacity), (1.0, 0.0));+ }+#[test]fn every_style_command_adds_its_effect() {for kind in ["dropShadow", "innerShadow", "outerGlow", "innerGlow", "stroke", "colorOverlay", "gradientOverlay", "bevelEmboss", "satin"] {diff --cc crates/ui-egui/src/i18n/cs.tsvindex ab918f9b3,546a91648..bb63ec965--- a/crates/ui-egui/src/i18n/cs.tsv+++ b/crates/ui-egui/src/i18n/cs.tsv@@@ -3808,9 -3778,13 +3808,16 @@@ navigator Zoom Zvětšen�Sent to {printer} Odesláno do {printer}set in Print Settings… nastavuje se v nastavení tisku…ICO is limited to 256 × 256 pixels ICO je omezen na 256 × 256 pixelů+# History panel › History Brush source (#2966)+ Paints from the History panel's source state Maluje ze zdrojového stavu panelu Historie+ Sets the source for the history brush Nastaví zdroj pro štětec historie+ # Bevel & Emboss shading controls.+ Highlight Mode Režim světel+ Highlight Color Barva světel+ Highlight Opacity Krytí světel+ Shadow Mode Režim stínů+ Shadow Color Barva stínů+ Shadow Opacity Krytí stínů# Embedded Profile Mismatch: profile names beside the choices, Remember this choiceUse the embedded profile ({profile}) Použít vložený profil ({profile})Convert to the working space ({profile}) Převést do pracovního prostoru barev ({profile})diff --cc crates/ui-egui/src/i18n/de.tsvindex 2fae6d9de,017292f67..7d961b61d--- a/crates/ui-egui/src/i18n/de.tsv+++ b/crates/ui-egui/src/i18n/de.tsv@@@ -3205,9 -3171,13 +3205,16 @@@ curves Smooth GlätteSent to {printer} An {printer} gesendetset in Print Settings… in den Druckeinstellungen festlegen…ICO is limited to 256 × 256 pixels ICO ist auf 256 × 256 Pixel begrenzt+# History panel › History Brush source (#2966)+ Paints from the History panel's source state Malt aus dem Quellzustand des Protokollbedienfelds+ Sets the source for the history brush Legt die Quelle für den Protokollpinsel fest+ # Bevel & Emboss shading controls.+ Highlight Mode Lichtermodus+ Highlight Color Lichterfarbe+ Highlight Opacity Lichterdeckkraft+ Shadow Mode Schattenmodus+ Shadow Color Schattenfarbe+ Shadow Opacity Schattendeckkraft# Embedded Profile Mismatch: profile names beside the choices, Remember this choiceUse the embedded profile ({profile}) Eingebettetes Profil verwenden ({profile})Convert to the working space ({profile}) In den Arbeitsfarbraum konvertieren ({profile})diff --cc crates/ui-egui/src/i18n/el.tsvindex 588d9b909,6fe9881ce..5126bf334--- a/crates/ui-egui/src/i18n/el.tsv+++ b/crates/ui-egui/src/i18n/el.tsv@@@ -3895,9 -3868,13 +3895,16 @@@ curves Smooth Εξομάλυνσ�Sent to {printer} Στάλθηκε στον {printer}set in Print Settings… ορίζεται στις ρυθμίσεις εκτύπωσης…ICO is limited to 256 × 256 pixels Το ICO περιορίζεται σε 256 × 256 εικονοστοιχεία+# History panel › History Brush source (#2966)+ Paints from the History panel's source state Βάφει από την κατάσταση πηγής του πίνακα Ιστορικό+ Sets the source for the history brush Ορίζει την πηγή για το πινέλο ιστορικού+ # Bevel & Emboss shading controls.+ Highlight Mode Λειτουργία φωτεινών τόνων+ Highlight Color Χρώμα φωτεινών τόνων+ Highlight Opacity Αδιαφάνεια φωτεινών τόνων+ Shadow Mode Λειτουργία σκιών+ Shadow Color Χρώμα σκιών+ Shadow Opacity Αδιαφάνεια σκιών# Embedded Profile Mismatch: profile names beside the choices, Remember this choiceUse the embedded profile ({profile}) Χρήση ενσωματωμένου προφίλ ({profile})Convert to the working space ({profile}) Μετατροπή στον χώρο εργασίας ({profile})diff --cc crates/ui-egui/src/i18n/es.tsvindex 5c51baa9f,0cb593050..e7dc764fc--- a/crates/ui-egui/src/i18n/es.tsv+++ b/crates/ui-egui/src/i18n/es.tsv@@@ -4158,9 -4131,13 +4158,16 @@@ navigator Zoom ZooSent to {printer} Enviado a {printer}set in Print Settings… se establece en Ajustes de impresión…ICO is limited to 256 × 256 pixels ICO está limitado a 256 × 256 píxeles+# History panel › History Brush source (#2966)+ Paints from the History panel's source state Pinta a partir del estado de origen del panel Historia+ Sets the source for the history brush Establece el origen del pincel de historia+ # Bevel & Emboss shading controls.+ Highlight Mode Modo de luces+ Highlight Color Color de luces+ Highlight Opacity Opacidad de luces+ Shadow Mode Modo de sombras+ Shadow Color Color de sombras+ Shadow Opacity Opacidad de sombras# Embedded Profile Mismatch: profile names beside the choices, Remember this choiceUse the embedded profile ({profile}) Usar el perfil incrustado ({profile})Convert to the working space ({profile}) Convertir al espacio de trabajo ({profile})diff --cc crates/ui-egui/src/i18n/fr.tsvindex a8ffdcc6a,fbb3af684..434e3b125--- a/crates/ui-egui/src/i18n/fr.tsv+++ b/crates/ui-egui/src/i18n/fr.tsv@@@ -3204,9 -3176,13 +3204,16 @@@ curves Smooth LisseSent to {printer} Envoyé à {printer}set in Print Settings… défini dans les paramètres d’impression…ICO is limited to 256 × 256 pixels Le format ICO est limité à 256 × 256 pixels+# History panel › History Brush source (#2966)+ Paints from the History panel's source state Peint à partir de l'état source du panneau Historique+ Sets the source for the history brush Définit la source du pinceau d'historique+ # Bevel & Emboss shading controls.+ Highlight Mode Mode des tons clairs+ Highlight Color Couleur des tons clairs+ Highlight Opacity Opacité des tons clairs+ Shadow Mode Mode des ombres+ Shadow Color Couleur des ombres+ Shadow Opacity Opacité des ombres# Embedded Profile Mismatch: profile names beside the choices, Remember this choiceUse the embedded profile ({profile}) Utiliser le profil incorporé ({profile})Convert to the working space ({profile}) Convertir vers l'espace de travail ({profile})diff --cc crates/ui-egui/src/i18n/id.tsvindex 2e6239038,542f08e28..1e8aa03d2--- a/crates/ui-egui/src/i18n/id.tsv+++ b/crates/ui-egui/src/i18n/id.tsv@@@ -3191,9 -3163,13 +3191,16 @@@ curves Smooth HaluskaSent to {printer} Dikirim ke {printer}set in Print Settings… diatur di Pengaturan Cetak…ICO is limited to 256 × 256 pixels ICO dibatasi hingga 256 × 256 piksel+# History panel › History Brush source (#2966)+ Paints from the History panel's source state Melukis dari status sumber panel Riwayat+ Sets the source for the history brush Menetapkan sumber untuk kuas riwayat+ # Bevel & Emboss shading controls.+ Highlight Mode Mode Sorotan+ Highlight Color Warna Sorotan+ Highlight Opacity Opasitas Sorotan+ Shadow Mode Mode Bayangan+ Shadow Color Warna Bayangan+ Shadow Opacity Opasitas Bayangan# Embedded Profile Mismatch: profile names beside the choices, Remember this choiceUse the embedded profile ({profile}) Pakai profil tertanam ({profile})Convert to the working space ({profile}) Konversi ke working space ({profile})diff --cc crates/ui-egui/src/i18n/it.tsvindex b029b6aea,15a4f2157..1014f26c8--- a/crates/ui-egui/src/i18n/it.tsv+++ b/crates/ui-egui/src/i18n/it.tsv@@@ -4161,9 -4134,13 +4161,16 @@@ navigator Zoom ZooSent to {printer} Inviato a {printer}set in Print Settings… impostato nelle impostazioni di stampa…ICO is limited to 256 × 256 pixels ICO è limitato a 256 × 256 pixel+# History panel › History Brush source (#2966)+ Paints from the History panel's source state Dipinge dallo stato di origine del pannello Cronologia+ Sets the source for the history brush Imposta l'origine del pennello storia+ # Bevel & Emboss shading controls.+ Highlight Mode Metodo luci+ Highlight Color Colore luci+ Highlight Opacity Opacità luci+ Shadow Mode Metodo ombre+ Shadow Color Colore ombre+ Shadow Opacity Opacità ombre# Embedded Profile Mismatch: profile names beside the choices, Remember this choiceUse the embedded profile ({profile}) Usa profilo incorporato ({profile})Convert to the working space ({profile}) Converti in spazio di lavoro ({profile})diff --cc crates/ui-egui/src/i18n/ja.tsvindex 5602f7a91,db7cdc88b..4d8e41da5--- a/crates/ui-egui/src/i18n/ja.tsv+++ b/crates/ui-egui/src/i18n/ja.tsv@@@ -3875,9 -3848,13 +3875,16 @@@ curves Smooth スムー�Reset All Locked Settings ロックされた設定をすべて初期化Copy Texture to Other Tools テクスチャを他のツールにコピーICO is limited to 256 × 256 pixels ICO は 256 × 256 ピクセルまでです+# History panel › History Brush source (#2966)+ Paints from the History panel's source state ヒストリーパネルのソース状態からペイントします+ Sets the source for the history brush ヒストリーブラシのソースを設定します+ # Bevel & Emboss shading controls.+ Highlight Mode ハイライトモード+ Highlight Color ハイライトカラー+ Highlight Opacity ハイライト不透明度+ Shadow Mode シャドウモード+ Shadow Color シャドウカラー+ Shadow Opacity シャドウ不透明度# Embedded Profile Mismatch: profile names beside the choices, Remember this choiceUse the embedded profile ({profile}) 埋め込みプロファイルを使用 ({profile})Convert to the working space ({profile}) 作業用スペースに変換 ({profile})diff --cc crates/ui-egui/src/i18n/ko.tsvindex 4e355a66d,f7f7c1cf3..61ceeeca0--- a/crates/ui-egui/src/i18n/ko.tsv+++ b/crates/ui-egui/src/i18n/ko.tsv@@@ -3381,9 -3347,13 +3381,16 @@@ curves Smooth 매끄럽�Sent to {printer} {printer}(으)로 전송됨set in Print Settings… 인쇄 설정에서 지정…ICO is limited to 256 × 256 pixels ICO는 256 × 256픽셀로 제한됩니다+# History panel › History Brush source (#2966)+ Paints from the History panel's source state 작업 내역 패널의 소스 상태에서 칠합니다+ Sets the source for the history brush 작업 내역 브러시의 소스를 설정합니다+ # Bevel & Emboss shading controls.+ Highlight Mode 하이라이트 모드+ Highlight Color 하이라이트 색상+ Highlight Opacity 하이라이트 불투명도+ Shadow Mode 그림자 모드+ Shadow Color 그림자 색상+ Shadow Opacity 그림자 불투명도# Embedded Profile Mismatch: profile names beside the choices, Remember this choiceUse the embedded profile ({profile}) 포함된 프로파일 사용({profile})Convert to the working space ({profile}) 작업 색상 공간으로 변환({profile})diff --cc crates/ui-egui/src/i18n/nl.tsvindex dedcfa112,092a80b81..35b378c1e--- a/crates/ui-egui/src/i18n/nl.tsv+++ b/crates/ui-egui/src/i18n/nl.tsv@@@ -3957,9 -3930,13 +3957,16 @@@ curves Smooth Vloeiend makeSent to {printer} Verzonden naar {printer}set in Print Settings… instellen in de afdrukinstellingen…ICO is limited to 256 × 256 pixels ICO is beperkt tot 256 × 256 pixels+# History panel › History Brush source (#2966)+ Paints from the History panel's source state Schildert vanuit de bronstatus van het deelvenster Geschiedenis+ Sets the source for the history brush Stelt de bron voor het historiepenseel in+ # Bevel & Emboss shading controls.+ Highlight Mode Hooglichtmodus+ Highlight Color Hooglichtkleur+ Highlight Opacity Hooglichtdekking+ Shadow Mode Schaduwmodus+ Shadow Color Schaduwkleur+ Shadow Opacity Schaduwdekking# Embedded Profile Mismatch: profile names beside the choices, Remember this choiceUse the embedded profile ({profile}) Het ingesloten profiel gebruiken ({profile})Convert to the working space ({profile}) Omzetten naar de werkruimte ({profile})diff --cc crates/ui-egui/src/i18n/pl.tsvindex 9790e2625,c017f6e85..d7da154ff--- a/crates/ui-egui/src/i18n/pl.tsv+++ b/crates/ui-egui/src/i18n/pl.tsv@@@ -3795,9 -3768,13 +3795,16 @@@ curves Smooth Wygład�Sent to {printer} Wysłano do {printer}set in Print Settings… ustawiane w ustawieniach druku…ICO is limited to 256 × 256 pixels ICO jest ograniczony do 256 × 256 pikseli+# History panel › History Brush source (#2966)+ Paints from the History panel's source state Maluje ze stanu źródłowego panelu Historia+ Sets the source for the history brush Ustawia źródło dla pędzla historii+ # Bevel & Emboss shading controls.+ Highlight Mode Tryb świateł+ Highlight Color Kolor świateł+ Highlight Opacity Krycie świateł+ Shadow Mode Tryb cieni+ Shadow Color Kolor cieni+ Shadow Opacity Krycie cieni# Embedded Profile Mismatch: profile names beside the choices, Remember this choiceUse the embedded profile ({profile}) Użyj osadzonego profilu ({profile})Convert to the working space ({profile}) Konwertuj na przestrzeń roboczą ({profile})diff --cc crates/ui-egui/src/i18n/pt-br.tsvindex 8d9db9079,c8c1a6153..0973a9d2a--- a/crates/ui-egui/src/i18n/pt-br.tsv+++ b/crates/ui-egui/src/i18n/pt-br.tsv@@@ -3987,9 -3960,13 +3987,16 @@@ layerLabel No Color Sem coSent to {printer} Enviado para {printer}set in Print Settings… definido nas configurações de impressão…ICO is limited to 256 × 256 pixels ICO é limitado a 256 × 256 pixels+# History panel › History Brush source (#2966)+ Paints from the History panel's source state Pinta a partir do estado de origem do painel Histórico+ Sets the source for the history brush Define a origem do pincel do histórico+ # Bevel & Emboss shading controls.+ Highlight Mode Modo de realces+ Highlight Color Cor dos realces+ Highlight Opacity Opacidade dos realces+ Shadow Mode Modo de sombras+ Shadow Color Cor das sombras+ Shadow Opacity Opacidade das sombras# Embedded Profile Mismatch: profile names beside the choices, Remember this choiceUse the embedded profile ({profile}) Usar o perfil incorporado ({profile})Convert to the working space ({profile}) Converter para o espaço de trabalho ({profile})diff --cc crates/ui-egui/src/i18n/uk.tsvindex a57695407,9b4282a31..a5d4d90da--- a/crates/ui-egui/src/i18n/uk.tsv+++ b/crates/ui-egui/src/i18n/uk.tsv@@@ -3896,9 -3869,13 +3896,16 @@@ curves Smooth Згладит�Sent to {printer} Надіслано на {printer}set in Print Settings… задається в параметрах друку…ICO is limited to 256 × 256 pixels ICO обмежено розміром 256 × 256 пікселів+# History panel › History Brush source (#2966)+ Paints from the History panel's source state Малює з вихідного стану панелі «Історія»+ Sets the source for the history brush Задає джерело для пензля історії+ # Bevel & Emboss shading controls.+ Highlight Mode Режим світлих тонів+ Highlight Color Колір світлих тонів+ Highlight Opacity Непрозорість світлих тонів+ Shadow Mode Режим тіней+ Shadow Color Колір тіней+ Shadow Opacity Непрозорість тіней# Embedded Profile Mismatch: profile names beside the choices, Remember this choiceUse the embedded profile ({profile}) Використати вбудований профіль ({profile})Convert to the working space ({profile}) Перетворити в робочий простір ({profile})diff --cc crates/ui-egui/src/i18n/vi.tsvindex 3a9585111,9810a6f36..796b77c8e--- a/crates/ui-egui/src/i18n/vi.tsv+++ b/crates/ui-egui/src/i18n/vi.tsv@@@ -3667,9 -3656,13 +3667,16 @@@ curves Smooth Làm mượSent to {printer} Đã gửi tới {printer}set in Print Settings… đặt trong thiết lập in…ICO is limited to 256 × 256 pixels ICO giới hạn ở 256 × 256 pixel+# History panel › History Brush source (#2966)+ Paints from the History panel's source state Vẽ từ trạng thái nguồn của bảng Lịch sử+ Sets the source for the history brush Đặt nguồn cho cọ lịch sử+ # Bevel & Emboss shading controls.+ Highlight Mode Chế độ vùng sáng+ Highlight Color Màu vùng sáng+ Highlight Opacity Độ mờ vùng sáng+ Shadow Mode Chế độ bóng+ Shadow Color Màu bóng+ Shadow Opacity Độ mờ bóng# Embedded Profile Mismatch: profile names beside the choices, Remember this choiceUse the embedded profile ({profile}) Dùng hồ sơ nhúng ({profile})Convert to the working space ({profile}) Chuyển sang không gian làm việc ({profile})diff --cc crates/ui-egui/src/i18n/zh-hans.tsvindex 4c3611ba6,b0ade102e..91fdee3cf--- a/crates/ui-egui/src/i18n/zh-hans.tsv+++ b/crates/ui-egui/src/i18n/zh-hans.tsv@@@ -2823,9 -2788,13 +2823,16 @@@ curves Smooth 平�Sent to {printer} 已发送到 {printer}set in Print Settings… 在打印设置中设置…ICO is limited to 256 × 256 pixels ICO 最大为 256 × 256 像素+# History panel › History Brush source (#2966)+ Paints from the History panel's source state 从历史记录面板的源状态绘画+ Sets the source for the history brush 设置历史记录画笔的源+ # Bevel & Emboss shading controls.+ Highlight Mode 高光模式+ Highlight Color 高光颜色+ Highlight Opacity 高光不透明度+ Shadow Mode 阴影模式+ Shadow Color 阴影颜色+ Shadow Opacity 阴影不透明度# Embedded Profile Mismatch: profile names beside the choices, Remember this choiceUse the embedded profile ({profile}) 使用嵌入的配置文件({profile})Convert to the working space ({profile}) 转换到工作空间({profile})diff --cc crates/ui-egui/src/i18n/zh-hant.tsvindex f19dd6e37,5279d6434..15b1193e6--- a/crates/ui-egui/src/i18n/zh-hant.tsv+++ b/crates/ui-egui/src/i18n/zh-hant.tsv@@@ -2808,9 -2773,13 +2808,16 @@@ curves Smooth 平�Sent to {printer} 已傳送至 {printer}set in Print Settings… 在列印設定中設定…ICO is limited to 256 × 256 pixels ICO 最大為 256 × 256 像素+# History panel › History Brush source (#2966)+ Paints from the History panel's source state 從步驟記錄面板的來源狀態繪畫+ Sets the source for the history brush 設定步驟記錄筆刷的來源+ # Bevel & Emboss shading controls.+ Highlight Mode 亮部模式+ Highlight Color 亮部顏色+ Highlight Opacity 亮部不透明度+ Shadow Mode 陰影模式+ Shadow Color 陰影顏色+ Shadow Opacity 陰影不透明度# Embedded Profile Mismatch: profile names beside the choices, Remember this choiceUse the embedded profile ({profile}) 使用內嵌描述檔 ({profile})Convert to the working space ({profile}) 轉換為工作空間 ({profile})diff --cc crates/ui-egui/src/layer_style.rsindex f3dcfad4e,1b68b318d..567e3d5e1--- a/crates/ui-egui/src/layer_style.rs+++ b/crates/ui-egui/src/layer_style.rs@@@ -178,7 -172,13 +178,13 @@@ fn spec(kind: &str) -> &'static [(&'sta("angle", "Angle", P::Angle),("useGlobalLight", "Use Global Light", P::Check),("altitude", "Altitude", P::Slider(0.0, 90.0, "°")),- ("glossContour", "Gloss Contour", P::Contour(None)),+ ("glossContour", "Gloss Contour", P::Contour(Some("glossAntiAlias"))),+ ("highlightBlend", "Highlight Mode", P::Blend),+ ("highlightColor", "Highlight Color", P::Color),+ ("highlightOpacity", "Highlight Opacity", P::Slider(0.0, 100.0, "%")),+ ("shadowBlend", "Shadow Mode", P::Blend),+ ("shadowColor", "Shadow Color", P::Color),+ ("shadowOpacity", "Shadow Opacity", P::Slider(0.0, 100.0, "%")),// Bevel & Emboss › Contour element.("contour", "Contour", P::Check),("contourName", "", P::Contour(Some("contourAntiAlias"))),@@@ -363,7 -361,12 +369,13 @@@ fn values_of(e: &Effect, light: f32) -set(&mut v, "altitude", json!(b.altitude));set(&mut v, "direction", json!(if b.up { "up" } else { "down" }));set(&mut v, "glossContour", photocraft_engine::layer_style::contour_param(&b.gloss_contour));+ set(&mut v, "glossAntiAlias", json!(b.gloss_anti_alias));+ set(&mut v, "highlightBlend", json!(b.highlight.blend.label()));+ set(&mut v, "highlightColor", json!(hex(&b.highlight_color)));+ set(&mut v, "highlightOpacity", json!((b.highlight.opacity * 100.0).round()));+ set(&mut v, "shadowBlend", json!(b.shadow.blend.label()));+ set(&mut v, "shadowColor", json!(hex(&b.shadow_color)));+ set(&mut v, "shadowOpacity", json!((b.shadow.opacity * 100.0).round()));set(&mut v, "contour", json!(b.contour.is_some()));if let Some(c) = &b.contour {set(&mut v, "contourName", photocraft_engine::layer_style::contour_param(&c.contour));