Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions jvcl/run/JvDBGrid.pas
Original file line number Diff line number Diff line change
Expand Up @@ -4320,6 +4320,7 @@ procedure TJvDBGrid.DoAutoSizeColumns;
try
// Get useable width
ColLineWidth := Ord(dgColLines in Options) * GridLineWidth;
ColLineWidth := PPIScale(Self, ColLineWidth);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why introduce a new assignment when the call to PPIScale could be made inline, just like what's done elsewhere?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I have written this code in Delphi 11 and was not sure about changes in Delphi 12. Now it looks like code related to GridLineWidth is stable, and conditional compilation will not be required. I can change this fix to be inline.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Any news?

AvailableWidth := ClientWidth;
if (dgIndicator in Options) then
Dec(AvailableWidth, PPIScale(Self, IndicatorWidth) + ColLineWidth);
Expand Down