Skip to content

Commit d366c04

Browse files
committed
cleanup of ui for treeview
1 parent ac60cb5 commit d366c04

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

Gui/App.axaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
<Setter Property="ShowTitle" Value="False"/>
7777
<Setter Property="AllowFilter" Value="False"/>
7878
<Setter Property="AllowQuickFilter" Value="False"/>
79-
<Setter Property="Margin" Value="2"/>
79+
<Setter Property="Margin" Value="4"/>
8080
</Style>
8181

8282
<StyleInclude Source="avares://Avalonia.Controls.TreeDataGrid/Themes/Fluent.axaml"/>

Gui/Views/FolderTreeView.axaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,24 +87,28 @@
8787
<Border Grid.Row="5" BorderThickness="1" Margin="2">
8888
<TreeDataGrid Source="{Binding TreeDataGridSource}">
8989
<TreeDataGrid.Styles>
90-
<Style Selector="TreeDataGrid TreeDataGridRow:nth-child(2n)">
91-
<Setter Property="Background" Value="#20808080"/>
90+
<Style Selector="TreeDataGrid TreeDataGridRow">
91+
<Setter Property="Height" Value="32"/>
92+
</Style>
93+
<Style Selector="TreeDataGrid TreeDataGridRow:nth-child(even)">
94+
<Setter Property="Background" Value="#18808080"/>
95+
<!-- ARGB in hex -->
9296
</Style>
9397
</TreeDataGrid.Styles>
9498
<TreeDataGrid.Resources>
9599

96100
<!-- Template for Name column cells -->
97101
<!-- Copied from App.axaml Window.DataTemplates as you cannot give a key there -->
98102
<DataTemplate x:Key="Object" DataType="mo:FileSystemItemBase">
99-
<StackPanel Orientation="Horizontal">
103+
<StackPanel Orientation="Horizontal" >
100104
<materialIcons:MaterialIcon Kind="{Binding DisplayName, Converter={StaticResource EnumToMaterialIconConverter}}" Width="24" Height="24" Margin="2"/>
101105
<TextBlock VerticalAlignment="Center" Text="{Binding NameComputed}"/>
102106
</StackPanel>
103107
</DataTemplate>
104108

105109
<!-- Edit template for Name column cells -->
106110
<DataTemplate x:Key="Edit" DataType="mo:FileSystemItemBase">
107-
<StackPanel Orientation="Horizontal">
111+
<StackPanel Orientation="Horizontal" >
108112
<materialIcons:MaterialIcon Kind="{Binding DisplayName, Converter={StaticResource EnumToMaterialIconConverter}}" Width="24" Height="24" Margin="2" />
109113
<TextBlock VerticalAlignment="Center" Text="{Binding NameComputed}"/>
110114
</StackPanel>

0 commit comments

Comments
 (0)