mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-13 11:29:29 +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;
|
||||
DCOrigin: TPoint;
|
||||
R: TRect;
|
||||
OldBrush: HBrush;
|
||||
begin
|
||||
Result:=0;
|
||||
if not IsValidDC(DC) then Exit;
|
||||
@ -4079,7 +4080,8 @@ begin
|
||||
Result := 1;
|
||||
if {%H-}PGdiObject(hBr)^.IsNullBrush then Exit;
|
||||
|
||||
DevCtx.SelectedColors:= dcscCustom;
|
||||
OldBrush := SelectObject(DC, hBr);
|
||||
DevCtx.SelectedColors := dcscCustom;
|
||||
EnsureGCColor(DC, dccGDIBrushColor, True, False);//Brush Color
|
||||
|
||||
R := ARect;
|
||||
@ -4089,6 +4091,7 @@ begin
|
||||
gdk_draw_rectangle(DevCtx.Drawable, DevCtx.GC, 0,
|
||||
R.Left + DCOrigin.X, R.Top + DCOrigin.Y,
|
||||
R.Right-R.Left-1, R.Bottom-R.Top-1);
|
||||
SelectObject(DC, OldBrush);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user