mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 07:59:28 +02:00
lazVirtualTreeView Qt5: fixed alpha blend selection on 64bit.
git-svn-id: trunk@63053 -
This commit is contained in:
parent
d6fe30b43c
commit
0ed209bd81
@ -785,6 +785,11 @@ var
|
|||||||
SourceHeight,
|
SourceHeight,
|
||||||
DestWidth,
|
DestWidth,
|
||||||
DestHeight: Integer;
|
DestHeight: Integer;
|
||||||
|
{$IFDEF CPU64}
|
||||||
|
AColor: QColorH;
|
||||||
|
ADst: TQtDeviceContext absolute Destination;
|
||||||
|
AFillColor: TQColor;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
//BlendColor: TQColor;
|
//BlendColor: TQColor;
|
||||||
begin
|
begin
|
||||||
@ -864,7 +869,16 @@ begin
|
|||||||
R.Right - R.Left, R.Bottom - R.Top, @BlendColor);
|
R.Right - R.Left, R.Bottom - R.Top, @BlendColor);
|
||||||
}
|
}
|
||||||
// Source is ignored since there is a constant color value.
|
// Source is ignored since there is a constant color value.
|
||||||
|
{$IFDEF CPU64}
|
||||||
|
if ADst <> nil then
|
||||||
|
begin
|
||||||
|
AColor := QColor_create((Bias and $000000FF), ((Bias shr 8) and $000000FF), ((Bias shr 16) and $000000FF), ConstantAlpha);
|
||||||
|
QColor_convertTo(AColor, @AFillColor, QColorRgb);
|
||||||
|
QPainter_fillRect(ADst.Widget, R.Left + Target.x, R.Top + Target.y,
|
||||||
|
R.Right - R.Left, R.Bottom - R.Top, PQColor(@AFillColor));
|
||||||
|
QColor_destroy(AColor);
|
||||||
|
end;
|
||||||
|
{$ELSE}
|
||||||
DestBits := GetBitmapBitsFromDeviceContext(Destination, DestWidth, DestHeight);
|
DestBits := GetBitmapBitsFromDeviceContext(Destination, DestWidth, DestHeight);
|
||||||
if Assigned(DestBits) then
|
if Assigned(DestBits) then
|
||||||
begin
|
begin
|
||||||
@ -876,6 +890,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
EMMS;
|
EMMS;
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user