|
18 | 18 | <Binding> |
19 | 19 | <Binding.Source> |
20 | 20 | <ghfvs:PullRequestDetailViewModelDesigner SourceBranchDisplayName="shana/error-handling-a-ridiculously-long-branch-name-because-why-not" |
21 | | - TargetBranchDisplayName="master-is-always-stable" |
22 | | - CommentCount="10"> |
| 21 | + TargetBranchDisplayName="master-is-always-stable" |
| 22 | + CommentCount="10"> |
23 | 23 | <ghfvs:PullRequestDetailViewModelDesigner.UpdateState> |
24 | 24 | <ghfvs:PullRequestUpdateStateDesigner CommitsAhead="0" CommitsBehind="0" UpToDate="True"/> |
25 | 25 | </ghfvs:PullRequestDetailViewModelDesigner.UpdateState> |
|
76 | 76 | <CommandBinding Command="{x:Static markdig:Commands.Hyperlink}" Executed="OpenHyperlink" /> |
77 | 77 | </FrameworkElement.CommandBindings> |
78 | 78 |
|
79 | | - <DockPanel Grid.IsSharedSizeScope="True" Margin="8 0"> |
80 | | - <Grid DockPanel.Dock="Top"> |
81 | | - <Grid.ColumnDefinitions> |
82 | | - <ColumnDefinition Width="*" /> |
83 | | - <ColumnDefinition Width="Auto" /> |
84 | | - </Grid.ColumnDefinitions> |
85 | | - |
86 | | - <Grid.RowDefinitions> |
87 | | - <RowDefinition Height="*" /> |
88 | | - <RowDefinition Height="Auto" /> |
89 | | - </Grid.RowDefinitions> |
90 | | - |
91 | | - <TextBlock Grid.Column="0" |
92 | | - Style="{DynamicResource {x:Static vsui:VsResourceKeys.TextBlockEnvironment122PercentFontSizeStyleKey}}" |
| 79 | + <DockPanel Grid.IsSharedSizeScope="True"> |
| 80 | + <StackPanel DockPanel.Dock="Top" |
| 81 | + Orientation="Vertical" |
| 82 | + Margin="8 0 0 0"> |
| 83 | + |
| 84 | + <!-- Title --> |
| 85 | + <TextBlock Style="{DynamicResource {x:Static vsui:VsResourceKeys.TextBlockEnvironment122PercentFontSizeStyleKey}}" |
93 | 86 | TextWrapping="Wrap" |
94 | 87 | Margin="0 0 5 3" |
95 | 88 | Text="{Binding Model.Title}"/> |
96 | 89 |
|
97 | | - <StackPanel Grid.Column="0" |
98 | | - Grid.Row="1" |
99 | | - Orientation="Horizontal"> |
100 | | - |
| 90 | + <!-- State and branches --> |
| 91 | + <StackPanel Orientation="Horizontal"> |
101 | 92 | <TextBlock FontWeight="Bold" |
102 | | - Margin="0 0 4 0" |
103 | 93 | VerticalAlignment="Center" |
104 | 94 | Text="{Binding Model.State, Converter={StaticResource AllCaps}}" |
105 | 95 | Style="{StaticResource StateIndicator}"/> |
106 | 96 |
|
107 | | - <Rectangle Grid.Column="1" Margin="5 0 10 0" Width="1" Height="12" VerticalAlignment="Center" Style="{DynamicResource Separator}" /> |
| 97 | + <Rectangle Margin="9 0" Width="1" Height="12" VerticalAlignment="Center" Style="{DynamicResource Separator}" /> |
108 | 98 |
|
109 | | - <!-- source and target branches --> |
110 | | - <Grid Margin="0 -3" HorizontalAlignment="Left"> |
111 | | - <Grid.ColumnDefinitions> |
112 | | - <ColumnDefinition Width="Auto"/> |
113 | | - <ColumnDefinition Width="*"/> |
114 | | - <ColumnDefinition Width="Auto"/> |
115 | | - <ColumnDefinition Width="*"/> |
116 | | - </Grid.ColumnDefinitions> |
| 99 | + <Border Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center" CornerRadius="2" Padding="5 1" Background="{DynamicResource GitHubBranchNameBackgroundBrush}"> |
| 100 | + <TextBlock FontFamily="Consolas" TextTrimming="CharacterEllipsis" ToolTip="{Binding TargetBranchDisplayName, Mode=OneWay}" Text="{Binding TargetBranchDisplayName, Mode=OneWay}" /> |
| 101 | + </Border> |
117 | 102 |
|
118 | | - <Border Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center" CornerRadius="2" Padding="5 1" Background="{DynamicResource GitHubBranchNameBackgroundBrush}"> |
119 | | - <TextBlock FontFamily="Consolas" TextTrimming="CharacterEllipsis" ToolTip="{Binding TargetBranchDisplayName, Mode=OneWay}" Text="{Binding TargetBranchDisplayName, Mode=OneWay}" /> |
120 | | - </Border> |
| 103 | + <ghfvs:OcticonImage Grid.Column="2" VerticalAlignment="Center" Margin="5 3" Icon="arrow_left" /> |
121 | 104 |
|
122 | | - <ghfvs:OcticonImage Grid.Column="2" VerticalAlignment="Center" Margin="5" Icon="arrow_left" /> |
| 105 | + <Border Grid.Column="3" HorizontalAlignment="Left" VerticalAlignment="Center" CornerRadius="2" Padding="5 1" Background="{DynamicResource GitHubBranchNameBackgroundBrush}"> |
| 106 | + <TextBlock FontFamily="Consolas" TextTrimming="CharacterEllipsis" ToolTip="{Binding SourceBranchDisplayName, Mode=OneWay}" Text="{Binding SourceBranchDisplayName, Mode=OneWay}" /> |
| 107 | + </Border> |
123 | 108 |
|
124 | | - <Border Grid.Column="3" HorizontalAlignment="Left" VerticalAlignment="Center" CornerRadius="2" Padding="5 1" Background="{DynamicResource GitHubBranchNameBackgroundBrush}"> |
125 | | - <TextBlock FontFamily="Consolas" TextTrimming="CharacterEllipsis" ToolTip="{Binding SourceBranchDisplayName, Mode=OneWay}" Text="{Binding SourceBranchDisplayName, Mode=OneWay}" /> |
126 | | - </Border> |
127 | | - </Grid> |
128 | 109 | </StackPanel> |
129 | | - </Grid> |
130 | 110 |
|
131 | | - <!-- Avatar, PR Title, Open/Merged/Closed state and actions area --> |
132 | | - <Grid DockPanel.Dock="Top"> |
133 | | - <Grid.ColumnDefinitions> |
134 | | - <ColumnDefinition Width="Auto"/> |
135 | | - <ColumnDefinition Width="1*"/> |
136 | | - <ColumnDefinition Width="Auto"/> |
137 | | - </Grid.ColumnDefinitions> |
138 | | - |
139 | | - <Grid.RowDefinitions> |
140 | | - <RowDefinition Height="Auto"/> |
141 | | - <RowDefinition Height="Auto"/> |
142 | | - <RowDefinition Height="Auto"/> |
143 | | - </Grid.RowDefinitions> |
144 | | - |
145 | | - <StackPanel Grid.Column="1" Margin="0 0 6 0" Orientation="Vertical"> |
146 | | - <TextBlock Grid.Column="0" Opacity="0.5" VerticalAlignment="Center" |
147 | | - Text="{Binding Model.UpdatedAt, StringFormat={x:Static prop:Resources.UpdatedFormat}, Converter={ghfvs:DurationToStringConverter}, Mode=OneWay}"/> |
148 | | - </StackPanel> |
| 111 | + <!-- Updated at --> |
| 112 | + <TextBlock Opacity="0.5" |
| 113 | + Text="{Binding Model.UpdatedAt, StringFormat={x:Static prop:Resources.UpdatedFormat}, Converter={ghfvs:DurationToStringConverter}, Mode=OneWay}"/> |
149 | 114 |
|
150 | 115 | <!-- Git operation error message --> |
151 | | - <TextBox Grid.Column="0" |
152 | | - Grid.ColumnSpan="3" |
153 | | - Grid.Row="2" |
154 | | - Foreground="Red" |
155 | | - Margin="0 2 0 0" |
| 116 | + <TextBox Foreground="Red" |
| 117 | + Margin="-2 4" |
156 | 118 | Text="{Binding OperationError, Mode=OneWay}" |
157 | | - VerticalAlignment="Center" |
158 | | - TextWrapping="Wrap" |
159 | 119 | Style="{StaticResource FlatReadOnlyTextBox}" |
160 | 120 | Visibility="{Binding OperationError, Converter={ghfvs:NullToVisibilityConverter}}"/> |
161 | | - </Grid> |
| 121 | + </StackPanel> |
162 | 122 |
|
163 | | - <Rectangle DockPanel.Dock="Top" Style="{StaticResource Separator}" Height="2" Margin="-8,5,-8,0"/> |
| 123 | + <Rectangle DockPanel.Dock="Top" Style="{StaticResource Separator}" Height="2" Margin="0,5,0,0"/> |
164 | 124 |
|
165 | 125 | <ScrollViewer CanContentScroll="True" |
166 | | - Margin="0,0,-8,0" |
| 126 | + Padding="8 0 0 0" |
167 | 127 | HorizontalScrollBarVisibility="Auto" |
168 | 128 | VerticalScrollBarVisibility="Auto"> |
169 | 129 | <ghfvs:ScrollingVerticalStackPanel> |
|
0 commit comments