fix: null-coalescing for KV fields + PdfTheme brush rename (NegativeRedBrush/PositiveGreenBrush)
This commit is contained in:
@@ -31,7 +31,7 @@ public static class PdfTheme
|
||||
public static readonly Color SeparatorLine = Color.FromArgb(255, 221, 221, 221); // #DDDDDD
|
||||
public static readonly Color TableBorder = Color.FromArgb(255, 187, 187, 187); // #BBBBBB
|
||||
public static readonly Color TableAltRow = Color.FromArgb(255, 247, 249, 252); // #F7F9FC
|
||||
public static readonly Color TableHeaderBg = Color.FromArgb(255, 21, 101, 192); // #1565C0
|
||||
// TableHeaderBg is AccentBlue — use AccentBlueBrush / TableHeaderBrush directly
|
||||
|
||||
// ─── Font ──────────────────────────────────────────────────────────
|
||||
private static readonly PdfStandardFont _fontRegular = new(PdfFontFamily.Helvetica, 8f);
|
||||
@@ -75,12 +75,12 @@ public static class PdfTheme
|
||||
public static PdfBrush PositiveBrush => new PdfSolidBrush(PositiveValue);
|
||||
public static PdfBrush NegativeBrush => new PdfSolidBrush(NegativeValue);
|
||||
public static PdfPen BorderPen => new PdfPen(BorderColor, 0.5f);
|
||||
public static PdfBrush AccentBlueBrush => new PdfSolidBrush(AccentBlue);
|
||||
public static PdfBrush NegativeBrush2 => new PdfSolidBrush(NegativeRed);
|
||||
public static PdfBrush PositiveBrush2 => new PdfSolidBrush(PositiveGreen);
|
||||
public static PdfBrush FooterTextBrush => new PdfSolidBrush(FooterText);
|
||||
public static PdfBrush TableAltRowBrush => new PdfSolidBrush(TableAltRow);
|
||||
public static PdfBrush TableHeaderBrush => new PdfSolidBrush(TableHeaderBg);
|
||||
public static PdfBrush AccentBlueBrush => new PdfSolidBrush(AccentBlue);
|
||||
public static PdfBrush NegativeRedBrush => new PdfSolidBrush(NegativeRed);
|
||||
public static PdfBrush PositiveGreenBrush => new PdfSolidBrush(PositiveGreen);
|
||||
public static PdfBrush FooterTextBrush => new PdfSolidBrush(FooterText);
|
||||
public static PdfBrush TableAltRowBrush => new PdfSolidBrush(TableAltRow);
|
||||
public static PdfBrush TableHeaderBrush => AccentBlueBrush;
|
||||
public static PdfPen SeparatorPen => new PdfPen(SeparatorLine, 0.5f);
|
||||
public static PdfPen TableBorderPen => new PdfPen(TableBorder, 0.5f);
|
||||
public static PdfPen AccentBluePen => new PdfPen(AccentBlue, 2.5f);
|
||||
@@ -89,7 +89,7 @@ public static class PdfTheme
|
||||
public static PdfBrush ValueBrush(decimal? value)
|
||||
{
|
||||
if (value == null) return TextBrush;
|
||||
return value >= 0 ? PositiveBrush : NegativeBrush;
|
||||
return value >= 0 ? PositiveGreenBrush : NegativeRedBrush;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user