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); CGContextSaveGState(Context);
CGContextSetRGBFillColor(Context, (c and $FF) * rgbkoef, ((c shr 8) and $FF)*rgbkoef, CGContextSetRGBFillColor(Context, (c and $FF) * rgbkoef, ((c shr 8) and $FF)*rgbkoef,
((c shr 16) and $FF)*rgbkoef, 1); ((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); CGContextRestoreGState(Context);
end; end;
end; end;

View File

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