mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-05 19:18:35 +02:00
Printers: make the page setup dialog use the user selected units.
git-svn-id: trunk@60990 -
This commit is contained in:
parent
17b5600500
commit
fbef644b79
@ -95,7 +95,14 @@ begin
|
|||||||
lCustData := 0;
|
lCustData := 0;
|
||||||
Flags := PSD_MARGINS or PSD_ENABLEPAGESETUPHOOK;
|
Flags := PSD_MARGINS or PSD_ENABLEPAGESETUPHOOK;
|
||||||
hWndOwner := GetOwnerHandle(Self);
|
hWndOwner := GetOwnerHandle(Self);
|
||||||
// TODO: check that no need to div by 1000 values below
|
//pmDefault corresponds to PSD_INWININIINTLMEASURE which is 0;
|
||||||
|
if Units=pmMillimeters then
|
||||||
|
Flags := Flags or PSD_INHUNDREDTHSOFMILLIMETERS
|
||||||
|
else
|
||||||
|
if units=pmInches then
|
||||||
|
Flags := Flags or PSD_INTHOUSANDTHSOFINCHES;
|
||||||
|
// while the gui uses units millimeters or inches, in code the margins
|
||||||
|
// should be specified in hundreds of mms or thoudsands of inches
|
||||||
rtMargin.Left := MarginLeft;
|
rtMargin.Left := MarginLeft;
|
||||||
rtMargin.Top := MarginTop;
|
rtMargin.Top := MarginTop;
|
||||||
rtMargin.Right := MarginRight;
|
rtMargin.Right := MarginRight;
|
||||||
|
Loading…
Reference in New Issue
Block a user