Skip to content

Commit

Permalink
feat: property for custom margin color of TJvPrvwDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
borisneubert committed Jan 19, 2025
1 parent 2c6dcf3 commit 09ef1c0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jvcl/run/JvPrvwDoc.pas
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ TJvPreviewPageOptions = class(TPersistent)
FShadow: TJvPageShadow;
FOnChange: TNotifyEvent;
FDrawMargins: Boolean;
FMarginColor: TColor;
FCols: Cardinal;
FScale: Cardinal;
FRows: Cardinal;
Expand Down Expand Up @@ -216,6 +217,7 @@ TJvPreviewPageOptions = class(TPersistent)
property Cols: Cardinal read GetCols write SetCols default 1;
property DrawMargins: Boolean read FDrawMargins write SetDrawMargins default True;
property HorzSpacing: Cardinal read GetHorzSpacing write SetHorzSpacing default 8;
property MarginColor: TColor read FMarginColor write FMarginColor default clDkGray;
property Rows: Cardinal read GetRows write SetRows;
property Shadow: TJvPageShadow read FShadow write SetShadow;
property VertSpacing: Cardinal read GetVertSpacing write SetVertSpacing default 8;
Expand Down Expand Up @@ -1210,6 +1212,7 @@ procedure TJvCustomPreviewControl.DrawPages(ACanvas: TCanvas; Offset: TPoint);
if Options.DrawMargins and not EqualRect(APageRect, APrintRect) then
begin
Pen.Style := psDot;
Pen.Color := Options.MarginColor;
Rectangle(APrintRect);
Pen.Style := psSolid;
end;
Expand Down

0 comments on commit 09ef1c0

Please sign in to comment.