mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 20:54:59 +00:00
style<Welcome>: optimize layouts when there's no data in tree or list
This commit is contained in:
parent
f190ce7927
commit
b134876f8b
5 changed files with 51 additions and 16 deletions
|
@ -360,6 +360,12 @@ namespace SourceGit.Views.Widgets {
|
|||
|
||||
foreach (var path in dirty) Models.Preference.Instance.RemoveRecent(path);
|
||||
list.ItemsSource = repos;
|
||||
|
||||
if (repos.Count == 0) {
|
||||
lblRecent.Visibility = Visibility.Hidden;
|
||||
} else {
|
||||
lblRecent.Visibility = Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateTree(string editingNodeId = null) {
|
||||
|
@ -411,6 +417,12 @@ namespace SourceGit.Views.Widgets {
|
|||
}
|
||||
|
||||
tree.ItemsSource = nodes;
|
||||
|
||||
if (nodes.Count > 0) {
|
||||
dropTip.Visibility = Visibility.Collapsed;
|
||||
} else {
|
||||
dropTip.Visibility = Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
private void DeleteNode(Node node) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue