diff --git a/src/Resources/Styles.axaml b/src/Resources/Styles.axaml index 866fc987..afac434c 100644 --- a/src/Resources/Styles.axaml +++ b/src/Resources/Styles.axaml @@ -230,16 +230,16 @@ - - - diff --git a/src/Views/Launcher.axaml b/src/Views/Launcher.axaml index f5166de2..957777ae 100644 --- a/src/Views/Launcher.axaml +++ b/src/Views/Launcher.axaml @@ -86,9 +86,9 @@ - + + PointerWheelChanged="ScrollTabs" + ScrollChanged="OnTabsScrollChanged"> - + diff --git a/src/Views/Launcher.axaml.cs b/src/Views/Launcher.axaml.cs index 308cf0b6..17a5e78a 100644 --- a/src/Views/Launcher.axaml.cs +++ b/src/Views/Launcher.axaml.cs @@ -232,7 +232,7 @@ namespace SourceGit.Views { if (e.Delta.Y < 0) launcherTabsScroller.LineRight(); - else + else if (e.Delta.Y > 0) launcherTabsScroller.LineLeft(); e.Handled = true; } @@ -265,6 +265,15 @@ namespace SourceGit.Views e.Handled = true; } + private void OnTabsScrollChanged(object sender, ScrollChangedEventArgs e) + { + if (sender is ScrollViewer scrollViewer) + { + leftScrollIndicator.IsEnabled = scrollViewer.Offset.X > 0; + rightScrollIndicator.IsEnabled = scrollViewer.Offset.X < scrollViewer.Extent.Width - scrollViewer.Viewport.Width; + } + } + private void SetupDragAndDrop(object sender, RoutedEventArgs e) { if (sender is Border border)