mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-04 03:37:59 +01:00
cocoa: forcing redrawing of the hintwindow contents on caption change. See comments in the code for why this is needed
git-svn-id: trunk@58960 -
This commit is contained in:
parent
ac62bf6451
commit
71ed470870
@ -145,6 +145,7 @@ type
|
||||
public
|
||||
published
|
||||
class function CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): TLCLIntfHandle; override;
|
||||
class procedure SetText(const AWinControl: TWinControl; const AText: String); override;
|
||||
end;
|
||||
|
||||
{ TCocoaWSScreen }
|
||||
@ -250,6 +251,20 @@ begin
|
||||
Result := TLCLIntfHandle(cnt);
|
||||
end;
|
||||
|
||||
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
|
||||
NSView(AWinControl.Handle).setNeedsDisplay_(true);
|
||||
end;
|
||||
|
||||
{ TLCLWindowCallback }
|
||||
|
||||
function TLCLWindowCallback.CanActivate: Boolean;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user