|
51 | 51 | <Rectangle Height=".65" Margin="8" Fill="{DynamicResource Brush.Border2}" VerticalAlignment="Center"/> |
52 | 52 |
|
53 | 53 | <!-- Base Information --> |
54 | | - <Grid RowDefinitions="24,Auto,Auto,Auto" ColumnDefinitions="96,*"> |
| 54 | + <Grid RowDefinitions="24,Auto,Auto,Auto,Auto" ColumnDefinitions="96,*"> |
55 | 55 | <!-- SHA --> |
56 | 56 | <TextBlock Grid.Row="0" Grid.Column="0" Classes="info_label" Text="{DynamicResource Text.CommitDetail.Info.SHA}" /> |
57 | 57 | <StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal"> |
|
143 | 143 | </ItemsControl.ItemTemplate> |
144 | 144 | </ItemsControl> |
145 | 145 |
|
| 146 | + <!-- CHILDREN --> |
| 147 | + <TextBlock Grid.Row="2" Grid.Column="0" Classes="info_label" Text="{DynamicResource Text.CommitDetail.Info.Children}" IsVisible="{Binding #ThisControl.Children.Count, Converter={x:Static c:IntConverters.IsGreaterThanZero}}"/> |
| 148 | + <ItemsControl Grid.Row="2" Grid.Column="1" Height="24" Margin="12,0,0,0" ItemsSource="{Binding #ThisControl.Children}" IsVisible="{Binding #ThisControl.Children.Count, Converter={x:Static c:IntConverters.IsGreaterThanZero}}"> |
| 149 | + <ItemsControl.ItemsPanel> |
| 150 | + <ItemsPanelTemplate> |
| 151 | + <StackPanel Orientation="Horizontal" VerticalAlignment="Center"/> |
| 152 | + </ItemsPanelTemplate> |
| 153 | + </ItemsControl.ItemsPanel> |
| 154 | + |
| 155 | + <ItemsControl.ItemTemplate> |
| 156 | + <DataTemplate> |
| 157 | + <TextBlock Classes="primary" |
| 158 | + Text="{Binding Converter={x:Static c:StringConverters.ToShortSHA}}" |
| 159 | + Foreground="DarkOrange" |
| 160 | + TextDecorations="Underline" |
| 161 | + Cursor="Hand" |
| 162 | + Margin="0,0,16,0" |
| 163 | + PointerEntered="OnSHAPointerEntered" |
| 164 | + PointerPressed="OnSHAPressed"> |
| 165 | + <TextBlock.Styles> |
| 166 | + <Style Selector="ToolTip"> |
| 167 | + <Setter Property="MaxWidth" Value="600"/> |
| 168 | + </Style> |
| 169 | + </TextBlock.Styles> |
| 170 | + |
| 171 | + <TextBlock.DataTemplates> |
| 172 | + <DataTemplate DataType="m:Commit"> |
| 173 | + <StackPanel MinWidth="400" Orientation="Vertical"> |
| 174 | + <Grid ColumnDefinitions="Auto,*,Auto"> |
| 175 | + <v:Avatar Grid.Column="0" Width="16" Height="16" VerticalAlignment="Center" IsHitTestVisible="False" User="{Binding Author}"/> |
| 176 | + <TextBlock Grid.Column="1" Classes="primary" Text="{Binding Author.Name}" Margin="8,0,0,0"/> |
| 177 | + <TextBlock Grid.Column="2" Classes="primary" Text="{Binding CommitterTimeStr}" Foreground="{DynamicResource Brush.FG2}" Margin="8,0,0,0"/> |
| 178 | + </Grid> |
| 179 | + |
| 180 | + <TextBlock Classes="primary" Margin="0,8,0,0" Text="{Binding Subject}" TextWrapping="Wrap"/> |
| 181 | + </StackPanel> |
| 182 | + </DataTemplate> |
| 183 | + </TextBlock.DataTemplates> |
| 184 | + </TextBlock> |
| 185 | + </DataTemplate> |
| 186 | + </ItemsControl.ItemTemplate> |
| 187 | + </ItemsControl> |
| 188 | + |
146 | 189 | <!-- REFS --> |
147 | | - <TextBlock Grid.Row="2" Grid.Column="0" Classes="info_label" Text="{DynamicResource Text.CommitDetail.Info.Refs}" IsVisible="{Binding HasDecorators}"/> |
148 | | - <Border Grid.Row="2" Grid.Column="1" Margin="12,0,0,0" Height="24" IsVisible="{Binding HasDecorators}"> |
| 190 | + <TextBlock Grid.Row="3" Grid.Column="0" Classes="info_label" Text="{DynamicResource Text.CommitDetail.Info.Refs}" IsVisible="{Binding HasDecorators}"/> |
| 191 | + <Border Grid.Row="3" Grid.Column="1" Margin="12,0,0,0" Height="24" IsVisible="{Binding HasDecorators}"> |
149 | 192 | <v:CommitRefsPresenter TagBackground="{DynamicResource Brush.DecoratorTag}" |
150 | 193 | Foreground="{DynamicResource Brush.FG1}" |
151 | 194 | FontFamily="{DynamicResource Fonts.Primary}" |
|
155 | 198 | </Border> |
156 | 199 |
|
157 | 200 | <!-- Messages --> |
158 | | - <TextBlock Grid.Row="3" Grid.Column="0" Classes="info_label" Text="{DynamicResource Text.CommitDetail.Info.Message}" VerticalAlignment="Top" Margin="0,4,0,0" /> |
159 | | - <v:CommitMessagePresenter Grid.Row="4" Grid.Column="1" |
| 201 | + <TextBlock Grid.Row="4" Grid.Column="0" Classes="info_label" Text="{DynamicResource Text.CommitDetail.Info.Message}" VerticalAlignment="Top" Margin="0,4,0,0" /> |
| 202 | + <v:CommitMessagePresenter Grid.Row="5" Grid.Column="1" |
160 | 203 | Margin="12,5,8,0" |
161 | 204 | Classes="primary" |
162 | 205 | Message="{Binding #ThisControl.Message}" |
|
0 commit comments