mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-11 07:59:29 +02:00
formatting
git-svn-id: trunk@13988 -
This commit is contained in:
parent
77989dc1e0
commit
df37b768a1
@ -1654,32 +1654,32 @@ var
|
|||||||
SysGCValues:=GetSysGCValues(GDIColor^.ColorRef,
|
SysGCValues:=GetSysGCValues(GDIColor^.ColorRef,
|
||||||
TGtkDeviceContext(DC).Widget);
|
TGtkDeviceContext(DC).Widget);
|
||||||
{$IFDEF DebugGDK}BeginGDKErrorTrap;{$ENDIF}
|
{$IFDEF DebugGDK}BeginGDKErrorTrap;{$ENDIF}
|
||||||
With SysGCValues do begin
|
with SysGCValues do
|
||||||
|
begin
|
||||||
gdk_gc_set_fill(GC, fill);
|
gdk_gc_set_fill(GC, fill);
|
||||||
AllocFG := Foreground.Pixel = 0;
|
AllocFG := Foreground.Pixel = 0;
|
||||||
If AllocFG then
|
if AllocFG then
|
||||||
if not gdk_colormap_alloc_color(GDK_Colormap_get_system,@Foreground,
|
if not gdk_colormap_alloc_color(GDK_Colormap_get_system, @Foreground,
|
||||||
True,True)
|
True, True) then
|
||||||
then begin
|
|
||||||
WarnAllocFailed(Foreground);
|
WarnAllocFailed(Foreground);
|
||||||
end;
|
|
||||||
gdk_gc_set_foreground(GC, @foreground);
|
gdk_gc_set_foreground(GC, @foreground);
|
||||||
Case Fill of
|
case Fill of
|
||||||
GDK_TILED :
|
GDK_TILED :
|
||||||
If Tile <> nil then
|
if Tile <> nil then
|
||||||
begin
|
begin
|
||||||
gdk_gc_set_ts_origin(GC, ts_x_origin, ts_y_origin);
|
gdk_gc_set_ts_origin(GC, ts_x_origin, ts_y_origin);
|
||||||
gdk_gc_set_tile(GC, Tile);
|
gdk_gc_set_tile(GC, Tile);
|
||||||
end;
|
end;
|
||||||
GDK_STIPPLED,
|
GDK_STIPPLED,
|
||||||
GDK_OPAQUE_STIPPLED:
|
GDK_OPAQUE_STIPPLED:
|
||||||
If stipple <> nil then begin
|
if stipple <> nil then
|
||||||
|
begin
|
||||||
gdk_gc_set_background(GC, @background);
|
gdk_gc_set_background(GC, @background);
|
||||||
gdk_gc_set_ts_origin(GC, ts_x_origin, ts_y_origin);
|
gdk_gc_set_ts_origin(GC, ts_x_origin, ts_y_origin);
|
||||||
gdk_gc_set_stipple(GC, stipple);
|
gdk_gc_set_stipple(GC, stipple);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
If AllocFG then
|
if AllocFG then
|
||||||
gdk_colormap_free_colors(GDK_Colormap_get_system, @Foreground,1);
|
gdk_colormap_free_colors(GDK_Colormap_get_system, @Foreground,1);
|
||||||
end;
|
end;
|
||||||
{$IFDEF DebugGDK}EndGDKErrorTrap;{$ENDIF}
|
{$IFDEF DebugGDK}EndGDKErrorTrap;{$ENDIF}
|
||||||
@ -1690,9 +1690,10 @@ var
|
|||||||
AllocGDIColor(DC, GDIColor);
|
AllocGDIColor(DC, GDIColor);
|
||||||
//DebugLn('EnsureAsColor ',DbgS(GDIColor^.ColorRef),' AsBackground=',AsBackground);
|
//DebugLn('EnsureAsColor ',DbgS(GDIColor^.ColorRef),' AsBackground=',AsBackground);
|
||||||
{$IFDEF DebugGDK}BeginGDKErrorTrap;{$ENDIF}
|
{$IFDEF DebugGDK}BeginGDKErrorTrap;{$ENDIF}
|
||||||
If AsBackground then
|
if AsBackground then
|
||||||
gdk_gc_set_background(GC, @(GDIColor^.Color))
|
gdk_gc_set_background(GC, @(GDIColor^.Color))
|
||||||
else begin
|
else
|
||||||
|
begin
|
||||||
gdk_gc_set_fill(GC, GDK_SOLID);
|
gdk_gc_set_fill(GC, GDK_SOLID);
|
||||||
gdk_gc_set_foreground(GC, @(GDIColor^.Color));
|
gdk_gc_set_foreground(GC, @(GDIColor^.Color));
|
||||||
end;
|
end;
|
||||||
@ -1715,16 +1716,17 @@ begin
|
|||||||
|
|
||||||
// FPC bug workaround:
|
// FPC bug workaround:
|
||||||
// clScrollbar = $80000000 can't be used in case statements
|
// clScrollbar = $80000000 can't be used in case statements
|
||||||
if TColor(GDIColor^.ColorRef)=clScrollbar then begin
|
if TColor(GDIColor^.ColorRef)=clScrollbar then
|
||||||
|
begin
|
||||||
//often have a BK Pixmap
|
//often have a BK Pixmap
|
||||||
If IsSolidBrush then
|
if IsSolidBrush then
|
||||||
EnsureAsGCValues
|
EnsureAsGCValues
|
||||||
else
|
else
|
||||||
EnsureAsColor;//GC's with Pixmaps can't work w/Hatch's (yet)
|
EnsureAsColor;//GC's with Pixmaps can't work w/Hatch's (yet)
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Case TColor(GDIColor^.ColorRef) of
|
case TColor(GDIColor^.ColorRef) of
|
||||||
//clScrollbar: see above
|
//clScrollbar: see above
|
||||||
clInfoBk,
|
clInfoBk,
|
||||||
clMenu,
|
clMenu,
|
||||||
|
Loading…
Reference in New Issue
Block a user