Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit d084591

Browse files
committed
Set GitHubActionLink.Opacity on disabled.
Sigh. Seems that hyperlinks don't respect dependency property precedence, so the `IsEnabled=False` trigger for `Hyperlink.Foreground` doesn't override the foreground `TemplateBinding`. Not sure what we can do here other than set the control's opacity when disabled, so that's what we'll do for now.
1 parent 1a867f8 commit d084591

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/GitHub.VisualStudio.UI/Styles/GitHubActionLink.xaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@
1313
<Setter.Value>
1414
<ControlTemplate TargetType="{x:Type ui:GitHubActionLink}">
1515
<TextBlock TextTrimming="{TemplateBinding TextTrimming}" TextWrapping="{TemplateBinding TextWrapping}">
16+
<TextBlock.Style>
17+
<Style TargetType="TextBlock">
18+
<Style.Triggers>
19+
<Trigger Property="IsEnabled" Value="False">
20+
<Setter Property="Opacity" Value="0.5"/>
21+
</Trigger>
22+
</Style.Triggers>
23+
</Style>
24+
</TextBlock.Style>
1625
<Hyperlink Command="{TemplateBinding Command}"
1726
CommandParameter="{TemplateBinding CommandParameter}"
1827
Foreground="{TemplateBinding Foreground}">
@@ -40,8 +49,7 @@
4049
</MultiTrigger.Setters>
4150
</MultiTrigger>
4251
<Trigger Property="IsEnabled" Value="False">
43-
<Setter Property="Foreground" Value="{StaticResource GHBlueLinkButtonDisabledBrush}"/>
44-
<Setter Property="TextDecorations" Value="None" />
52+
<Setter Property="TextDecorations" Value="None" />
4553
</Trigger>
4654
</Style.Triggers>
4755
</Style>

0 commit comments

Comments
 (0)