Skip to content

Commit d794a61

Browse files
committed
enhance: remember the width of author name column in histories view (#425)
1 parent c22ba75 commit d794a61

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/ViewModels/LayoutInfo.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ public GridLength RepositorySidebarWidth
3030
set => SetProperty(ref _repositorySidebarWidth, value);
3131
}
3232

33+
public GridLength HistoriesAuthorColumnWidth
34+
{
35+
get => _historiesAuthorColumnWidth;
36+
set => SetProperty(ref _historiesAuthorColumnWidth, value);
37+
}
38+
3339
public GridLength WorkingCopyLeftWidth
3440
{
3541
get => _workingCopyLeftWidth;
@@ -55,6 +61,7 @@ public GridLength CommitDetailFilesLeftWidth
5561
}
5662

5763
private GridLength _repositorySidebarWidth = new GridLength(250, GridUnitType.Pixel);
64+
private GridLength _historiesAuthorColumnWidth = new GridLength(120, GridUnitType.Pixel);
5865
private GridLength _workingCopyLeftWidth = new GridLength(300, GridUnitType.Pixel);
5966
private GridLength _stashesLeftWidth = new GridLength(300, GridUnitType.Pixel);
6067
private GridLength _commitDetailChangesLeftWidth = new GridLength(256, GridUnitType.Pixel);

src/Views/Repository.axaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,7 @@
609609
<ContentControl.DataTemplates>
610610
<DataTemplate DataType="vm:Histories">
611611
<v:Histories CurrentBranch="{Binding Repo.CurrentBranch}"
612+
AuthorNameColumnWidth="{Binding Source={x:Static vm:Preference.Instance}, Path=Layout.HistoriesAuthorColumnWidth, Mode=TwoWay}"
612613
IssueTrackerRules="{Binding Repo.Settings.IssueTrackerRules}"
613614
NavigationId="{Binding NavigationId}"/>
614615
</DataTemplate>

0 commit comments

Comments
 (0)