mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-02 11:10:12 +02:00
Qt: optimized palette reload instead of recreating handles. issue #38589
(cherry picked from commit 9233efadf0
)
This commit is contained in:
parent
86db9c2719
commit
927f2884d3
@ -932,17 +932,6 @@ begin
|
||||
begin
|
||||
ClearCachedColors;
|
||||
FreeSysColorBrushes(True);
|
||||
end else
|
||||
begin
|
||||
if QObject_isWidgetType(Sender) then
|
||||
begin
|
||||
W := QtObjectFromWidgetH(QWidgetH(Sender));
|
||||
if (W <> nil) and Assigned(W.LCLObject) and W.IsWindow then
|
||||
begin
|
||||
RecreateWnd(W.LCLObject);
|
||||
Result := True;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
QEventShow,
|
||||
|
@ -2691,6 +2691,14 @@ begin
|
||||
begin
|
||||
if (FPalette <> nil) and not InUpdate and not Palette.InReload then
|
||||
begin
|
||||
// issue #38589
|
||||
if (QEvent_type(Event) = QEventPaletteChange) then
|
||||
begin
|
||||
FPalette.Free;
|
||||
FPalette := nil;
|
||||
GetPalette;
|
||||
end;
|
||||
|
||||
OldColor := Palette.CurrentColor;
|
||||
// now set our fpalette ColorRef from LCL
|
||||
if LCLObject.Color <> clDefault then
|
||||
|
Loading…
Reference in New Issue
Block a user