gtk2: formatting

git-svn-id: trunk@26974 -
This commit is contained in:
paul 2010-08-02 02:52:27 +00:00
parent 1952bfcff4
commit 3ecb4329dc
3 changed files with 9 additions and 8 deletions

View File

@ -13,7 +13,7 @@
* *
* This file is part of the Lazarus Component Library (LCL) *
* *
* See the file COPYING.modifiedLGPL.txt, included in this distribution, *
* See the file COPYING.modifiedLGPL.txt, included in this distribution, *
* for details about the copyright. *
* *
* This program is distributed in the hope that it will be useful, *

View File

@ -8,7 +8,7 @@
* *
* This file is part of the Lazarus Component Library (LCL) *
* *
* See the file COPYING.modifiedLGPL.txt, included in this distribution, *
* See the file COPYING.modifiedLGPL.txt, included in this distribution, *
* for details about the copyright. *
* *
* This program is distributed in the hope that it will be useful, *

View File

@ -1501,20 +1501,21 @@ end;
procedure SetGDIColorRef(var GDIColor: TGDIColor; NewColorRef: TColorRef);
begin
if GDIColor.ColorRef=NewColorRef then exit;
if GDIColor.ColorRef = NewColorRef then Exit;
FreeGDIColor(@GDIColor);
GDIColor.ColorRef:=NewColorRef;
GDIColor.ColorRef := NewColorRef;
end;
Procedure AllocGDIColor(DC: hDC; GDIColor: PGDIColor);
procedure AllocGDIColor(DC: hDC; GDIColor: PGDIColor);
var
RGBColor : Longint;
begin
if DC=0 then ;
if not (cfColorAllocated in GDIColor^.ColorFlags) then begin
if not (cfColorAllocated in GDIColor^.ColorFlags) then
begin
RGBColor := ColorToRGB(GDIColor^.ColorRef);
With GDIColor^.Color do begin
with GDIColor^.Color do
begin
Red := gushort(GetRValue(RGBColor)) shl 8;
Green := gushort(GetGValue(RGBColor)) shl 8;
Blue := gushort(GetBValue(RGBColor)) shl 8;