From 85278d348089402ccc2940ff03ba68b317b992f7 Mon Sep 17 00:00:00 2001 From: Tibor Prokai Date: Wed, 28 Oct 2026 12:18:16 +0100 Subject: [PATCH 1/2] feat: add optional resizable tree column in history --- src/Models/RepositoryUIStates.cs | 6 +++ src/Resources/Locales/en_US.axaml | 2 + src/ViewModels/Histories.cs | 14 +++++++ src/Views/Histories.axaml | 38 +++++++++++++++++-- src/Views/Histories.axaml.cs | 61 ++++++++++++++++++++++++------- 5 files changed, 105 insertions(+), 16 deletions(-) diff --git a/src/Models/RepositoryUIStates.cs b/src/Models/RepositoryUIStates.cs index 8657b93b65..6f43719c39 100644 --- a/src/Models/RepositoryUIStates.cs +++ b/src/Models/RepositoryUIStates.cs @@ -15,6 +15,12 @@ public HistoryShowFlags HistoryShowFlags set; } = HistoryShowFlags.None; + public bool IsTreeColumnVisibleInHistory + { + get; + set; + } = false; + public bool IsAuthorColumnVisibleInHistory { get; diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml index 1b1f29d8fb..e20939fcc4 100644 --- a/src/Resources/Locales/en_US.axaml +++ b/src/Resources/Locales/en_US.axaml @@ -526,6 +526,8 @@ AUTHOR TIME COMMIT TIME GRAPH & SUBJECT + SUBJECT + TREE SHA HIGHLIGHTS IN GRAPH All diff --git a/src/ViewModels/Histories.cs b/src/ViewModels/Histories.cs index 128b53ff9d..d44e2ff5a3 100644 --- a/src/ViewModels/Histories.cs +++ b/src/ViewModels/Histories.cs @@ -50,6 +50,19 @@ public bool EnableTopoOrder } } + public bool IsTreeColumnVisible + { + get => _repo.UIStates.IsTreeColumnVisibleInHistory; + set + { + if (_repo.UIStates.IsTreeColumnVisibleInHistory != value) + { + _repo.UIStates.IsTreeColumnVisibleInHistory = value; + OnPropertyChanged(); + } + } + } + public bool IsAuthorColumnVisible { get => _repo.UIStates.IsAuthorColumnVisibleInHistory; @@ -575,6 +588,7 @@ private void GenerateGraph(List commits) } Graph = Models.CommitGraph.Generate(commits, firstParentOnly, highlighting, extraHeads); + } private Repository _repo = null; diff --git a/src/Views/Histories.axaml b/src/Views/Histories.axaml index a3d24529fd..ddb412e676 100644 --- a/src/Views/Histories.axaml +++ b/src/Views/Histories.axaml @@ -86,6 +86,13 @@ + + +