mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 02:39:37 +02:00
gtk:
- don't compare GC with nil (it will create you a new GC on the fly) but use HasGC - minor formatting git-svn-id: trunk@16824 -
This commit is contained in:
parent
40aaac2a29
commit
116b83b78c
@ -7663,7 +7663,8 @@ begin
|
||||
|
||||
try
|
||||
{ On root window, we don't allocate a graphics context and so we dont free}
|
||||
if aDC.GC <> nil then begin
|
||||
if aDC.HasGC then
|
||||
begin
|
||||
gdk_gc_unref(aDC.GC);
|
||||
aDC.GC:=nil;
|
||||
end;
|
||||
@ -8924,21 +8925,21 @@ begin
|
||||
|
||||
if Adjustment = nil then exit;
|
||||
|
||||
Result := Round(Adjustment^.Value);
|
||||
Result := Round(Adjustment^.value);
|
||||
|
||||
if (ScrollInfo.fMask and SIF_POS) <> 0
|
||||
then begin
|
||||
Adjustment^.Value := ScrollInfo.nPos;
|
||||
Adjustment^.value := ScrollInfo.nPos;
|
||||
end;
|
||||
if (ScrollInfo.fMask and SIF_RANGE) <> 0
|
||||
then begin
|
||||
Adjustment^.Lower := ScrollInfo.nMin;
|
||||
Adjustment^.Upper := ScrollInfo.nMax;
|
||||
Adjustment^.lower := ScrollInfo.nMin;
|
||||
Adjustment^.upper := ScrollInfo.nMax;
|
||||
end;
|
||||
if (ScrollInfo.fMask and SIF_PAGE) <> 0
|
||||
then begin
|
||||
Adjustment^.Page_Size := ScrollInfo.nPage;
|
||||
Adjustment^.Page_Increment := (ScrollInfo.nPage div 6)+1;
|
||||
Adjustment^.page_size := ScrollInfo.nPage;
|
||||
Adjustment^.page_increment := (ScrollInfo.nPage div 6)+1;
|
||||
end;
|
||||
|
||||
{DebugLn('');
|
||||
|
Loading…
Reference in New Issue
Block a user