mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 13:18:16 +02:00
IDE: Center icon and text vertically for each item in ViewUnit dialog. Issue #34402, patch from Vojtech Cihak.
git-svn-id: trunk@59272 -
This commit is contained in:
parent
9fd194d243
commit
e1b2a50f19
@ -376,13 +376,17 @@ end;
|
||||
|
||||
procedure TViewUnitDialog.ListboxDrawItem(Control: TWinControl; Index: Integer;
|
||||
ARect: TRect; State: TOwnerDrawState);
|
||||
var
|
||||
aTop: Integer;
|
||||
begin
|
||||
if Index < 0 then Exit;
|
||||
with ListBox do
|
||||
begin
|
||||
Canvas.FillRect(ARect);
|
||||
IDEImages.Images_16.Draw(Canvas, 1, ARect.Top, FImageIndex);
|
||||
Canvas.TextRect(ARect, ARect.Left + IDEImages.Images_16.Width + Scale96ToFont(4), ARect.Top, Items[Index]);
|
||||
aTop := (ARect.Bottom + ARect.Top - IDEImages.Images_16.Height) div 2;
|
||||
IDEImages.Images_16.Draw(Canvas, 1, aTop, FImageIndex);
|
||||
aTop := (ARect.Bottom + ARect.Top - Canvas.TextHeight('Šj9')) div 2;
|
||||
Canvas.TextRect(ARect, ARect.Left + IDEImages.Images_16.Width + Scale96ToFont(4), aTop, Items[Index]);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user