https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41255

            Bug ID: 41255
           Summary: Text fields center / right align on patron card is
                    wonky
   Initiative type: ---
        Sponsorship ---
            status:
           Product: Koha
           Version: 24.11
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: Label/patron card printing
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]

Created attachment 189625
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189625&action=edit
UX screenshot

Version: 24.11.10 (LTS)

layout_xml (left aligned text field)

<opt guide_box="1" guide_grid="0" page_side="F" units="POINT">
  <barcode height_scale="0.008" llx="35" lly="10" print="1" type="CODE39"
width_scale="0.8" />
  <text>☐ Year 1   ☐ Year 2   ☐ Year 3   ☐ Year 4</text>
  <text font="H" font_size="10" llx="0" lly="75" text_alignment="L" />
</opt>

When text_alignment="L" - output is OK (Screenshot #1)

When text_alignment="C" - output is wonky (Screenshot #2)

When text_alignment="R" - output is wonky (Screenshot #3)

NOTE: all other settings being same for L, C and R

This seems to fix the issue (I may have missed outlier / edge cases)

diff /usr/share/koha/lib/C4/Patroncards/Patroncard.pm
/usr/share/koha/lib/C4/Patroncards/Patroncard.pm.new
325c325
<             ($Tx, $Tw) = text_alignment($origin_llx, $self->{'width'},
$lly_text_attr * $self->{'unitvalue'}, $string_width, $line,
$text_attribs->{'text_alignment'});
---
>             ($Tx, $Tw) = text_alignment($origin_llx, $self->{'width'}, 
> $llx_text_attr * $self->{'unitvalue'}, $string_width, $line, 
> $text_attribs->{'text_alignment'});

diff /usr/share/koha/lib/C4/Patroncards/Lib.pm
/usr/share/koha/lib/C4/Patroncards/Lib.pm.new
62c62
<         $Tx = ($text_box_width - $string_width) + (($origin_llx - $text_llx)
/ 2);
---
>         $Tx = ($text_box_width - $string_width) + ($origin_llx - $text_llx);

Can someone pls verify this?

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to