style<Welcome>: use monospace font for repository tree

This commit is contained in:
leo 2024-02-18 16:32:30 +08:00
parent 05c9d9be5b
commit 5ac7d78796
2 changed files with 4 additions and 1 deletions

View file

@ -138,6 +138,7 @@ namespace SourceGit.ViewModels {
public async void StageChanges(List<Models.Change> changes) { public async void StageChanges(List<Models.Change> changes) {
if (_unstaged.Count == 0 || changes.Count == 0) return; if (_unstaged.Count == 0 || changes.Count == 0) return;
SetDetail(null, true);
IsStaging = true; IsStaging = true;
_repo.SetWatcherEnabled(false); _repo.SetWatcherEnabled(false);
if (changes.Count == _unstaged.Count) { if (changes.Count == _unstaged.Count) {
@ -157,6 +158,7 @@ namespace SourceGit.ViewModels {
public async void UnstageChanges(List<Models.Change> changes) { public async void UnstageChanges(List<Models.Change> changes) {
if (_staged.Count == 0 || changes.Count == 0) return; if (_staged.Count == 0 || changes.Count == 0) return;
SetDetail(null, false);
IsUnstaging = true; IsUnstaging = true;
_repo.SetWatcherEnabled(false); _repo.SetWatcherEnabled(false);
if (changes.Count == _staged.Count) { if (changes.Count == _staged.Count) {

View file

@ -133,12 +133,13 @@
HorizontalAlignment="Left" HorizontalAlignment="Left"
IsVisible="{Binding !IsRepository}"/> IsVisible="{Binding !IsRepository}"/>
<TextBlock Grid.Column="1" VerticalAlignment="Center" Text="{Binding Name}"/> <TextBlock Grid.Column="1" VerticalAlignment="Center" Text="{Binding Name}" FontFamily="{StaticResource JetBrainsMono}"/>
<TextBlock Grid.Column="2" <TextBlock Grid.Column="2"
Margin="8,0" Margin="8,0"
HorizontalAlignment="Right" VerticalAlignment="Center" HorizontalAlignment="Right" VerticalAlignment="Center"
Foreground="{DynamicResource Brush.FG2}" Foreground="{DynamicResource Brush.FG2}"
Text="{Binding Id}" Text="{Binding Id}"
FontFamily="{StaticResource JetBrainsMono}"
IsVisible="{Binding IsRepository}"/> IsVisible="{Binding IsRepository}"/>
</Grid> </Grid>
</TreeDataTemplate> </TreeDataTemplate>