|
11 | 11 | d:DataContext="{d:DesignInstance Type=local:WatcherViewModel}" |
12 | 12 | d:DesignHeight="500" d:DesignWidth="800" |
13 | 13 | mc:Ignorable="d"> |
14 | | - <Grid VerticalAlignment="Stretch" Margin="30 10 30 0"> |
| 14 | + <Grid Margin="30,10,30,0" VerticalAlignment="Stretch"> |
15 | 15 |
|
16 | 16 | <Grid.Resources> |
17 | 17 | <CollectionViewSource x:Key="Src" Source="{Binding Watcher.WatchedFolders}"> |
|
33 | 33 |
|
34 | 34 | <TextBlock Text="Watched folders" |
35 | 35 | Grid.Row="0" |
36 | | - FontSize="26" VerticalAlignment="Top" |
| 36 | + VerticalAlignment="Top" |
| 37 | + FontSize="26" |
37 | 38 | Foreground="{StaticResource CardForeground}" |
38 | 39 | Visibility="Visible" /> |
39 | 40 |
|
|
52 | 53 |
|
53 | 54 |
|
54 | 55 |
|
55 | | - <TextBlock Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" |
56 | | - FontSize="20" Foreground="{StaticResource CardForegroundDisabled}"> |
| 56 | + <TextBlock Grid.Row="1" |
| 57 | + HorizontalAlignment="Left" VerticalAlignment="Center" |
| 58 | + FontSize="20" |
| 59 | + Foreground="{StaticResource CardForegroundDisabled}"> |
57 | 60 | <Run Text="{Binding Watcher.TotalSaved, Mode=OneWay, Converter={StaticResource BytesToReadableConverter}}" d:Text="51.8GB" /> |
58 | 61 | <Run Text="saved" /> |
59 | 62 | </TextBlock> |
60 | 63 |
|
61 | | - <StackPanel Grid.Row="1" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 3 0" > |
62 | | - <Grid Width="45" Height="25" VerticalAlignment="Center" > |
| 64 | + <StackPanel Grid.Row="1" |
| 65 | + Margin="0,0,3,0" HorizontalAlignment="Right" VerticalAlignment="Center" |
| 66 | + Orientation="Horizontal"> |
| 67 | + <Grid Width="45" Height="25" |
| 68 | + VerticalAlignment="Center"> |
63 | 69 | <ui:Button Background="Transparent" BorderThickness="0" |
64 | | - Command="{Binding RefreshWatchedCommand}" |
65 | | - Visibility="{Binding RefreshWatchedCommand.IsRunning, Converter={StaticResource BooleanToInverseVisibilityConverter}}"> |
| 70 | + Command="{Binding RefreshWatchedCommand}" |
| 71 | + Visibility="{Binding RefreshWatchedCommand.IsRunning, Converter={StaticResource BooleanToInverseVisibilityConverter}}"> |
66 | 72 |
|
67 | 73 | <ui:FontIcon FontFamily="Segoe Fluent Icons, Segoe MDL2 Assets" FontSize="14" |
68 | | - Glyph="" /> |
| 74 | + Glyph="" /> |
69 | 75 | <ui:Button.ToolTip> |
70 | 76 | <ToolTip ToolTipService.InitialShowDelay="100"> |
71 | 77 | <TextBlock Text="Re-analyse all watched folders" |
72 | | - FontSize="12" Foreground="#FFBFC7CE" TextWrapping="NoWrap" /> |
| 78 | + FontSize="12" Foreground="#FFBFC7CE" TextWrapping="NoWrap" /> |
73 | 79 | </ToolTip> |
74 | 80 | </ui:Button.ToolTip> |
75 | 81 | </ui:Button> |
76 | | - <ui:ProgressRing Width="18" Height="18" Margin="-15 0 0 0 " |
77 | | - Foreground="#FFBFC7CE" IsIndeterminate="True" |
78 | | - Visibility="{Binding RefreshWatchedCommand.IsRunning, Converter={StaticResource BoolToVisConverter}}" /> |
| 82 | + <ui:ProgressRing Width="18" Height="18" |
| 83 | + Margin="-15,0,0,0" |
| 84 | + Foreground="#FFBFC7CE" IsIndeterminate="True" |
| 85 | + Visibility="{Binding RefreshWatchedCommand.IsRunning, Converter={StaticResource BoolToVisConverter}}" /> |
79 | 86 | </Grid> |
80 | | - |
81 | 87 |
|
82 | | - <TextBlock VerticalAlignment="Center" Margin="0 -2 0 0" Text="{Binding Watcher.LastAnalysed, StringFormat=Last analysed {0}, Converter={StaticResource RelativeDateConverter}}" |
83 | | - |
84 | | - d:Text="Last analysed: just now" FontSize="14" Foreground="#FFBFC7CE" /> |
| 88 | + |
| 89 | + <TextBlock Text="{Binding Watcher.LastAnalysed, StringFormat=Last analysed {0}, Converter={StaticResource RelativeDateConverter}}" |
| 90 | + Margin="0,-2,0,0" VerticalAlignment="Center" |
| 91 | + d:Text="Last analysed: just now" FontSize="14" Foreground="#FFBFC7CE" /> |
85 | 92 | </StackPanel> |
86 | 93 |
|
87 | 94 |
|
88 | | - <Separator Height="1" Grid.Row="2" VerticalAlignment="Bottom"/> |
| 95 | + <Separator Grid.Row="2" |
| 96 | + Height="1" |
| 97 | + VerticalAlignment="Bottom" /> |
89 | 98 |
|
90 | 99 |
|
91 | | - <ListView x:Name="UiWatcherListView" Grid.Row="3" Margin="-10 0 -20 0" Padding="0 0 10 0" |
92 | | - HorizontalAlignment="Stretch" |
| 100 | + <ListView x:Name="UiWatcherListView" |
| 101 | + Grid.Row="3" |
| 102 | + Margin="-10,0,-20,0" Padding="0,0,10,0" HorizontalAlignment="Stretch" |
93 | 103 | d:ItemsSource="{Binding Source={StaticResource Dtd}}" |
94 | | - Background="Transparent" BorderThickness="0" |
95 | | - ItemsSource="{Binding Source={StaticResource Src}}" |
96 | | - ScrollViewer.VerticalScrollBarVisibility="Visible"> |
| 104 | + Background="Transparent" BorderThickness="0" |
| 105 | + ItemsSource="{Binding Source={StaticResource Src}}" |
| 106 | + ScrollViewer.VerticalScrollBarVisibility="Visible"> |
97 | 107 |
|
98 | 108 | <ListView.ItemContainerStyle> |
99 | 109 | <Style TargetType="ListViewItem"> |
100 | 110 | <Setter Property="Margin" Value="0,0,0,0" /> |
101 | 111 | <Setter Property="Background" Value="Transparent" /> |
102 | 112 | <Setter Property="BorderBrush" Value="Transparent" /> |
103 | 113 | <Setter Property="VerticalContentAlignment" Value="Center" /> |
104 | | - <Setter Property="FocusVisualStyle" Value="{x:Null}"/> |
| 114 | + <Setter Property="FocusVisualStyle" Value="{x:Null}" /> |
105 | 115 | <Setter Property="Template"> |
106 | 116 | <Setter.Value> |
107 | 117 | <ControlTemplate TargetType="{x:Type ListViewItem}"> |
108 | | - <Border Name="Border" CornerRadius="5" |
| 118 | + <Border Name="Border" |
109 | 119 | Background="{TemplateBinding Background}" |
110 | 120 | BorderBrush="{TemplateBinding BorderBrush}" |
111 | | - BorderThickness="{TemplateBinding BorderThickness}"> |
| 121 | + BorderThickness="{TemplateBinding BorderThickness}" |
| 122 | + CornerRadius="5"> |
112 | 123 | <ContentPresenter Content="{TemplateBinding Content}" |
113 | 124 | Margin="{TemplateBinding Padding}" |
114 | 125 | d:Content="{TemplateBinding Content}" |
|
136 | 147 | MouseDown="ToggleBorderHeight" MouseEnter="ToggleBorderHeight"> |
137 | 148 |
|
138 | 149 |
|
139 | | - <Grid> |
140 | | - |
141 | | - |
142 | | - |
143 | | - <Label > |
| 150 | + <Grid> |
| 151 | + |
| 152 | + |
| 153 | + |
| 154 | + <Label> |
144 | 155 | <StackPanel Orientation="Horizontal"> |
145 | 156 |
|
146 | 157 | <ui:ProgressRing Width="15" Height="15" |
|
159 | 170 | Margin="0,0,5,0" |
160 | 171 | FontFamily="Segoe Fluent Icons, Segoe MDL2 Assets" Foreground="White" |
161 | 172 | Visibility="{Binding IsSteamGame, Converter={StaticResource BooleanToInverseVisibilityConverter}}" /> |
162 | | - <TextBlock Text="{Binding DisplayName, Converter={StaticResource StrippedFolderPathConverter}}" |
163 | | - MaxWidth="280" |
164 | | - Margin="0,-2,0,0" VerticalAlignment="Top" |
165 | | - FontSize="15" FontWeight="SemiBold" Foreground="White" TextTrimming="CharacterEllipsis" /> |
| 173 | + <Grid> |
| 174 | + <TextBlock Text="{Binding DisplayName, Converter={StaticResource StrippedFolderPathConverter}}" |
| 175 | + MaxWidth="280" MinWidth="100" |
| 176 | + Margin="0,-2,0,0" VerticalAlignment="Top" |
| 177 | + FontSize="15" FontWeight="SemiBold" Foreground="White" |
| 178 | + MouseLeftButtonDown="DisplayNameTextBlock_MouseLeftButtonDown" |
| 179 | + TextTrimming="CharacterEllipsis" |
| 180 | + Visibility="{Binding IsEditing, Converter={StaticResource BooleanToInverseVisibilityConverter}}" /> |
| 181 | + |
| 182 | + <TextBox Text="{Binding DisplayName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" |
| 183 | + MaxWidth="280" MinWidth="100" |
| 184 | + Margin="-3,-3,0,0" VerticalAlignment="Top" Padding="0" |
| 185 | + FontSize="15" FontWeight="SemiBold" Foreground="{StaticResource TextControlForeground}" |
| 186 | + KeyDown="DisplayNameTextBox_KeyDown" LostFocus="DisplayNameTextBox_LostFocus" |
| 187 | + Visibility="{Binding IsEditing, Converter={StaticResource BoolToVisConverter}}" /> |
| 188 | + </Grid> |
166 | 189 |
|
167 | 190 | </StackPanel> |
168 | 191 |
|
|
268 | 291 |
|
269 | 292 | </ListView> |
270 | 293 |
|
271 | | - |
| 294 | + |
272 | 295 |
|
273 | 296 | </Grid> |
274 | 297 | </UserControl> |
0 commit comments