mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-20 05:22:34 +01:00
lcl: less with-blocks for FPC 3.1.1
git-svn-id: trunk@50290 -
This commit is contained in:
parent
7af80b6b19
commit
1a4afb9d1d
@ -360,25 +360,25 @@ begin
|
||||
Result:=-1;
|
||||
end;
|
||||
|
||||
function RectFromGdkRect(AGdkRect: TGdkRectangle): TRect;
|
||||
function RectFromGdkRect(const AGdkRect: TGdkRectangle): TRect;
|
||||
begin
|
||||
with Result, AGdkRect do
|
||||
with Result do
|
||||
begin
|
||||
Left := x;
|
||||
Top := y;
|
||||
Right := Width + x;
|
||||
Bottom := Height + y;
|
||||
Left := AGdkRect.x;
|
||||
Top := AGdkRect.y;
|
||||
Right := AGdkRect.Width + AGdkRect.x;
|
||||
Bottom := AGdkRect.Height + AGdkRect.y;
|
||||
end;
|
||||
end;
|
||||
|
||||
function GdkRectFromRect(R: TRect): TGdkRectangle;
|
||||
function GdkRectFromRect(const R: TRect): TGdkRectangle;
|
||||
begin
|
||||
with Result, R do
|
||||
with Result do
|
||||
begin
|
||||
x := Left;
|
||||
y := Top;
|
||||
width := Right-Left;
|
||||
height := Bottom-Top;
|
||||
x := R.Left;
|
||||
y := R.Top;
|
||||
width := R.Right-R.Left;
|
||||
height := R.Bottom-R.Top;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
@ -277,8 +277,8 @@ var
|
||||
//==============================================================================
|
||||
// functions
|
||||
|
||||
function RectFromGdkRect(AGdkRect: TGdkRectangle): TRect;
|
||||
function GdkRectFromRect(R: TRect): TGdkRectangle;
|
||||
function RectFromGdkRect(const AGdkRect: TGdkRectangle): TRect;
|
||||
function GdkRectFromRect(const R: TRect): TGdkRectangle;
|
||||
function AlignToGtkAlign(Align: TAlignment): gfloat;
|
||||
{$ifdef gtk2}
|
||||
function GtkScrollTypeToScrollCode(ScrollType: TGtkScrollType): LongWord;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user