Win32: fix error in TFontDialog if fdLimitSize is set. Issue #0030340. Patch by Rik van Kekem, modified by me.

Applied directly to fixes branch (not merged from trunk) because of merge conflicts.

git-svn-id: branches/fixes_1_6@52737 -
This commit is contained in:
bart 2016-07-21 14:00:06 +00:00
parent 9501fabfa1
commit 2a9174a4e3

View File

@ -1121,6 +1121,11 @@ begin
Flags := GetFlagsFromOptions(Options);
Flags := Flags or CF_INITTOLOGFONTSTRUCT or CF_BOTH;
RGBColors := DWORD(Font.Color);
if fdLimitSize in Options then
begin
nSizeMin := MinFontSize;
nSizeMax := MaxFontSize;
end;
end;
UserResult := ChooseFontW(@CFW);
// we need to update LF now
@ -1146,6 +1151,11 @@ begin
Flags := GetFlagsFromOptions(Options);
Flags := Flags or CF_INITTOLOGFONTSTRUCT or CF_BOTH;
RGBColors := DWORD(Font.Color);
if fdLimitSize in Options then
begin
nSizeMin := MinFontSize;
nSizeMax := MaxFontSize;
end;
end;
UserResult := ChooseFontA(@CF);
end