mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-21 22:59:27 +02:00
use imagelist state drawing by theme services
git-svn-id: trunk@12782 -
This commit is contained in:
parent
046a72792d
commit
5abd76bf7f
@ -1862,8 +1862,19 @@ procedure TThemeServices.DrawIcon(ACanvas: TPersistent;
|
||||
var
|
||||
Canvas: TCanvas absolute ACanvas;
|
||||
ImageList: TCustomImageList absolute AImageList;
|
||||
AEffect: TGraphicsDrawEffect;
|
||||
begin
|
||||
ImageList.Draw(Canvas, P.X, P.Y, Index, not IsDisabled(Details));
|
||||
if IsDisabled(Details) then
|
||||
AEffect := gdeDisabled
|
||||
else
|
||||
if IsPushed(Details) then
|
||||
AEffect := gdeShadowed
|
||||
else
|
||||
if IsHot(Details) then
|
||||
AEffect := gdeHighlighted
|
||||
else
|
||||
AEffect := gdeNormal;
|
||||
ImageList.Draw(Canvas, P.X, P.Y, Index, AEffect);
|
||||
end;
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user