mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-07-24 13:41:01 +03:00
feat(form-decompile,form-compile): loadTransparent картинки команд/кнопок/попапов (захват явного false)
Прозрачность картинки (<Picture><xr:LoadTransparent>) у Command/Button/Popup компилятор хардкодил true, а в корпусе значение смешано (Command true 11410/false 8066; Popup true 3142/false 2828). Явный false терялся. Теперь компилятор эмитит loadTransparent факт. значение (дефолт true — платформа всегда пишет тег внутри Picture; false при явном loadTransparent:false). Декомпилятор фиксирует ТОЛЬКО отклонение false (true опускается — додумывается дефолтом, без шума в DSL). Свойство плоское рядом с picture — консистентно с PictureDecoration(src)/PictureField(valuesPicture). TOTAL diff lines выборки 2.17: 2489 → 2415 (-74). Command/Button/Popup LoadTransparent residual → 0. Остаток (отдельный хвост): PictureField (HeaderPicture/valuesPicture), CheckBoxField-cascade, Table rowsPicture — другие картиночные объекты. Снапшот button-group (popup loadTransparent:false) сертифицирован в 1С (8.3.24). Регресс form-compile 34/34 зелёный на ps + python. decompile v0.42, compile v1.60. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
4430ebc42e
commit
8448a28a29
@@ -1,4 +1,4 @@
|
||||
# form-compile v1.59 — Compile 1C managed form from JSON or object metadata
|
||||
# form-compile v1.60 — Compile 1C managed form from JSON or object metadata
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
param(
|
||||
[string]$JsonPath,
|
||||
@@ -3399,7 +3399,7 @@ function Emit-Button {
|
||||
if ($el.picture) {
|
||||
X "$inner<Picture>"
|
||||
X "$inner`t<xr:Ref>$($el.picture)</xr:Ref>"
|
||||
X "$inner`t<xr:LoadTransparent>true</xr:LoadTransparent>"
|
||||
X "$inner`t<xr:LoadTransparent>$(if ($el.loadTransparent -eq $false){'false'}else{'true'})</xr:LoadTransparent>"
|
||||
X "$inner</Picture>"
|
||||
}
|
||||
|
||||
@@ -3598,7 +3598,7 @@ function Emit-Popup {
|
||||
if ($el.picture) {
|
||||
X "$inner<Picture>"
|
||||
X "$inner`t<xr:Ref>$($el.picture)</xr:Ref>"
|
||||
X "$inner`t<xr:LoadTransparent>true</xr:LoadTransparent>"
|
||||
X "$inner`t<xr:LoadTransparent>$(if ($el.loadTransparent -eq $false){'false'}else{'true'})</xr:LoadTransparent>"
|
||||
X "$inner</Picture>"
|
||||
}
|
||||
|
||||
@@ -3852,7 +3852,7 @@ function Emit-Commands {
|
||||
if ($cmd.picture) {
|
||||
X "$inner<Picture>"
|
||||
X "$inner`t<xr:Ref>$($cmd.picture)</xr:Ref>"
|
||||
X "$inner`t<xr:LoadTransparent>true</xr:LoadTransparent>"
|
||||
X "$inner`t<xr:LoadTransparent>$(if ($cmd.loadTransparent -eq $false){'false'}else{'true'})</xr:LoadTransparent>"
|
||||
X "$inner</Picture>"
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# form-compile v1.59 — Compile 1C managed form from JSON or object metadata
|
||||
# form-compile v1.60 — Compile 1C managed form from JSON or object metadata
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
import argparse
|
||||
import copy
|
||||
@@ -3097,7 +3097,7 @@ def emit_button(lines, el, name, eid, indent, in_cmd_bar=False):
|
||||
if el.get('picture'):
|
||||
lines.append(f'{inner}<Picture>')
|
||||
lines.append(f'{inner}\t<xr:Ref>{el["picture"]}</xr:Ref>')
|
||||
lines.append(f'{inner}\t<xr:LoadTransparent>true</xr:LoadTransparent>')
|
||||
lines.append(f'{inner}\t<xr:LoadTransparent>{"false" if el.get("loadTransparent") is False else "true"}</xr:LoadTransparent>')
|
||||
lines.append(f'{inner}</Picture>')
|
||||
|
||||
if el.get('representation'):
|
||||
@@ -3251,7 +3251,7 @@ def emit_popup(lines, el, name, eid, indent):
|
||||
if el.get('picture'):
|
||||
lines.append(f'{inner}<Picture>')
|
||||
lines.append(f'{inner}\t<xr:Ref>{el["picture"]}</xr:Ref>')
|
||||
lines.append(f'{inner}\t<xr:LoadTransparent>true</xr:LoadTransparent>')
|
||||
lines.append(f'{inner}\t<xr:LoadTransparent>{"false" if el.get("loadTransparent") is False else "true"}</xr:LoadTransparent>')
|
||||
lines.append(f'{inner}</Picture>')
|
||||
|
||||
if el.get('representation'):
|
||||
@@ -3509,7 +3509,7 @@ def emit_commands(lines, cmds, indent):
|
||||
if cmd.get('picture'):
|
||||
lines.append(f'{inner}<Picture>')
|
||||
lines.append(f'{inner}\t<xr:Ref>{cmd["picture"]}</xr:Ref>')
|
||||
lines.append(f'{inner}\t<xr:LoadTransparent>true</xr:LoadTransparent>')
|
||||
lines.append(f'{inner}\t<xr:LoadTransparent>{"false" if cmd.get("loadTransparent") is False else "true"}</xr:LoadTransparent>')
|
||||
lines.append(f'{inner}</Picture>')
|
||||
|
||||
if cmd.get('representation'):
|
||||
|
||||
Reference in New Issue
Block a user