From 58cca5d018156a945faa1125b8b1e85c914d347f Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 24 May 2021 13:53:04 +0800 Subject: [PATCH] style: show guide directly instead of hiding it in button's tooltip --- src/Resources/Locales/en_US.xaml | 2 +- src/Resources/Locales/zh_CN.xaml | 2 +- src/Views/Widgets/Histories.xaml | 38 ++++++++++++----------------- src/Views/Widgets/Histories.xaml.cs | 12 ++------- 4 files changed, 20 insertions(+), 34 deletions(-) diff --git a/src/Resources/Locales/en_US.xaml b/src/Resources/Locales/en_US.xaml index 90d4c4ac..99550ddc 100644 --- a/src/Resources/Locales/en_US.xaml +++ b/src/Resources/Locales/en_US.xaml @@ -261,7 +261,7 @@ 1. Select single commit to view detail 2. Select two commits to show differences 3. Select more than 2 commits to count - 4. Try to open context menu with selected commit + 4. Open context menu to see more options Initialize Repository Path : diff --git a/src/Resources/Locales/zh_CN.xaml b/src/Resources/Locales/zh_CN.xaml index 64126169..3b203569 100644 --- a/src/Resources/Locales/zh_CN.xaml +++ b/src/Resources/Locales/zh_CN.xaml @@ -256,7 +256,7 @@ 清空 切换曲线/折线显示 切换横向/纵向显示 - 已选中{0}项提交 + 已选中 {0} 项提交 操作说明 1. 单选时,显示选中提交的详细信息 2. 双选时,按选中顺序对比两个提交 diff --git a/src/Views/Widgets/Histories.xaml b/src/Views/Widgets/Histories.xaml index 2660f9e7..632462f5 100644 --- a/src/Views/Widgets/Histories.xaml +++ b/src/Views/Widgets/Histories.xaml @@ -174,12 +174,26 @@ - + + + + + + + + + - + - - - - - - - - - diff --git a/src/Views/Widgets/Histories.xaml.cs b/src/Views/Widgets/Histories.xaml.cs index a34ff0ed..aeaa7942 100644 --- a/src/Views/Widgets/Histories.xaml.cs +++ b/src/Views/Widgets/Histories.xaml.cs @@ -238,11 +238,10 @@ namespace SourceGit.Views.Widgets { revisionCompare.Visibility = Visibility.Visible; } else if (selected.Count > 2) { mask.Visibility = Visibility.Visible; - txtCounter.Visibility = Visibility.Visible; txtCounter.Text = App.Text("Histories.Selected", selected.Count); } else { - mask.Visibility = Visibility.Visible; - txtCounter.Visibility = Visibility.Hidden; + mask.Visibility = Visibility.Visible; + txtCounter.Text = App.Text("Histories.Guide"); } } @@ -594,12 +593,5 @@ namespace SourceGit.Views.Widgets { menu.Items.Add(submenu); } #endregion - - #region GUIDE - private void OpenGuide(object sender, RoutedEventArgs e) { - popupGuide.IsOpen = !popupGuide.IsOpen; - e.Handled = true; - } - #endregion } }