mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-18 14:09:26 +02:00
gtk: formatting
git-svn-id: trunk@20030 -
This commit is contained in:
parent
e1f781f1a1
commit
7dcf00f903
@ -318,8 +318,6 @@ type
|
||||
procedure CreateBitmap; virtual;
|
||||
|
||||
function GetFunction: TGdkFunction; virtual; abstract;
|
||||
|
||||
property GCValues: TGdkGCValues read FGCValues;
|
||||
protected
|
||||
// winapi
|
||||
function SelectBitmap(AGdiObject: PGdiObject): PGdiObject; virtual;
|
||||
@ -333,7 +331,6 @@ type
|
||||
|
||||
procedure SelectRegion;
|
||||
public
|
||||
|
||||
// device handles
|
||||
|
||||
procedure SetWidget(AWidget: PGtkWidget; AWindow: PGdkWindow;
|
||||
@ -362,6 +359,7 @@ type
|
||||
property CurrentBrush: PGdiObject read FCurrentBrush write SetCurrentBrush;
|
||||
property CurrentPalette: PGdiObject read FCurrentPalette write SetCurrentPalette;
|
||||
property ClipRegion: PGdiObject read FClipRegion write SetClipRegion;
|
||||
property GCValues: TGdkGCValues read FGCValues;
|
||||
property GDIObjects[ID: TGDIType]: PGdiObject read GetGDIObjects write SetGDIObjects;
|
||||
CurrentTextColor: TGDIColor;
|
||||
CurrentBackColor: TGDIColor;
|
||||
|
@ -3941,8 +3941,8 @@ begin
|
||||
BeginGDKErrorTrap;
|
||||
{$ENDIF}
|
||||
|
||||
If not DevCtx.IsNullBrush
|
||||
then begin
|
||||
if not DevCtx.IsNullBrush then
|
||||
begin
|
||||
DevCtx.SelectBrushProps;
|
||||
gdk_draw_arc(DevCtx.Drawable, DevCtx.GC, 1,
|
||||
Left+DCOrigin.X, Top+DCOrigin.Y, Width, Height, 0, 360 shl 6);
|
||||
@ -3951,16 +3951,17 @@ begin
|
||||
// Draw outline
|
||||
|
||||
DevCtx.SelectPenProps;
|
||||
if (dcfPenSelected in DevCtx.Flags)
|
||||
then begin
|
||||
if (dcfPenSelected in DevCtx.Flags) then
|
||||
begin
|
||||
Result := True;
|
||||
if not DevCtx.IsNullPen
|
||||
then begin
|
||||
if not DevCtx.IsNullPen then
|
||||
begin
|
||||
gdk_draw_arc(DevCtx.Drawable, DevCtx.GC, 0,
|
||||
Left+DCOrigin.X, Top+DCOrigin.Y, Width, Height, 0, 360 shl 6);
|
||||
end;
|
||||
end
|
||||
else Result := False;
|
||||
else
|
||||
Result := False;
|
||||
|
||||
{$IFDEF DebugGDKTraps}
|
||||
EndGDKErrorTrap;
|
||||
@ -4304,13 +4305,15 @@ begin
|
||||
exit;
|
||||
with TGtkDeviceContext(DC) do
|
||||
begin
|
||||
if not IsNullBrush then begin
|
||||
if not IsNullBrush then
|
||||
begin
|
||||
Width := Rect.Right - Rect.Left;
|
||||
Height := Rect.Bottom - Rect.Top;
|
||||
// Temporary hold the old brush to
|
||||
// replace it with the given brush
|
||||
OldCurrentBrush := GetBrush;
|
||||
if not CompareGDIBrushes(PGdiObject(Brush),OldCurrentBrush) then begin
|
||||
if not CompareGDIBrushes(PGdiObject(Brush),OldCurrentBrush) then
|
||||
begin
|
||||
BrushChanged:=true;
|
||||
CurrentBrush := PGdiObject(Brush);
|
||||
SelectedColors:=dcscCustom;
|
||||
@ -4320,21 +4323,23 @@ begin
|
||||
SelectBrushProps;
|
||||
|
||||
DCOrigin := Offset;
|
||||
if (CurrentBrush^.GDIBrushFill = GDK_SOLID)
|
||||
and (IsBackgroundColor(TColor(CurrentBrush^.GDIBrushColor.ColorRef)))
|
||||
then begin
|
||||
if (CurrentBrush^.GDIBrushFill = GDK_SOLID) and
|
||||
(IsBackgroundColor(TColor(CurrentBrush^.GDIBrushColor.ColorRef))) then
|
||||
begin
|
||||
StyleFillRectangle(Drawable, GC,
|
||||
CurrentBrush^.GDIBrushColor.ColorRef,
|
||||
Rect.Left+DCOrigin.X, Rect.Top+DCOrigin.Y,
|
||||
Width, Height)
|
||||
end else begin
|
||||
end else
|
||||
begin
|
||||
gdk_draw_rectangle(Drawable, GC, 1,
|
||||
Rect.Left+DCOrigin.X, Rect.Top+DCOrigin.Y,
|
||||
Width, Height);
|
||||
end;
|
||||
|
||||
// Restore current brush
|
||||
if BrushChanged then begin
|
||||
if BrushChanged then
|
||||
begin
|
||||
SelectedColors:=dcscCustom;
|
||||
CurrentBrush := OldCurrentBrush;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user