Skip to content

Commit

Permalink
refac
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey-T committed Jul 5, 2023
1 parent 3804a70 commit a33c442
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions atsynedit/atsynedit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -4460,6 +4460,7 @@ procedure TATSynEdit.DoPaintMinimapSelToBGRABitmap;
C: TBGRABitmap;
R: TRect;
rColor: TBGRAPixel;
nAlphaValue: integer;
begin
C:= FMinimapBmp;
if FMinimapShowSelAlways or FCursorOnMinimap then
Expand All @@ -4468,10 +4469,11 @@ procedure TATSynEdit.DoPaintMinimapSelToBGRABitmap;
OffsetRect(R, -FRectMinimap.Left, -FRectMinimap.Top);

// https://forum.lazarus.freepascal.org/index.php/topic,51383.msg377195.html#msg377195
nAlphaValue:= FMinimapSelColorChange*255 div 100;
if _IsColorDark(FColorBG) then
rColor.FromRGB(255, 255, 255, FMinimapSelColorChange*255 div 100)
rColor.FromRGB(255, 255, 255, nAlphaValue)
else
rColor.FromRGB(0, 0, 0, FMinimapSelColorChange*255 div 100);
rColor.FromRGB(0, 0, 0, nAlphaValue);

C.FillRect(R, rColor, dmDrawWithTransparency);

Expand Down

0 comments on commit a33c442

Please sign in to comment.