|
38 | 38 | </Grid> |
39 | 39 |
|
40 | 40 | <!-- Operation Information --> |
41 | | - <Grid Grid.Row="1" ColumnDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,*" Margin="8"> |
42 | | - <TextBlock Grid.Column="0" Text="{DynamicResource Text.InteractiveRebase.Target}" Foreground="{DynamicResource Brush.FG2}" FontWeight="Bold"/> |
43 | | - <Path Grid.Column="1" Width="14" Height="14" Margin="8,0,0,0" Data="{StaticResource Icons.Branch}"/> |
44 | | - <TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Current.FriendlyName}" Margin="8,0,0,0"/> |
45 | | - |
46 | | - <TextBlock Grid.Column="3" Margin="48,0,0,0" Text="{DynamicResource Text.InteractiveRebase.On}" Foreground="{DynamicResource Brush.FG2}" FontWeight="Bold"/> |
47 | | - <Path Grid.Column="4" Width="14" Height="14" Margin="8,0,0,0" Data="{StaticResource Icons.Commit}"/> |
48 | | - <TextBlock Grid.Column="5" VerticalAlignment="Center" Text="{Binding On.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/> |
49 | | - <TextBlock Grid.Column="6" VerticalAlignment="Center" Text="{Binding On.Subject}" Margin="4,0,0,0" TextTrimming="CharacterEllipsis"/> |
| 41 | + <Grid Grid.Row="1" Margin="8" ColumnDefinitions="*,Auto"> |
| 42 | + <StackPanel Grid.Column="0" Orientation="Horizontal" ClipToBounds="True"> |
| 43 | + <TextBlock Text="{DynamicResource Text.InteractiveRebase.Target}" Foreground="{DynamicResource Brush.FG2}" FontWeight="Bold"/> |
| 44 | + <Path Width="14" Height="14" Margin="8,0,0,0" Data="{StaticResource Icons.Branch}"/> |
| 45 | + <TextBlock VerticalAlignment="Center" Text="{Binding Current.FriendlyName}" Margin="8,0,0,0"/> |
| 46 | + |
| 47 | + <TextBlock Margin="16,0,0,0" Text="{DynamicResource Text.InteractiveRebase.On}" Foreground="{DynamicResource Brush.FG2}" FontWeight="Bold"/> |
| 48 | + <Path Width="14" Height="14" Margin="8,0,0,0" Data="{StaticResource Icons.Commit}"/> |
| 49 | + <TextBlock VerticalAlignment="Center" Text="{Binding On.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/> |
| 50 | + <TextBlock VerticalAlignment="Center" Text="{Binding On.Subject}" Margin="4,0,0,0"/> |
| 51 | + </StackPanel> |
| 52 | + |
| 53 | + <Border Grid.Column="1" Background="Transparent" Width="20" Height="20"> |
| 54 | + <ToolTip.Tip> |
| 55 | + <TextBlock> |
| 56 | + <Run Text="{DynamicResource Text.InteractiveRebase.ReorderTip}"/> |
| 57 | + <Run Text=" "/> |
| 58 | + <Run Text="{OnPlatform 'Ctrl+Up/Ctrl+Down', macOS='⌘+Up/⌘+Down'}" FontSize="11" Foreground="{DynamicResource MenuFlyoutItemKeyboardAcceleratorTextForeground}"/> |
| 59 | + </TextBlock> |
| 60 | + </ToolTip.Tip> |
| 61 | + |
| 62 | + <Path Width="14" Height="14" Data="{StaticResource Icons.Info}"/> |
| 63 | + </Border> |
50 | 64 | </Grid> |
51 | 65 |
|
52 | 66 | <!-- Body --> |
|
81 | 95 |
|
82 | 96 | <v:InteractiveRebaseListBox.ItemTemplate> |
83 | 97 | <DataTemplate DataType="vm:InteractiveRebaseItem"> |
84 | | - <Grid Height="26" Margin="8,0" ClipToBounds="True"> |
| 98 | + <Grid Height="26" |
| 99 | + Margin="8,0" |
| 100 | + Background="Transparent" |
| 101 | + ClipToBounds="True" |
| 102 | + PointerPressed="OnRowPointerPressed" |
| 103 | + DragDrop.AllowDrop="True" |
| 104 | + DragDrop.DragOver="OnRowDragOver" |
| 105 | + DragDrop.DragLeave="OnRowDragLeave" |
| 106 | + DragDrop.Drop="OnRowDrop"> |
85 | 107 | <Grid.ColumnDefinitions> |
86 | | - <ColumnDefinition Width="16"/> |
87 | 108 | <ColumnDefinition Width="Auto" SharedSizeGroup="CommitOrderColumn"/> |
88 | 109 | <ColumnDefinition Width="110"/> |
89 | 110 | <ColumnDefinition Width="*"/> |
|
93 | 114 | <ColumnDefinition Width="Auto" SharedSizeGroup="CommitTimeColumn"/> |
94 | 115 | </Grid.ColumnDefinitions> |
95 | 116 |
|
96 | | - <!-- Drag & Drop Anchor --> |
97 | | - <Border Grid.Column="0" Background="Transparent" |
98 | | - PointerPressed="OnRowHeaderPointerPressed" |
99 | | - DragDrop.AllowDrop="True" |
100 | | - DragDrop.DragOver="OnRowHeaderDragOver"> |
101 | | - <ToolTip.Tip> |
102 | | - <TextBlock> |
103 | | - <Run Text="{DynamicResource Text.InteractiveRebase.ReorderTip}"/> |
104 | | - <Run Text=" "/> |
105 | | - <Run Text="{OnPlatform 'Ctrl+Up/Ctrl+Down', macOS='⌘+Up/⌘+Down'}" FontSize="11" Foreground="{DynamicResource MenuFlyoutItemKeyboardAcceleratorTextForeground}"/> |
106 | | - </TextBlock> |
107 | | - </ToolTip.Tip> |
108 | | - <Path Width="14" Height="14" |
109 | | - Data="{StaticResource Icons.Move}" |
110 | | - Fill="{DynamicResource Brush.FG2}" |
111 | | - HorizontalAlignment="Center" |
112 | | - VerticalAlignment="Center"/> |
113 | | - </Border> |
114 | | - |
115 | 117 | <!-- Original Order --> |
116 | | - <TextBlock Grid.Column="1" |
| 118 | + <TextBlock Grid.Column="0" |
117 | 119 | Margin="4,0,0,0" |
118 | 120 | FontFamily="{DynamicResource Fonts.Monospace}" |
119 | 121 | Text="{Binding OriginalOrder, StringFormat='#{0}'}" |
120 | 122 | HorizontalAlignment="Center"/> |
121 | 123 |
|
122 | 124 | <!-- Action --> |
123 | | - <Button Grid.Column="2" Opacity="1" Margin="4,0,0,0" Padding="8,2" Background="Transparent" Click="OnButtonActionClicked"> |
| 125 | + <Button Grid.Column="1" Opacity="1" Margin="4,0,0,0" Padding="8,2" Background="Transparent" Click="OnButtonActionClicked"> |
124 | 126 | <StackPanel Orientation="Horizontal"> |
125 | 127 | <Ellipse Width="14" Height="14" Fill="{Binding Action, Converter={x:Static c:InteractiveRebaseActionConverters.ToIconBrush}}"/> |
126 | 128 | <TextBlock Margin="8,0" Text="{Binding Action, Converter={x:Static c:InteractiveRebaseActionConverters.ToName}}"/> |
127 | 129 | </StackPanel> |
128 | 130 | </Button> |
129 | 131 |
|
130 | 132 | <!-- Subject --> |
131 | | - <Grid Grid.Column="3" ColumnDefinitions="Auto,*" ClipToBounds="True"> |
| 133 | + <Grid Grid.Column="2" ColumnDefinitions="Auto,*" ClipToBounds="True"> |
132 | 134 | <Button Grid.Column="0" |
133 | 135 | Classes="icon_button" |
134 | 136 | Margin="0,0,6,0" Padding="0" |
|
150 | 152 | </Grid> |
151 | 153 |
|
152 | 154 | <!-- Author Avatar --> |
153 | | - <v:Avatar Grid.Column="4" |
| 155 | + <v:Avatar Grid.Column="3" |
154 | 156 | Width="16" Height="16" |
155 | 157 | Margin="8,0,0,0" |
156 | 158 | VerticalAlignment="Center" |
157 | 159 | User="{Binding Commit.Author}"/> |
158 | 160 |
|
159 | 161 | <!-- Author Name --> |
160 | | - <Border Grid.Column="5" ClipToBounds="True"> |
| 162 | + <Border Grid.Column="4" ClipToBounds="True"> |
161 | 163 | <TextBlock Margin="6,0,12,0" Text="{Binding Commit.Author.Name}"/> |
162 | 164 | </Border> |
163 | 165 |
|
164 | 166 | <!-- Commit SHA --> |
165 | | - <Border Grid.Column="6" ClipToBounds="True"> |
| 167 | + <Border Grid.Column="5" ClipToBounds="True"> |
166 | 168 | <TextBlock Text="{Binding Commit.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}"/> |
167 | 169 | </Border> |
168 | 170 |
|
169 | 171 | <!-- Commit Time --> |
170 | | - <Border Grid.Column="7"> |
| 172 | + <Border Grid.Column="6"> |
171 | 173 | <TextBlock Margin="16,0,8,0" Text="{Binding Commit.CommitterTimeStr}"/> |
172 | 174 | </Border> |
| 175 | + |
| 176 | + <!-- Drop Indicator --> |
| 177 | + <Rectangle Grid.Column="0" Grid.ColumnSpan="7" |
| 178 | + Height="2" |
| 179 | + VerticalAlignment="Top" |
| 180 | + Fill="{DynamicResource Brush.Accent}" |
| 181 | + IsVisible="{Binding IsDropBeforeVisible, Mode=OneWay}" |
| 182 | + IsHitTestVisible="False"/> |
| 183 | + <Rectangle Grid.Column="0" Grid.ColumnSpan="7" |
| 184 | + Height="2" |
| 185 | + VerticalAlignment="Bottom" |
| 186 | + Fill="{DynamicResource Brush.Accent}" |
| 187 | + IsVisible="{Binding IsDropAfterVisible, Mode=OneWay}" |
| 188 | + IsHitTestVisible="False"/> |
173 | 189 | </Grid> |
174 | 190 | </DataTemplate> |
175 | 191 | </v:InteractiveRebaseListBox.ItemTemplate> |
|
0 commit comments