Skip to content

Commit 3ecaaa2

Browse files
authored
Merge pull request #7 from kalwados/patch-1
Update NativeProgressForm.pas
2 parents 7791110 + 41ea9b6 commit 3ecaaa2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Code/DDevExtensions/Source/CompileProgress/NativeProgressForm.pas

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,12 +489,17 @@ procedure TNativeProgressForm.SetMaxFiles(const Value: Integer);
489489
// WriteLn(Form.Components[I].Name + ': ' + Form.Components[I].ClassName);
490490

491491
pnErrors := Form.FindComponent('pnErrors') as TControl;
492+
// In Delphi 11.1 the ProgressBar must be placed below the "Hints" panel:
493+
{$IF declared(RTLVersion111)}{$IF RTLVersion111}
494+
pnErrors := Form.FindComponent('pnHints') as TControl;
495+
{$IFEND}{$IFEND}
492496
TotalLines := GetLabel('TotalLines');
493497
if (pnErrors is TPanel) and (TotalLines <> nil) then
494498
begin
495499
X := Form.ScreenToClient(pnErrors.ClientToScreen(Point(0, 0))).X;
496500
Y := Form.ScreenToClient(TotalLines.ClientToScreen(Point(TotalLines.Top, 0))).Y;
497-
FProgressBar.SetBounds(X, Y + 2, pnErrors.Width, 7);
501+
FProgressBar.ScaleForPPI(Form.CurrentPPI);
502+
FProgressBar.SetBounds(X, Y + 2, pnErrors.Width, TotalLines.Height div 2);
498503
end
499504
else // Fallback
500505
FProgressBar.SetBounds(384, 187 + 2, 162, 7);

0 commit comments

Comments
 (0)