Browse Source
Merge pull request #1669 from AvaloniaUI/feature/tooltips-obey-screen-edges
ensure tooltips fit inside screen edges.
pull/1671/head
danwalmsley
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
1 deletions
-
src/Avalonia.Controls/ToolTip.cs
|
|
|
@ -234,11 +234,12 @@ namespace Avalonia.Controls |
|
|
|
{ |
|
|
|
Close(); |
|
|
|
|
|
|
|
_popup = new PopupRoot { Content = this }; |
|
|
|
_popup = new PopupRoot { Content = this, }; |
|
|
|
((ISetLogicalParent)_popup).SetParent(control); |
|
|
|
_popup.Position = Popup.GetPosition(control, GetPlacement(control), _popup, |
|
|
|
GetHorizontalOffset(control), GetVerticalOffset(control)); |
|
|
|
_popup.Show(); |
|
|
|
_popup.SnapInsideScreenEdges(); |
|
|
|
} |
|
|
|
|
|
|
|
private void Close() |
|
|
|
|