mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-28 14:09:40 +02:00
Set TColortoTGdkRGBA alpha to 1 by default
git-svn-id: trunk@43668 -
This commit is contained in:
parent
6617df26ff
commit
733f28950f
@ -281,7 +281,7 @@ function Gtk3ScrollTypeToScrollCode(ScrollType: TGtkScrollType): LongWord;
|
||||
function TGDKColorToTColor(const value : TGDKColor) : TColor;
|
||||
function TColortoTGDKColor(const value : TColor) : TGDKColor;
|
||||
function TGdkRGBAToTColor(const value : TGdkRGBA) : TColor;
|
||||
function TColortoTGdkRGBA(const value : TColor) : TGdkRGBA;
|
||||
function TColortoTGdkRGBA(const value : TColor; IgnoreAlpha: Boolean = True) : TGdkRGBA;
|
||||
function ColorToCairoRGB(AColor: TColor; out ARed, AGreen, ABlue: Double): Boolean;
|
||||
function RectFromGtkAllocation(AGtkAllocation: TGtkAllocation): TRect;
|
||||
function RectFromGdkRect(AGdkRect: TGdkRectangle): TRect;
|
||||
@ -334,12 +334,15 @@ begin
|
||||
or (Trunc(value.alpha * $FF) shl 24);
|
||||
end;
|
||||
|
||||
function TColortoTGdkRGBA(const value: TColor): TGdkRGBA;
|
||||
function TColortoTGdkRGBA(const value: TColor; IgnoreAlpha: Boolean = True): TGdkRGBA;
|
||||
begin
|
||||
Result.red := (value and $FF) / 255;
|
||||
Result.green := ((value shr 8) and $FF) / 255;
|
||||
Result.blue := 1.0;//((value shr 16) and $FF) / 255;
|
||||
Result.alpha := 1.0;//((value shr 24) and $FF) / 255;
|
||||
Result.blue := ((value shr 16) and $FF) / 255;
|
||||
if not IgnoreAlpha then
|
||||
Result.alpha := ((value shr 24) and $FF) / 255
|
||||
else
|
||||
Result.alpha:=1;
|
||||
end;
|
||||
|
||||
function ColorToCairoRGB(AColor: TColor; out ARed, AGreen, ABlue: Double): Boolean;
|
||||
|
@ -2863,7 +2863,7 @@ var
|
||||
AGdkRGBA: TGdkRGBA;
|
||||
AColor: TGdkColor;
|
||||
begin
|
||||
//inherited SetColor(AValue);
|
||||
inherited SetColor(AValue);
|
||||
exit;
|
||||
if (AValue = clDefault) or (AValue = clBackground) then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user