From b7d0f8f992ea6f7ad6bcb9c6c7fcd40ca511eca1 Mon Sep 17 00:00:00 2001 From: Gautam Panakkal Date: Thu, 3 Apr 2025 20:27:40 -0700 Subject: [PATCH 1/3] Add margin to separate radio buttons and checkboxes from their labels --- web/xfa_layer_builder.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/web/xfa_layer_builder.css b/web/xfa_layer_builder.css index 72009759b..ac8bc0666 100644 --- a/web/xfa_layer_builder.css +++ b/web/xfa_layer_builder.css @@ -157,6 +157,14 @@ max-height: 100%; } +:is(.xfaRight) > :is(.xfaRadio, .xfaCheckbox) { + margin-right: 4px; +} + +:is(.xfaLeft) > :is(.xfaRadio, .xfaCheckbox) { + margin-left: 4px; +} + .xfaTop { display: flex; flex-direction: column; From 2d81c4df1433bb22cdf74f4df96976ba2522b33a Mon Sep 17 00:00:00 2001 From: gpanakkal <111669555+gpanakkal@users.noreply.github.com> Date: Thu, 10 Apr 2025 12:23:23 -0700 Subject: [PATCH 2/3] Reduce check button margin to more closely match Acrobat styling --- web/xfa_layer_builder.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/xfa_layer_builder.css b/web/xfa_layer_builder.css index ac8bc0666..97f689122 100644 --- a/web/xfa_layer_builder.css +++ b/web/xfa_layer_builder.css @@ -157,12 +157,12 @@ max-height: 100%; } -:is(.xfaRight) > :is(.xfaRadio, .xfaCheckbox) { - margin-right: 4px; +.xfaRight > :is(.xfaRadio, .xfaCheckbox) { + margin-right: 2.5px; } -:is(.xfaLeft) > :is(.xfaRadio, .xfaCheckbox) { - margin-left: 4px; +.xfaLeft > :is(.xfaRadio, .xfaCheckbox) { + margin-left: 2.5px; } .xfaTop { From 9a7c3e727a22c15f5d876daa96984892f5f10599 Mon Sep 17 00:00:00 2001 From: gpanakkal <111669555+gpanakkal@users.noreply.github.com> Date: Thu, 10 Apr 2025 12:24:03 -0700 Subject: [PATCH 3/3] Pass CheckButton node into `toStyle` call --- src/core/xfa/template.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/xfa/template.js b/src/core/xfa/template.js index 594ab25a7..6a5b6480f 100644 --- a/src/core/xfa/template.js +++ b/src/core/xfa/template.js @@ -1321,7 +1321,7 @@ class CheckButton extends XFAObject { [$toHTML](availableSpace) { // TODO: border, shape and mark. - const style = toStyle("margin"); + const style = toStyle(this, "margin"); const size = measureToString(this.size); style.width = style.height = size;