Skip to content

Commit

Permalink
Tooltip inherits theme from control (#13454)
Browse files Browse the repository at this point in the history
Co-authored-by: Herman Kirshin <herman.kirshin@jetbrains.com>
  • Loading branch information
HermanKirshin and herman-kirshin authored Nov 2, 2023
1 parent 9753aa5 commit 39ce0c2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Avalonia.Controls/ToolTip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Avalonia.Controls.Metadata;
using Avalonia.Controls.Primitives;
using Avalonia.Reactive;
using Avalonia.Styling;

namespace Avalonia.Controls
{
Expand Down Expand Up @@ -227,6 +228,7 @@ private static void IsOpenChanged(AvaloniaPropertyChangedEventArgs e)

toolTip = tip as ToolTip ?? new ToolTip { Content = tip };
control.SetValue(ToolTipProperty, toolTip);
toolTip.SetValue(ThemeVariant.RequestedThemeVariantProperty, control.ActualThemeVariant);
}

toolTip.Open(control);
Expand Down

0 comments on commit 39ce0c2

Please sign in to comment.