update<csproj>: use official AvaloniaEdit instead of OneWare.AvaloniaEdit

This commit is contained in:
leo 2024-02-20 15:44:26 +08:00
parent 58eb002f4b
commit ca19d65f0e
4 changed files with 10 additions and 7 deletions

View file

@ -73,7 +73,7 @@
<StackPanel Orientation="Horizontal" Margin="0,2,0,0">
<TextBlock Text="{DynamicResource Text.About.Editor}" />
<TextBlock Text="OneWare.AvaloniaEdit" Cursor="Hand" Foreground="{DynamicResource Brush.Accent1}" TextDecorations="Underline" PointerPressed="OnVisitAvaloniaEdit"/>
<TextBlock Text="AvaloniaEdit" Cursor="Hand" Foreground="{DynamicResource Brush.Accent1}" TextDecorations="Underline" PointerPressed="OnVisitAvaloniaEdit"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,2,0,0">

View file

@ -27,7 +27,7 @@ namespace SourceGit.Views {
}
private void OnVisitAvaloniaEdit(object sender, PointerPressedEventArgs e) {
Native.OS.OpenBrowser("https://www.nuget.org/packages/OneWare.AvaloniaEdit");
Native.OS.OpenBrowser("https://github.com/AvaloniaUI/AvaloniaEdit");
e.Handled = true;
}

View file

@ -1,5 +1,6 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Primitives;
using Avalonia.Interactivity;
using Avalonia.Media;
using Avalonia.Styling;
@ -517,7 +518,7 @@ namespace SourceGit.Views {
}
private void OnTextViewScrollOffsetChanged(object sender, EventArgs e) {
SyncScrollOffset = ScrollViewer.Offset;
SyncScrollOffset = TextArea.TextView.ScrollOffset;
}
private void OnTextViewContextRequested(object sender, ContextRequestedEventArgs e) {
@ -566,8 +567,9 @@ namespace SourceGit.Views {
Text = string.Empty;
}
} else if (change.Property == SyncScrollOffsetProperty) {
if (ScrollViewer.Offset != SyncScrollOffset) {
ScrollViewer.Offset = SyncScrollOffset;
if (TextArea.TextView.ScrollOffset != SyncScrollOffset) {
IScrollable scrollable = TextArea.TextView;
scrollable.Offset = SyncScrollOffset;
}
} else if (change.Property.Name == "ActualThemeVariant" && change.NewValue != null && _textMate != null) {
if (App.Current?.ActualThemeVariant == ThemeVariant.Dark) {