Skip to content

Commit 6bb6ef0

Browse files
HermanKirshinherman-kirshin
authored andcommitted
Tooltip inherits theme from control (#13454)
Co-authored-by: Herman Kirshin <[email protected]>
1 parent a733cf8 commit 6bb6ef0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Avalonia.Controls/ToolTip.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using Avalonia.Controls.Metadata;
44
using Avalonia.Controls.Primitives;
55
using Avalonia.Reactive;
6+
using Avalonia.Styling;
67

78
namespace Avalonia.Controls
89
{
@@ -227,6 +228,7 @@ private static void IsOpenChanged(AvaloniaPropertyChangedEventArgs e)
227228

228229
toolTip = tip as ToolTip ?? new ToolTip { Content = tip };
229230
control.SetValue(ToolTipProperty, toolTip);
231+
toolTip.SetValue(ThemeVariant.RequestedThemeVariantProperty, control.ActualThemeVariant);
230232
}
231233

232234
toolTip.Open(control);

0 commit comments

Comments
 (0)