summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2012-03-19 14:11:46 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2012-03-19 14:11:46 +0200
commitd347d5b836ec7df0c2c3ab48cfd2d7651bb650ac (patch)
treea60587aa0dee137cec11fb188ca9f1c67788f4c4 /src
parent0f04d97c8847b5c41078d487fc22a1b5d069226c (diff)
downloadfpGUI-d347d5b836ec7df0c2c3ab48cfd2d7651bb650ac.tar.xz
x11: fix color shifting due to Alpha channel introduction.
Diffstat (limited to 'src')
-rw-r--r--src/corelib/x11/fpg_x11.pas5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/corelib/x11/fpg_x11.pas b/src/corelib/x11/fpg_x11.pas
index 918ca3b8..5e042847 100644
--- a/src/corelib/x11/fpg_x11.pas
+++ b/src/corelib/x11/fpg_x11.pas
@@ -464,7 +464,7 @@ begin
c := fpgColorToRGB(col);
if xapplication.DisplayDepth >= 24 then
- Result := c
+ Result := c and $FFFFFF { No Alpha channel information }
else if xapplication.DisplayDepth = 16 then
Result := ConvertTo565Pixel(c)
else
@@ -2934,7 +2934,8 @@ end;
procedure TfpgX11Canvas.DoSetTextColor(cl: TfpgColor);
begin
- SetXftColor(cl, FColorTextXft);
+ { We use fpgColorToX() because we don't want Alpha channel information for X11 text }
+ SetXftColor(fpgColorToX(cl), FColorTextXft);
end;
procedure TfpgX11Canvas.DoSetColor(cl: TfpgColor);