Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: property for custom margin color of TJvPrvwDoc #194

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

borisneubert
Copy link

The color of the margin around the printable range on the page becomes invisible if it is set to a fixed color when a dark theme is used while the page background is white. I thus made it customizable by means of its own property.

@@ -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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are indicating a default value for FMarginColor here but you are not setting the value for it inside the constructor, which means it will default to 0 aka clBlack

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FMarginColor is now set in the constructor of TJvPreviewPageOptions. In addition, the default color is now clGray which is the same as clDkGray (in Delphi 12).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants