mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-04 20:58:32 +02:00
LCL-GTK3: Force new path on color change. Issue #40971, patch by Anton Kavalenka.
This commit is contained in:
parent
5966a227e8
commit
d328064efb
@ -1090,7 +1090,11 @@ begin
|
||||
FColor := AValue;
|
||||
ColorToCairoRGB(FColor, ARed, AGreen, ABlue);
|
||||
if Assigned(FContext) and Assigned(FContext.pcr) then
|
||||
begin
|
||||
cairo_stroke(fContext.Pcr);
|
||||
cairo_new_path(fContext.Pcr);
|
||||
cairo_set_source_rgb(FContext.pcr, ARed, AGreen, ABlue);
|
||||
end;
|
||||
end;
|
||||
|
||||
constructor TGtk3Pen.Create;
|
||||
@ -1114,6 +1118,7 @@ begin
|
||||
if not Assigned(fContext) then exit(nil);
|
||||
Result := FContext.CurrentPen;
|
||||
fContext.CurrentPen := Self;
|
||||
Self.SetColor(fColor); // update Cairo
|
||||
end;
|
||||
|
||||
function TGtk3Pen.Get(szbuf: integer; pbuf: pointer): integer;
|
||||
|
Loading…
Reference in New Issue
Block a user