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

Commit ae74e33

Browse files
committed
Revert XAML to show non-split status bar button
1 parent dec0a62 commit ae74e33

File tree

1 file changed

+51
-20
lines changed

1 file changed

+51
-20
lines changed

src/GitHub.InlineReviews/Views/PullRequestStatusView.xaml

Lines changed: 51 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -36,34 +36,65 @@
3636
</UserControl.Resources>
3737

3838
<StackPanel Orientation="Horizontal">
39-
<Button
39+
<Grid>
40+
<Button
4041
Foreground="{DynamicResource VsBrush.StatusBarText}"
4142
BorderThickness="0"
4243
Padding="4 0"
4344
Command="{Binding OpenPullRequestsCommand}">
4445

45-
<ui:OcticonPath ToolTip="Open or Create Pull Requests"
46-
Fill="White"
47-
VerticalAlignment="Bottom"
48-
Margin="0 0 0 0"
49-
Icon="git_pull_request" />
50-
</Button>
51-
<Button
52-
Foreground="{DynamicResource VsBrush.StatusBarText}"
53-
BorderThickness="0"
54-
Padding="4 0"
55-
Command="{Binding ShowCurrentPullRequestCommand}"
56-
Visibility="{Binding Number, TargetNullValue=Collapsed}">
46+
<StackPanel Orientation="Horizontal">
47+
<ui:OcticonPath
48+
Fill="White"
49+
VerticalAlignment="Bottom"
50+
Margin="0 0 4 0 "
51+
Icon="git_pull_request" />
52+
<TextBlock VerticalAlignment="Center">
53+
Pull requests
54+
</TextBlock>
55+
</StackPanel>
56+
</Button>
57+
<Grid.Style>
58+
<Style>
59+
<Setter Property="Control.Visibility" Value="Collapsed" />
60+
<Style.Triggers>
61+
<!-- Visible when Number is Null -->
62+
<DataTrigger Binding="{Binding Number}" Value="{x:Null}">
63+
<Setter Property="Control.Visibility" Value="Visible" />
64+
</DataTrigger>
65+
</Style.Triggers>
66+
</Style>
67+
</Grid.Style>
68+
<Grid.ToolTip>
69+
<TextBlock VerticalAlignment="Center">
70+
Open or Create a Pull request
71+
</TextBlock>
72+
</Grid.ToolTip>
73+
</Grid>
74+
75+
<Grid Visibility="{Binding Number, TargetNullValue=Collapsed}">
76+
<Button
77+
Foreground="{DynamicResource VsBrush.StatusBarText}"
78+
BorderThickness="0"
79+
Padding="4 0"
80+
Command="{Binding ShowCurrentPullRequestCommand}">
5781

58-
<TextBlock
59-
VerticalAlignment="Center">
60-
#<Run Text="{Binding Number}" />
61-
</TextBlock>
62-
<Button.ToolTip>
82+
<StackPanel Orientation="Horizontal">
83+
<ui:OcticonPath
84+
Fill="White"
85+
VerticalAlignment="Bottom"
86+
Margin="0 0 4 0 "
87+
Icon="git_pull_request" />
88+
<TextBlock VerticalAlignment="Center">
89+
#<Run Text="{Binding Number}" />
90+
</TextBlock>
91+
</StackPanel>
92+
</Button>
93+
<Grid.ToolTip>
6394
<TextBlock VerticalAlignment="Center">
6495
#<Run Text="{Binding Number}" /> - <Run Text="{Binding Title}" />
6596
</TextBlock>
66-
</Button.ToolTip>
67-
</Button>
97+
</Grid.ToolTip>
98+
</Grid>
6899
</StackPanel>
69100
</UserControl>

0 commit comments

Comments
 (0)