mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-04 14:57:25 +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
|
public
|
||||||
published
|
published
|
||||||
class function CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): TLCLIntfHandle; override;
|
class function CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): TLCLIntfHandle; override;
|
||||||
|
class procedure SetText(const AWinControl: TWinControl; const AText: String); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TCocoaWSScreen }
|
{ TCocoaWSScreen }
|
||||||
@ -250,6 +251,20 @@ begin
|
|||||||
Result := TLCLIntfHandle(cnt);
|
Result := TLCLIntfHandle(cnt);
|
||||||
end;
|
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 }
|
{ TLCLWindowCallback }
|
||||||
|
|
||||||
function TLCLWindowCallback.CanActivate: Boolean;
|
function TLCLWindowCallback.CanActivate: Boolean;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user