Browse Source
Tooltip inherits theme from control (#13454)
Co-authored-by: Herman Kirshin <herman.kirshin@jetbrains.com>
pull/13482/head
Herman K
3 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
0 deletions
-
src/Avalonia.Controls/ToolTip.cs
|
|
|
@ -3,6 +3,7 @@ using Avalonia.Controls.Diagnostics; |
|
|
|
using Avalonia.Controls.Metadata; |
|
|
|
using Avalonia.Controls.Primitives; |
|
|
|
using Avalonia.Reactive; |
|
|
|
using Avalonia.Styling; |
|
|
|
|
|
|
|
namespace Avalonia.Controls |
|
|
|
{ |
|
|
|
@ -227,6 +228,7 @@ namespace Avalonia.Controls |
|
|
|
|
|
|
|
toolTip = tip as ToolTip ?? new ToolTip { Content = tip }; |
|
|
|
control.SetValue(ToolTipProperty, toolTip); |
|
|
|
toolTip.SetValue(ThemeVariant.RequestedThemeVariantProperty, control.ActualThemeVariant); |
|
|
|
} |
|
|
|
|
|
|
|
toolTip.Open(control); |
|
|
|
|