mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 06:20:17 +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;
|
procedure TViewUnitDialog.ListboxDrawItem(Control: TWinControl; Index: Integer;
|
||||||
ARect: TRect; State: TOwnerDrawState);
|
ARect: TRect; State: TOwnerDrawState);
|
||||||
|
var
|
||||||
|
aTop: Integer;
|
||||||
begin
|
begin
|
||||||
if Index < 0 then Exit;
|
if Index < 0 then Exit;
|
||||||
with ListBox do
|
with ListBox do
|
||||||
begin
|
begin
|
||||||
Canvas.FillRect(ARect);
|
Canvas.FillRect(ARect);
|
||||||
IDEImages.Images_16.Draw(Canvas, 1, ARect.Top, FImageIndex);
|
aTop := (ARect.Bottom + ARect.Top - IDEImages.Images_16.Height) div 2;
|
||||||
Canvas.TextRect(ARect, ARect.Left + IDEImages.Images_16.Width + Scale96ToFont(4), ARect.Top, Items[Index]);
|
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;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user