mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 01:57:57 +02:00
Cocoa: make sure to update HintWindow by Invalidate
there is a bug in the implementation before, and the content of HintWindow may not be updated. when the content of HintWindow has changed, but the size of TCocoaWindowContent has not changed, Cocoa did not update TCocoaWindowContentDocument, so THintWindow.Paint() was not called.
This commit is contained in:
parent
70c4c85414
commit
4d033a9af6
@ -316,18 +316,7 @@ class procedure TCocoaWSHintWindow.SetText(const AWinControl: TWinControl;
|
||||
const AText: String);
|
||||
begin
|
||||
TCocoaWSCustomForm.SetText(AWinControl, AText);
|
||||
//todo: this is a workaround. For some reason, when moving a hint window
|
||||
// from one control to another (of the same type), the contents
|
||||
// of the hint window is not invalidated.
|
||||
//
|
||||
// Need to figure out why this is happening and resolve at the proper place.
|
||||
// In the mean time - invalidating contents every time Caption is change
|
||||
if (AWinControl.HandleAllocated) then
|
||||
{$ifdef BOOLFIX}
|
||||
NSView(AWinControl.Handle).setNeedsDisplay__(Ord(true));
|
||||
{$else}
|
||||
NSView(AWinControl.Handle).setNeedsDisplay_(true);
|
||||
{$endif}
|
||||
AWinControl.Invalidate;
|
||||
end;
|
||||
|
||||
{ TLCLWindowCallback }
|
||||
|
Loading…
Reference in New Issue
Block a user