From 8bc23a7d71ff62f2d9eb558eb4f2af26f0abf272 Mon Sep 17 00:00:00 2001 From: leo Date: Fri, 7 Aug 2020 23:40:23 +0800 Subject: [PATCH] fix(*): show special characters, like '-', '_', etc, in local branches; App.RaiseError crashes when called in other threads except UI. --- src/App.xaml.cs | 5 +++-- src/UI/Dashboard.xaml | 6 ++++-- src/UI/Launcher.xaml | 45 +++++++++++++++++++++---------------------- 3 files changed, 29 insertions(+), 27 deletions(-) diff --git a/src/App.xaml.cs b/src/App.xaml.cs index 0636a298..da11692a 100644 --- a/src/App.xaml.cs +++ b/src/App.xaml.cs @@ -33,8 +33,9 @@ namespace SourceGit { /// /// public static void RaiseError(string msg) { - var main = Current.MainWindow as UI.Launcher; - main.Dispatcher.Invoke(() => main.Errors.Add(msg)); + Current.Dispatcher.Invoke(() => { + (Current.MainWindow as UI.Launcher).Errors.Add(msg); + }); } /// diff --git a/src/UI/Dashboard.xaml b/src/UI/Dashboard.xaml index 0afc3c17..bbde65c4 100644 --- a/src/UI/Dashboard.xaml +++ b/src/UI/Dashboard.xaml @@ -32,7 +32,7 @@ - + @@ -210,6 +210,8 @@ Padding="0" Background="{StaticResource Brush.BG3}" FontFamily="Consolas" + ScrollViewer.HorizontalScrollBarVisibility="Disabled" + ScrollViewer.VerticalScrollBarVisibility="Auto" LostFocus="TreeLostFocus" SelectedItemChanged="LocalBranchSelected" PreviewMouseWheel="TreeMouseWheel"> @@ -230,7 +232,7 @@ -