mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 18:58:17 +02:00
Favorites: High-DPI images, part 1
git-svn-id: trunk@58132 -
This commit is contained in:
parent
8c5aa34fba
commit
04f1ea0b57
@ -110,8 +110,6 @@ begin
|
||||
end;
|
||||
|
||||
procedure TOpenFileFavToolButton.DoOnAdded;
|
||||
var
|
||||
xImg: TCustomBitmap;
|
||||
begin
|
||||
inherited DoOnAdded;
|
||||
|
||||
@ -123,21 +121,12 @@ begin
|
||||
DropdownMenu := TPopupMenu.Create(Self);
|
||||
|
||||
if DropdownMenu.Images=nil then
|
||||
begin
|
||||
DropdownMenu.Images := TCustomImageList.Create(Self);
|
||||
DropdownMenu.Images.Width := 16;
|
||||
DropdownMenu.Images.Height := 16;
|
||||
end;
|
||||
DropdownMenu.Images := LCLGlyphs;
|
||||
if DropdownMenu.Images<>LCLGlyphs then
|
||||
raise Exception.Create('Favorites internal error 20180605093914');
|
||||
|
||||
xImg := TBitmap.Create;
|
||||
try
|
||||
IDEImages.Images_16.GetBitmap(IDEImages.LoadImage('laz_add'), xImg);
|
||||
FAddImageIndex := DropdownMenu.Images.Add(xImg, nil);
|
||||
IDEImages.Images_16.GetBitmap(IDEImages.LoadImage('laz_delete'), xImg);
|
||||
FRemoveImageIndex := DropdownMenu.Images.Add(xImg, nil);
|
||||
finally
|
||||
xImg.Free;
|
||||
end;
|
||||
FAddImageIndex := LCLGlyphs.GetImageIndex('laz_add');
|
||||
FRemoveImageIndex := LCLGlyphs.GetImageIndex('laz_delete');
|
||||
|
||||
FOrigOnPopup := DropdownMenu.OnPopup;
|
||||
DropdownMenu.OnPopup := @RefreshMenu;
|
||||
|
Loading…
Reference in New Issue
Block a user