summaryrefslogtreecommitdiff
path: root/src/corelib
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2010-07-13 12:29:25 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2010-07-13 12:29:25 +0200
commit1adf4cc75a9799d84d26e126c13f971a8beae13e (patch)
treee46747ef9eda9f928951a3c97c3c45139ea71ffb /src/corelib
parente6a2a6ff7553ff718d851125a181eeb2eceba7f8 (diff)
downloadfpGUI-1adf4cc75a9799d84d26e126c13f971a8beae13e.tar.xz
PtInRect failed if point was on right or bottom border.
This fixes the Button Click bug where if you clicked on the button right or bottom border, the button press state was shown, but the Click never occured.
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/fpg_base.pas4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/fpg_base.pas b/src/corelib/fpg_base.pas
index 15edc88a..199004ba 100644
--- a/src/corelib/fpg_base.pas
+++ b/src/corelib/fpg_base.pas
@@ -905,8 +905,8 @@ function PtInRect(const ARect: TfpgRect; const APoint: TPoint): Boolean;
begin
Result := (APoint.x >= ARect.Left) and
(APoint.y >= ARect.Top) and
- (APoint.x < ARect.Right) and
- (APoint.y < ARect.Bottom);
+ (APoint.x <= ARect.Right) and
+ (APoint.y <= ARect.Bottom);
end;
procedure SortRect(var ARect: TRect);