mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-29 08:04:59 +00:00
refactor: rewrite the histories filter function to supports both include
and exclude
modes (#690)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
e3ffe3ef6c
commit
ca5bc4b4df
27 changed files with 767 additions and 309 deletions
32
src/Views/FilterModeSwitchButton.axaml
Normal file
32
src/Views/FilterModeSwitchButton.axaml
Normal file
|
@ -0,0 +1,32 @@
|
|||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:m="using:SourceGit.Models"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="SourceGit.Views.FilterModeSwitchButton"
|
||||
x:Name="ThisControl">
|
||||
<Button Classes="icon_button"
|
||||
Width="12" Height="12"
|
||||
Padding="0"
|
||||
Background="Transparent"
|
||||
VerticalContentAlignment="Center"
|
||||
Click="OnChangeFilterModeButtonClicked">
|
||||
<Grid>
|
||||
<Path Width="12" Height="12"
|
||||
Data="{StaticResource Icons.Eye}"
|
||||
Fill="{DynamicResource Brush.FG2}"
|
||||
IsVisible="{Binding #ThisControl.Mode, Converter={x:Static ObjectConverters.Equal}, ConverterParameter={x:Static m:FilterMode.None}}"/>
|
||||
|
||||
<Path Width="12" Height="12"
|
||||
Data="{StaticResource Icons.Filter}"
|
||||
Fill="{DynamicResource Brush.Accent}"
|
||||
IsVisible="{Binding #ThisControl.Mode, Converter={x:Static ObjectConverters.Equal}, ConverterParameter={x:Static m:FilterMode.Included}}"/>
|
||||
|
||||
<Path Width="12" Height="12"
|
||||
Data="{StaticResource Icons.EyeClose}"
|
||||
Fill="{DynamicResource Brush.Accent}"
|
||||
IsVisible="{Binding #ThisControl.Mode, Converter={x:Static ObjectConverters.Equal}, ConverterParameter={x:Static m:FilterMode.Excluded}}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
</UserControl>
|
Loading…
Add table
Add a link
Reference in a new issue