mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 20:59:06 +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;
|
end;
|
||||||
|
|
||||||
procedure TOpenFileFavToolButton.DoOnAdded;
|
procedure TOpenFileFavToolButton.DoOnAdded;
|
||||||
var
|
|
||||||
xImg: TCustomBitmap;
|
|
||||||
begin
|
begin
|
||||||
inherited DoOnAdded;
|
inherited DoOnAdded;
|
||||||
|
|
||||||
@ -123,21 +121,12 @@ begin
|
|||||||
DropdownMenu := TPopupMenu.Create(Self);
|
DropdownMenu := TPopupMenu.Create(Self);
|
||||||
|
|
||||||
if DropdownMenu.Images=nil then
|
if DropdownMenu.Images=nil then
|
||||||
begin
|
DropdownMenu.Images := LCLGlyphs;
|
||||||
DropdownMenu.Images := TCustomImageList.Create(Self);
|
if DropdownMenu.Images<>LCLGlyphs then
|
||||||
DropdownMenu.Images.Width := 16;
|
raise Exception.Create('Favorites internal error 20180605093914');
|
||||||
DropdownMenu.Images.Height := 16;
|
|
||||||
end;
|
|
||||||
|
|
||||||
xImg := TBitmap.Create;
|
FAddImageIndex := LCLGlyphs.GetImageIndex('laz_add');
|
||||||
try
|
FRemoveImageIndex := LCLGlyphs.GetImageIndex('laz_delete');
|
||||||
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;
|
|
||||||
|
|
||||||
FOrigOnPopup := DropdownMenu.OnPopup;
|
FOrigOnPopup := DropdownMenu.OnPopup;
|
||||||
DropdownMenu.OnPopup := @RefreshMenu;
|
DropdownMenu.OnPopup := @RefreshMenu;
|
||||||
|
Loading…
Reference in New Issue
Block a user