lcl: less with-blocks for FPC 3.1.1

git-svn-id: trunk@50303 -
This commit is contained in:
mattias 2015-11-11 14:45:28 +00:00
parent 84975022d6
commit e2e9c959e0
2 changed files with 3 additions and 6 deletions

View File

@ -1218,7 +1218,7 @@ begin
CGContextSaveGState(Context);
CGContextSetRGBFillColor(Context, (c and $FF) * rgbkoef, ((c shr 8) and $FF)*rgbkoef,
((c shr 16) and $FF)*rgbkoef, 1);
with b do CGContextFillRect(Context, RectToCGRect(Bounds(0,0, Right-Left, Bottom-Top)));
CGContextFillRect(Context, RectToCGRect(Bounds(0,0, b.Right-b.Left, b.Bottom-b.Top)));
CGContextRestoreGState(Context);
end;
end;

View File

@ -601,11 +601,8 @@ begin
WindowShape:=nil;
HIThemeGetWindowShape(BtnRect, WindowDrawInfo, kWindowCloseBoxRgn, WindowShape);
HIShapeGetBounds(WindowShape, BtnRect);
with BtnRect.size do
begin
Result.cx := Round(width);
Result.cy := Round(height);
end;
Result.cx := Round(BtnRect.size.width);
Result.cy := Round(BtnRect.size.height);
end else
Result := inherited GetDetailSize(Details);
else