|
188 | 188 |
|
189 | 189 | <!-- Tags -->
|
190 | 190 | <ToggleButton Grid.Row="4" Classes="group_expander" IsChecked="{Binding IsTagGroupExpanded, Mode=TwoWay}">
|
191 |
| - <Grid ColumnDefinitions="Auto,*,Auto"> |
| 191 | + <Grid ColumnDefinitions="Auto,*,Auto,Auto"> |
192 | 192 | <TextBlock Grid.Column="0" Classes="group_header_label" Margin="0" Text="{DynamicResource Text.Repository.Tags}"/>
|
193 | 193 | <TextBlock Grid.Column="1" Text="{Binding Tags, Converter={x:Static c:ListConverters.ToCount}}" Foreground="{DynamicResource Brush.FG2}" FontWeight="Bold"/>
|
194 |
| - <Button Grid.Column="2" Classes="icon_button" Width="14" Margin="8,0" Command="{Binding CreateNewTag}" ToolTip.Tip="{DynamicResource Text.Repository.Tags.Add}"> |
| 194 | + <ToggleButton Grid.Column="2" |
| 195 | + Classes="tag_display_mode" |
| 196 | + Width="14" |
| 197 | + IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=ShowTagsAsTree, Mode=TwoWay}" |
| 198 | + ToolTip.Tip="{DynamicResource Text.Repository.ShowTagsAsTree}"/> |
| 199 | + <Button Grid.Column="3" |
| 200 | + Classes="icon_button" |
| 201 | + Width="14" |
| 202 | + Margin="8,0" |
| 203 | + Command="{Binding CreateNewTag}" |
| 204 | + ToolTip.Tip="{DynamicResource Text.Repository.Tags.Add}"> |
195 | 205 | <Path Width="12" Height="12" Data="{StaticResource Icons.Tag.Add}"/>
|
196 | 206 | </Button>
|
197 | 207 | </Grid>
|
198 | 208 | </ToggleButton>
|
199 |
| - <DataGrid Grid.Row="5" |
200 |
| - x:Name="TagsList" |
201 |
| - Height="0" |
202 |
| - Margin="8,0,4,0" |
203 |
| - Background="Transparent" |
204 |
| - ItemsSource="{Binding VisibleTags}" |
205 |
| - SelectionMode="Single" |
206 |
| - CanUserReorderColumns="False" |
207 |
| - CanUserResizeColumns="False" |
208 |
| - CanUserSortColumns="False" |
209 |
| - IsReadOnly="True" |
210 |
| - HeadersVisibility="None" |
211 |
| - Focusable="False" |
212 |
| - RowHeight="24" |
213 |
| - HorizontalScrollBarVisibility="Disabled" |
214 |
| - VerticalScrollBarVisibility="Auto" |
215 |
| - IsVisible="{Binding IsTagGroupExpanded, Mode=OneWay}" |
216 |
| - SelectionChanged="OnTagDataGridSelectionChanged" |
217 |
| - ContextRequested="OnTagContextRequested" |
218 |
| - PropertyChanged="OnLeftSidebarDataGridPropertyChanged"> |
219 |
| - <DataGrid.Styles> |
220 |
| - <Style Selector="DataGridRow"> |
221 |
| - <Setter Property="CornerRadius" Value="4" /> |
222 |
| - <Setter Property="Height" Value="24"/> |
223 |
| - </Style> |
224 |
| - |
225 |
| - <Style Selector="DataGridRow /template/ Border#RowBorder"> |
226 |
| - <Setter Property="ClipToBounds" Value="True" /> |
227 |
| - </Style> |
228 |
| - |
229 |
| - <Style Selector="Grid.repository_leftpanel DataGridRow:pointerover /template/ Rectangle#BackgroundRectangle"> |
230 |
| - <Setter Property="Fill" Value="{DynamicResource Brush.AccentHovered}" /> |
231 |
| - <Setter Property="Opacity" Value=".5"/> |
232 |
| - </Style> |
233 |
| - <Style Selector="Grid.repository_leftpanel DataGridRow:selected /template/ Rectangle#BackgroundRectangle"> |
234 |
| - <Setter Property="Fill" Value="{DynamicResource Brush.AccentHovered}" /> |
235 |
| - <Setter Property="Opacity" Value="1"/> |
236 |
| - </Style> |
237 |
| - <Style Selector="Grid.repository_leftpanel:focus-within DataGridRow:selected /template/ Rectangle#BackgroundRectangle"> |
238 |
| - <Setter Property="Fill" Value="{DynamicResource Brush.Accent}" /> |
239 |
| - <Setter Property="Opacity" Value=".65"/> |
240 |
| - </Style> |
241 |
| - <Style Selector="Grid.repository_leftpanel:focus-within DataGridRow:selected:pointerover /template/ Rectangle#BackgroundRectangle"> |
242 |
| - <Setter Property="Fill" Value="{DynamicResource Brush.Accent}" /> |
243 |
| - <Setter Property="Opacity" Value=".8"/> |
244 |
| - </Style> |
245 |
| - </DataGrid.Styles> |
246 |
| - |
247 |
| - <DataGrid.Columns> |
248 |
| - <DataGridTemplateColumn Header="ICON"> |
249 |
| - <DataGridTemplateColumn.CellTemplate> |
250 |
| - <DataTemplate x:DataType="{x:Type m:Tag}"> |
251 |
| - <Path Width="10" Height="10" Margin="8,0" Data="{StaticResource Icons.Tag}"/> |
252 |
| - </DataTemplate> |
253 |
| - </DataGridTemplateColumn.CellTemplate> |
254 |
| - </DataGridTemplateColumn> |
255 |
| - |
256 |
| - <DataGridTemplateColumn Width="*" Header="NAME"> |
257 |
| - <DataGridTemplateColumn.CellTemplate> |
258 |
| - <DataTemplate x:DataType="{x:Type m:Tag}"> |
259 |
| - <TextBlock Text="{Binding Name}" Classes="primary" TextTrimming="CharacterEllipsis" /> |
260 |
| - </DataTemplate> |
261 |
| - </DataGridTemplateColumn.CellTemplate> |
262 |
| - </DataGridTemplateColumn> |
263 |
| - |
264 |
| - <DataGridTemplateColumn Header="FILTER"> |
265 |
| - <DataGridTemplateColumn.CellTemplate> |
266 |
| - <DataTemplate x:DataType="{x:Type m:Tag}"> |
267 |
| - <ToggleButton Classes="filter" |
268 |
| - Margin="0,0,8,0" |
269 |
| - Background="Transparent" |
270 |
| - IsCheckedChanged="OnTagFilterIsCheckedChanged" |
271 |
| - IsChecked="{Binding IsFiltered}" |
272 |
| - ToolTip.Tip="{DynamicResource Text.Filter}"/> |
273 |
| - </DataTemplate> |
274 |
| - </DataGridTemplateColumn.CellTemplate> |
275 |
| - </DataGridTemplateColumn> |
276 |
| - </DataGrid.Columns> |
277 |
| - </DataGrid> |
| 209 | + <v:TagsView Grid.Row="5" |
| 210 | + x:Name="TagsList" |
| 211 | + Height="0" |
| 212 | + Margin="8,0,4,0" |
| 213 | + Background="Transparent" |
| 214 | + ShowTagsAsTree="{Binding Source={x:Static vm:Preference.Instance}, Path=ShowTagsAsTree, Mode=OneWay}" |
| 215 | + Tags="{Binding VisibleTags}" |
| 216 | + Focusable="False" |
| 217 | + IsVisible="{Binding IsTagGroupExpanded, Mode=OneWay}" |
| 218 | + SelectionChanged="OnTagsSelectionChanged" |
| 219 | + RowsChanged="OnTagsRowsChanged"/> |
278 | 220 |
|
279 | 221 | <!-- Submodules -->
|
280 | 222 | <ToggleButton Grid.Row="6" Classes="group_expander" IsChecked="{Binding IsSubmoduleGroupExpanded, Mode=TwoWay}">
|
|
0 commit comments