ux: use CommitSubjectPresenter instead of simple TextBlock to display commit's subject in interactive rebase window

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-06-24 15:27:45 +08:00
parent 6ea00a3111
commit d4edb41e9f
No known key found for this signature in database
2 changed files with 16 additions and 1 deletions

View file

@ -88,6 +88,11 @@ namespace SourceGit.ViewModels
private set;
}
public AvaloniaList<Models.IssueTrackerRule> IssueTrackerRules
{
get => _repo.Settings.IssueTrackerRules;
}
public bool IsLoading
{
get => _isLoading;

View file

@ -194,7 +194,17 @@
Click="OnOpenCommitMessageEditor">
<Path Width="14" Height="14" Margin="0,4,0,0" Data="{StaticResource Icons.Edit}"/>
</Button>
<TextBlock Grid.Column="1" Classes="primary" Margin="0,0,4,0" Text="{Binding Subject}"/>
<v:CommitSubjectPresenter Grid.Column="1"
Margin="0,0,4,0"
FontFamily="{DynamicResource Fonts.Primary}"
CodeFontFamily="{DynamicResource Fonts.Monospace}"
InlineCodeBackground="{DynamicResource Brush.InlineCode}"
Foreground="{DynamicResource Brush.FG1}"
LinkForeground="{DynamicResource Brush.Link}"
Subject="{Binding Subject}"
IssueTrackerRules="{Binding $parent[v:InteractiveRebase].((vm:InteractiveRebase)DataContext).IssueTrackerRules}"
FontWeight="Normal"/>
</Grid>
<!-- Author Avatar -->