fix: button tooltip foreground (#381)

* TextBlock may not be the direct child of Button, for example, it may wrapped by a StackPanel with icons.
* Introduce another way to solve this problem
This commit is contained in:
leo 2024-08-21 10:17:42 +08:00
parent a99f075c64
commit 7b26589485
No known key found for this signature in database

View file

@ -514,9 +514,12 @@
<Style Selector="Button.flat.primary:pointerover /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="Button.flat.primary:pointerover /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Background" Value="Transparent"/> <Setter Property="Background" Value="Transparent"/>
</Style> </Style>
<Style Selector="Button.flat.primary > TextBlock"> <Style Selector="Button.flat.primary TextBlock">
<Setter Property="Foreground" Value="{DynamicResource AccentButtonForeground}"/> <Setter Property="Foreground" Value="{DynamicResource AccentButtonForeground}"/>
</Style> </Style>
<Style Selector="Button.flat.primary ToolTip TextBlock">
<Setter Property="Foreground" Value="{DynamicResource Brush.FG1}"/>
</Style>
<Style Selector="aes|SearchPanel"> <Style Selector="aes|SearchPanel">
<Setter Property="Template"> <Setter Property="Template">