mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 20:39:14 +02:00
gtk2: formatting
git-svn-id: trunk@26974 -
This commit is contained in:
parent
1952bfcff4
commit
3ecb4329dc
@ -13,7 +13,7 @@
|
|||||||
* *
|
* *
|
||||||
* This file is part of the Lazarus Component Library (LCL) *
|
* 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. *
|
* for details about the copyright. *
|
||||||
* *
|
* *
|
||||||
* This program is distributed in the hope that it will be useful, *
|
* This program is distributed in the hope that it will be useful, *
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* *
|
* *
|
||||||
* This file is part of the Lazarus Component Library (LCL) *
|
* 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. *
|
* for details about the copyright. *
|
||||||
* *
|
* *
|
||||||
* This program is distributed in the hope that it will be useful, *
|
* This program is distributed in the hope that it will be useful, *
|
||||||
|
@ -1501,20 +1501,21 @@ end;
|
|||||||
|
|
||||||
procedure SetGDIColorRef(var GDIColor: TGDIColor; NewColorRef: TColorRef);
|
procedure SetGDIColorRef(var GDIColor: TGDIColor; NewColorRef: TColorRef);
|
||||||
begin
|
begin
|
||||||
if GDIColor.ColorRef=NewColorRef then exit;
|
if GDIColor.ColorRef = NewColorRef then Exit;
|
||||||
FreeGDIColor(@GDIColor);
|
FreeGDIColor(@GDIColor);
|
||||||
GDIColor.ColorRef:=NewColorRef;
|
GDIColor.ColorRef := NewColorRef;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Procedure AllocGDIColor(DC: hDC; GDIColor: PGDIColor);
|
procedure AllocGDIColor(DC: hDC; GDIColor: PGDIColor);
|
||||||
var
|
var
|
||||||
RGBColor : Longint;
|
RGBColor : Longint;
|
||||||
begin
|
begin
|
||||||
if DC=0 then ;
|
if not (cfColorAllocated in GDIColor^.ColorFlags) then
|
||||||
if not (cfColorAllocated in GDIColor^.ColorFlags) then begin
|
begin
|
||||||
RGBColor := ColorToRGB(GDIColor^.ColorRef);
|
RGBColor := ColorToRGB(GDIColor^.ColorRef);
|
||||||
|
|
||||||
With GDIColor^.Color do begin
|
with GDIColor^.Color do
|
||||||
|
begin
|
||||||
Red := gushort(GetRValue(RGBColor)) shl 8;
|
Red := gushort(GetRValue(RGBColor)) shl 8;
|
||||||
Green := gushort(GetGValue(RGBColor)) shl 8;
|
Green := gushort(GetGValue(RGBColor)) shl 8;
|
||||||
Blue := gushort(GetBValue(RGBColor)) shl 8;
|
Blue := gushort(GetBValue(RGBColor)) shl 8;
|
||||||
|
Loading…
Reference in New Issue
Block a user