WinCE form's ClientRect is 1 pixel too large on right and bottom sides
Original Reporter info from Mantis: PaulFMichell
-
Reporter name: Paul Michell
Original Reporter info from Mantis: PaulFMichell
- Reporter name: Paul Michell
Description:
The ClientRect is 1 pixel too large on the right and bottom sides on WinCE. This can be seen by adding the following to a blank project:
procedure TForm1.FormClick(Sender: TObject);
var
TestRect: TRect;
begin
Canvas.Pen.Color := clYellow;
Canvas.Brush.Color := clBlue;
TestRect := ClientRect;
//Dec(TestRect.Right);
//Dec(TestRect.Bottom);
Canvas.Rectangle(TestRect);
end;
If you uncomment the two Dec instructions the full yellow border can be seen.
I can correct this behaviour by changing lines 968 and 969 of winceproc in the GetLCLClientBoundsOffset function to:
ORect.Bottom := -1;
ORect.Right := -1;
However, I do not know if this will have other undesirable side effects?
Mantis conversion info:
- Mantis ID: 10656
- Version: 0.9.25 (SVN)
- Fixed in revision: 19092 (#f676add3)
- Target version: 0.9.28