mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 10:39:18 +02:00
gtk: fix Frame3D drawing on the designer canvas
git-svn-id: trunk@21623 -
This commit is contained in:
parent
18ea81f368
commit
dca985f3e8
@ -219,7 +219,7 @@ end;
|
|||||||
function Frame3d(DC : HDC; var ARect : TRect; const FrameWidth : integer;
|
function Frame3d(DC : HDC; var ARect : TRect; const FrameWidth : integer;
|
||||||
const Style: TGraphicsBevelCut) : boolean;
|
const Style: TGraphicsBevelCut) : boolean;
|
||||||
begin
|
begin
|
||||||
Result:= WidgetSet.Frame3d(DC, ARect, FrameWidth, Style);
|
Result := WidgetSet.Frame3d(DC, ARect, FrameWidth, Style);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$ifdef OldRawImageProcs}
|
{$ifdef OldRawImageProcs}
|
||||||
|
@ -377,6 +377,7 @@ type
|
|||||||
property Drawable: PGDKDrawable read FDrawable;
|
property Drawable: PGDKDrawable read FDrawable;
|
||||||
property Widget: PGtkWidget read FWidget; // the owner
|
property Widget: PGtkWidget read FWidget; // the owner
|
||||||
property GC: pgdkGC read GetGC write FGC;
|
property GC: pgdkGC read GetGC write FGC;
|
||||||
|
property WithChildWindows: Boolean read FWithChildWindows;
|
||||||
// winapi
|
// winapi
|
||||||
property ROP2: Integer read GetRop2 write SetRop2;
|
property ROP2: Integer read GetRop2 write SetRop2;
|
||||||
end;
|
end;
|
||||||
|
@ -4340,6 +4340,7 @@ var
|
|||||||
TheStyle: PGtkStyle;
|
TheStyle: PGtkStyle;
|
||||||
i: integer;
|
i: integer;
|
||||||
gc1, gc2: PGdkGC;
|
gc1, gc2: PGdkGC;
|
||||||
|
OldGC1Values, OldGC2Values: TGdkGCValues;
|
||||||
begin
|
begin
|
||||||
Result := IsValidDC(DC);
|
Result := IsValidDC(DC);
|
||||||
if not Result or (FrameWidth = 0) then Exit;
|
if not Result or (FrameWidth = 0) then Exit;
|
||||||
@ -4371,6 +4372,14 @@ begin
|
|||||||
|
|
||||||
with TGtkDeviceContext(DC) do
|
with TGtkDeviceContext(DC) do
|
||||||
begin
|
begin
|
||||||
|
if WithChildWindows then
|
||||||
|
begin
|
||||||
|
gdk_gc_get_values(gc1, @OldGC1Values);
|
||||||
|
gdk_gc_get_values(gc2, @OldGC2Values);
|
||||||
|
gdk_gc_set_subwindow(gc1, GDK_INCLUDE_INFERIORS);
|
||||||
|
gdk_gc_set_subwindow(gc2, GDK_INCLUDE_INFERIORS);
|
||||||
|
end;
|
||||||
|
|
||||||
for i := 1 to FrameWidth do
|
for i := 1 to FrameWidth do
|
||||||
begin
|
begin
|
||||||
gdk_draw_line(Drawable, gc1, ARect.Left + Offset.x, ARect.Top + Offset.y,
|
gdk_draw_line(Drawable, gc1, ARect.Left + Offset.x, ARect.Top + Offset.y,
|
||||||
@ -4384,6 +4393,13 @@ begin
|
|||||||
// inflate the rectangle (! ARect will be returned to the user with this)
|
// inflate the rectangle (! ARect will be returned to the user with this)
|
||||||
InflateRect(ARect, -1, -1);
|
InflateRect(ARect, -1, -1);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
if WithChildWindows then
|
||||||
|
begin
|
||||||
|
gdk_gc_set_values(gc1, @OldGC1Values, GDK_GC_SUBWINDOW);
|
||||||
|
gdk_gc_set_values(gc2, @OldGC2Values, GDK_GC_SUBWINDOW);
|
||||||
|
end;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -7818,7 +7834,7 @@ begin
|
|||||||
|
|
||||||
if not IsValidDC(DC) then Exit(False);
|
if not IsValidDC(DC) then Exit(False);
|
||||||
if SavedDC <= 0 then Exit(False);
|
if SavedDC <= 0 then Exit(False);
|
||||||
|
|
||||||
repeat
|
repeat
|
||||||
SavedDevCtx := DevCtx.SavedContext;
|
SavedDevCtx := DevCtx.SavedContext;
|
||||||
Dec(SavedDC);
|
Dec(SavedDC);
|
||||||
|
Loading…
Reference in New Issue
Block a user