DeliveryConfirmation: Fix text alignment
All checks were successful
Test / Run tests (push) Successful in 2m3s
All checks were successful
Test / Run tests (push) Successful in 2m3s
This commit is contained in:
@@ -120,8 +120,8 @@ namespace Elwig.Documents {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (i == p.Buckets.Length - 1) {
|
if (i == p.Buckets.Length - 1) {
|
||||||
sub.AddCell(NewTd($"{p.Weight:N0}"));
|
sub.AddCell(NewTd($"{p.Weight:N0}", right: true));
|
||||||
sub.AddCell(NewTd(p.IsNetWeight ? "\u2611" : "\u2610", 7, center: true).SetFont(SF).SetPadding(0));
|
sub.AddCell(NewTd(p.IsNetWeight ? "\u2611" : "\u2610", 7, right: true).SetFont(SF).SetPadding(0));
|
||||||
} else {
|
} else {
|
||||||
sub.AddCell(NewCell(colspan: 2));
|
sub.AddCell(NewCell(colspan: 2));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -297,7 +297,7 @@ namespace Elwig.Documents {
|
|||||||
|
|
||||||
protected Cell NewTh(string? text, float fontSize = 8, int rowspan = 1, int colspan = 1, bool left = false, bool rotated = false) {
|
protected Cell NewTh(string? text, float fontSize = 8, int rowspan = 1, int colspan = 1, bool left = false, bool rotated = false) {
|
||||||
var p = new KernedParagraph(text ?? "", fontSize);
|
var p = new KernedParagraph(text ?? "", fontSize);
|
||||||
if (rotated) p.SetRotationAngle(rotated ? 0.5 * Math.PI : 0);
|
if (rotated) p.SetRotationAngle(0.5 * Math.PI);
|
||||||
var cell = NewCell(p, rowspan: rowspan, colspan: colspan)
|
var cell = NewCell(p, rowspan: rowspan, colspan: colspan)
|
||||||
.SetTextAlignment(left ? TextAlignment.LEFT : TextAlignment.CENTER)
|
.SetTextAlignment(left ? TextAlignment.LEFT : TextAlignment.CENTER)
|
||||||
.SetVerticalAlignment(VerticalAlignment.MIDDLE)
|
.SetVerticalAlignment(VerticalAlignment.MIDDLE)
|
||||||
|
|||||||
Reference in New Issue
Block a user