mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 16:56:01 +02:00
LCL, fix grids AutoSizeColumns ignoring column fonts, issue #15162
git-svn-id: trunk@22751 -
This commit is contained in:
parent
aa1acebeff
commit
20f111934d
@ -8587,7 +8587,6 @@ begin
|
||||
Exit;
|
||||
|
||||
tmpCanvas := GetWorkingCanvas(Canvas);
|
||||
tmpCanvas.Font := Font;
|
||||
|
||||
C := ColumnFromGridColumn(aCol);
|
||||
|
||||
@ -8595,6 +8594,18 @@ begin
|
||||
W:=0;
|
||||
for i := 0 to RowCount-1 do begin
|
||||
|
||||
if C<>nil then begin
|
||||
if i<FixedRows then
|
||||
tmpCanvas.Font := C.Title.Font
|
||||
else
|
||||
tmpCanvas.Font := C.Font;
|
||||
end else begin
|
||||
if i<FixedRows then
|
||||
tmpCanvas.Font := TitleFont
|
||||
else
|
||||
tmpCanvas.Font := Font;
|
||||
end;
|
||||
|
||||
if (i=0) and (FixedRows>0) and (C<>nil) then
|
||||
Ts := TmpCanvas.TextExtent(C.Title.Caption)
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user