mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-12 09:28:37 +02:00
gtk2: fix FrameRect - it must use a passed brush instead of selected one
git-svn-id: trunk@38747 -
This commit is contained in:
parent
e211eafca1
commit
edc52f2857
@ -4070,6 +4070,7 @@ var
|
|||||||
DevCtx: TGtkDeviceContext absolute DC;
|
DevCtx: TGtkDeviceContext absolute DC;
|
||||||
DCOrigin: TPoint;
|
DCOrigin: TPoint;
|
||||||
R: TRect;
|
R: TRect;
|
||||||
|
OldBrush: HBrush;
|
||||||
begin
|
begin
|
||||||
Result:=0;
|
Result:=0;
|
||||||
if not IsValidDC(DC) then Exit;
|
if not IsValidDC(DC) then Exit;
|
||||||
@ -4079,7 +4080,8 @@ begin
|
|||||||
Result := 1;
|
Result := 1;
|
||||||
if {%H-}PGdiObject(hBr)^.IsNullBrush then Exit;
|
if {%H-}PGdiObject(hBr)^.IsNullBrush then Exit;
|
||||||
|
|
||||||
DevCtx.SelectedColors:= dcscCustom;
|
OldBrush := SelectObject(DC, hBr);
|
||||||
|
DevCtx.SelectedColors := dcscCustom;
|
||||||
EnsureGCColor(DC, dccGDIBrushColor, True, False);//Brush Color
|
EnsureGCColor(DC, dccGDIBrushColor, True, False);//Brush Color
|
||||||
|
|
||||||
R := ARect;
|
R := ARect;
|
||||||
@ -4089,6 +4091,7 @@ begin
|
|||||||
gdk_draw_rectangle(DevCtx.Drawable, DevCtx.GC, 0,
|
gdk_draw_rectangle(DevCtx.Drawable, DevCtx.GC, 0,
|
||||||
R.Left + DCOrigin.X, R.Top + DCOrigin.Y,
|
R.Left + DCOrigin.X, R.Top + DCOrigin.Y,
|
||||||
R.Right-R.Left-1, R.Bottom-R.Top-1);
|
R.Right-R.Left-1, R.Bottom-R.Top-1);
|
||||||
|
SelectObject(DC, OldBrush);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user