mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
update<csproj>: use official AvaloniaEdit instead of OneWare.AvaloniaEdit
This commit is contained in:
parent
58eb002f4b
commit
ca19d65f0e
4 changed files with 10 additions and 7 deletions
|
@ -21,10 +21,11 @@
|
||||||
<PackageReference Include="Avalonia.Desktop" Version="11.0.9" />
|
<PackageReference Include="Avalonia.Desktop" Version="11.0.9" />
|
||||||
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.9" />
|
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.9" />
|
||||||
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.0.9" />
|
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.0.9" />
|
||||||
|
<PackageReference Include="Avalonia.AvaloniaEdit" Version="11.0.6" />
|
||||||
<PackageReference Include="Avalonia.Diagnostics" Version="11.0.9" Condition="'$(Configuration)' == 'Debug'" />
|
<PackageReference Include="Avalonia.Diagnostics" Version="11.0.9" Condition="'$(Configuration)' == 'Debug'" />
|
||||||
|
<PackageReference Include="AvaloniaEdit.TextMate" Version="11.0.6" />
|
||||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
|
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
|
||||||
<PackageReference Include="OneWare.AvaloniaEdit" Version="11.0.7" />
|
<PackageReference Include="TextMateSharp.Grammars" Version="1.0.56" />
|
||||||
<PackageReference Include="OneWare.AvaloniaEdit.TextMate" Version="11.0.7" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -73,7 +73,7 @@
|
||||||
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="0,2,0,0">
|
<StackPanel Orientation="Horizontal" Margin="0,2,0,0">
|
||||||
<TextBlock Text="{DynamicResource Text.About.Editor}" />
|
<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>
|
||||||
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="0,2,0,0">
|
<StackPanel Orientation="Horizontal" Margin="0,2,0,0">
|
||||||
|
|
|
@ -27,7 +27,7 @@ namespace SourceGit.Views {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnVisitAvaloniaEdit(object sender, PointerPressedEventArgs e) {
|
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;
|
e.Handled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Controls.Primitives;
|
||||||
using Avalonia.Interactivity;
|
using Avalonia.Interactivity;
|
||||||
using Avalonia.Media;
|
using Avalonia.Media;
|
||||||
using Avalonia.Styling;
|
using Avalonia.Styling;
|
||||||
|
@ -517,7 +518,7 @@ namespace SourceGit.Views {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnTextViewScrollOffsetChanged(object sender, EventArgs e) {
|
private void OnTextViewScrollOffsetChanged(object sender, EventArgs e) {
|
||||||
SyncScrollOffset = ScrollViewer.Offset;
|
SyncScrollOffset = TextArea.TextView.ScrollOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnTextViewContextRequested(object sender, ContextRequestedEventArgs e) {
|
private void OnTextViewContextRequested(object sender, ContextRequestedEventArgs e) {
|
||||||
|
@ -566,8 +567,9 @@ namespace SourceGit.Views {
|
||||||
Text = string.Empty;
|
Text = string.Empty;
|
||||||
}
|
}
|
||||||
} else if (change.Property == SyncScrollOffsetProperty) {
|
} else if (change.Property == SyncScrollOffsetProperty) {
|
||||||
if (ScrollViewer.Offset != SyncScrollOffset) {
|
if (TextArea.TextView.ScrollOffset != SyncScrollOffset) {
|
||||||
ScrollViewer.Offset = SyncScrollOffset;
|
IScrollable scrollable = TextArea.TextView;
|
||||||
|
scrollable.Offset = SyncScrollOffset;
|
||||||
}
|
}
|
||||||
} else if (change.Property.Name == "ActualThemeVariant" && change.NewValue != null && _textMate != null) {
|
} else if (change.Property.Name == "ActualThemeVariant" && change.NewValue != null && _textMate != null) {
|
||||||
if (App.Current?.ActualThemeVariant == ThemeVariant.Dark) {
|
if (App.Current?.ActualThemeVariant == ThemeVariant.Dark) {
|
||||||
|
|
Loading…
Reference in a new issue