File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 55using Avalonia . Input ;
66using Avalonia . Interactivity ;
77using Avalonia . Media ;
8+ using Avalonia . Styling ;
89
910namespace SourceGit . Views
1011{
@@ -69,7 +70,7 @@ public override void Render(DrawingContext context)
6970
7071 var selectedIdx = LauncherTabsList . SelectedIndex ;
7172 var count = LauncherTabsList . ItemCount ;
72- var separatorPen = new Pen ( this . FindResource ( "Brush.FG2" ) as IBrush ) ;
73+ var separatorPen = new Pen ( new SolidColorBrush ( ActualThemeVariant == ThemeVariant . Dark ? Colors . White : Colors . Black , 0.2 ) ) ;
7374 var separatorY = ( height - 18 ) * 0.5 + 1 ;
7475
7576 if ( ! IsScrollerVisible && selectedIdx > 0 )
@@ -152,6 +153,14 @@ public override void Render(DrawingContext context)
152153 context . DrawGeometry ( fill , stroke , geo ) ;
153154 }
154155
156+ protected override void OnPropertyChanged ( AvaloniaPropertyChangedEventArgs change )
157+ {
158+ base . OnPropertyChanged ( change ) ;
159+
160+ if ( change . Property . Name == nameof ( ActualThemeVariant ) )
161+ InvalidateVisual ( ) ;
162+ }
163+
155164 private void ScrollTabs ( object _ , PointerWheelEventArgs e )
156165 {
157166 if ( ! e . KeyModifiers . HasFlag ( KeyModifiers . Shift ) )
You can’t perform that action at this time.
0 commit comments