From 88aec0b1a36c8ff361d63d6ce1b7bb760010b3e3 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Thu, 17 Aug 2017 16:51:10 +0100 Subject: [PATCH 01/25] remove call to fully redraw the editor everytime the scroll offset is chagned. This was causing poor scroll performance and is not necessary. --- src/AvaloniaEdit/Editing/TextArea.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/AvaloniaEdit/Editing/TextArea.cs b/src/AvaloniaEdit/Editing/TextArea.cs index bb47e489..42e1a939 100644 --- a/src/AvaloniaEdit/Editing/TextArea.cs +++ b/src/AvaloniaEdit/Editing/TextArea.cs @@ -1027,8 +1027,6 @@ protected override Size ArrangeOverride(Size finalSize) TextView.SetScrollData(new Size(_viewPort.Width, _viewPort.Height * TextView.DefaultLineHeight), _extent); (this as ILogicalScrollable).InvalidateScroll?.Invoke(); - - TextView.Redraw(); } return base.ArrangeOverride(finalSize); From 83e7f1782e2681e0237c76bdaacae94a55448989 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Wed, 6 Sep 2017 21:14:19 +0100 Subject: [PATCH 02/25] update to netstandard2.0 in order to support upcoming avalonia release. --- src/AvaloniaEdit/AvaloniaEdit.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AvaloniaEdit/AvaloniaEdit.csproj b/src/AvaloniaEdit/AvaloniaEdit.csproj index 4e8edd77..65604b57 100644 --- a/src/AvaloniaEdit/AvaloniaEdit.csproj +++ b/src/AvaloniaEdit/AvaloniaEdit.csproj @@ -1,7 +1,7 @@  - netstandard1.3 + netstandard2.0 @@ -11,7 +11,7 @@ - + \ No newline at end of file From f85389e97fc350b9a67082d56b6925752a151d6b Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Wed, 6 Sep 2017 21:33:37 +0100 Subject: [PATCH 03/25] remove our own icloneable as no longer needed. --- src/AvaloniaEdit/AvaloniaEdit.csproj | 2 +- src/AvaloniaEdit/Utils/IFreezable.cs | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/AvaloniaEdit/AvaloniaEdit.csproj b/src/AvaloniaEdit/AvaloniaEdit.csproj index 65604b57..89e121d0 100644 --- a/src/AvaloniaEdit/AvaloniaEdit.csproj +++ b/src/AvaloniaEdit/AvaloniaEdit.csproj @@ -9,9 +9,9 @@ + - \ No newline at end of file diff --git a/src/AvaloniaEdit/Utils/IFreezable.cs b/src/AvaloniaEdit/Utils/IFreezable.cs index b8a0c585..ac0d97f1 100644 --- a/src/AvaloniaEdit/Utils/IFreezable.cs +++ b/src/AvaloniaEdit/Utils/IFreezable.cs @@ -34,12 +34,7 @@ internal interface IFreezable /// Freezes this instance. /// void Freeze(); - } - - internal interface ICloneable - { - object Clone(); - } + } internal static class FreezableHelper { From b633e9952bcd13bd354fd83ac32f09a4d511af93 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Thu, 21 Sep 2017 10:26:52 +0100 Subject: [PATCH 04/25] support latest avalonia. --- src/AvaloniaEdit/AvaloniaEdit.csproj | 11 +++++++++-- src/AvaloniaEdit/Utils/ExtensionMethods.cs | 13 ++++++++----- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/AvaloniaEdit/AvaloniaEdit.csproj b/src/AvaloniaEdit/AvaloniaEdit.csproj index 89e121d0..461a975c 100644 --- a/src/AvaloniaEdit/AvaloniaEdit.csproj +++ b/src/AvaloniaEdit/AvaloniaEdit.csproj @@ -9,9 +9,16 @@ - - + + + + + + SystemDrawing + + + \ No newline at end of file diff --git a/src/AvaloniaEdit/Utils/ExtensionMethods.cs b/src/AvaloniaEdit/Utils/ExtensionMethods.cs index 81458fa3..fb6f7c90 100644 --- a/src/AvaloniaEdit/Utils/ExtensionMethods.cs +++ b/src/AvaloniaEdit/Utils/ExtensionMethods.cs @@ -15,6 +15,7 @@ // FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. +extern alias SystemDrawing; using System; using System.Collections.Generic; @@ -24,6 +25,8 @@ using Avalonia; using Avalonia.Input; using Avalonia.VisualTree; +using SystemDrawingColor = global::System.Drawing; + namespace AvaloniaEdit.Utils { @@ -177,22 +180,22 @@ public static IEnumerable Sequence(T value) #endregion #region System.Drawing <-> Avalonia conversions - public static System.Drawing.Point ToSystemDrawing(this Point p) + public static SystemDrawing::System.Drawing.Point ToSystemDrawing(this Point p) { - return new System.Drawing.Point((int)p.X, (int)p.Y); + return new SystemDrawing::System.Drawing.Point((int)p.X, (int)p.Y); } - public static Point ToAvalonia(this System.Drawing.Point p) + public static Point ToAvalonia(this SystemDrawing::System.Drawing.Point p) { return new Point(p.X, p.Y); } - public static Size ToAvalonia(this System.Drawing.Size s) + public static Size ToAvalonia(this SystemDrawing::System.Drawing.Size s) { return new Size(s.Width, s.Height); } - public static Rect ToAvalonia(this System.Drawing.Rectangle rect) + public static Rect ToAvalonia(this SystemDrawing::System.Drawing.Rectangle rect) { return new Rect(rect.Location.ToAvalonia(), rect.Size.ToAvalonia()); } From f94f81c54a3b1f2fc9d3f29530f14159bc8e7f7c Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Thu, 5 Oct 2017 14:14:23 +0100 Subject: [PATCH 05/25] update avalonia with fixes. --- src/AvaloniaEdit/AvaloniaEdit.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AvaloniaEdit/AvaloniaEdit.csproj b/src/AvaloniaEdit/AvaloniaEdit.csproj index 461a975c..7e728c00 100644 --- a/src/AvaloniaEdit/AvaloniaEdit.csproj +++ b/src/AvaloniaEdit/AvaloniaEdit.csproj @@ -9,7 +9,7 @@ - + From d185abfa066404e1f6976fa9d26c42fc39e6cf94 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Mon, 23 Oct 2017 11:03:58 +0100 Subject: [PATCH 06/25] compatibility with latest avalonia. --- src/AvaloniaEdit/AvaloniaEdit.csproj | 2 +- src/AvaloniaEdit/CodeCompletion/InsightWindow.xaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AvaloniaEdit/AvaloniaEdit.csproj b/src/AvaloniaEdit/AvaloniaEdit.csproj index 7e728c00..8d5c234b 100644 --- a/src/AvaloniaEdit/AvaloniaEdit.csproj +++ b/src/AvaloniaEdit/AvaloniaEdit.csproj @@ -9,7 +9,7 @@ - + diff --git a/src/AvaloniaEdit/CodeCompletion/InsightWindow.xaml b/src/AvaloniaEdit/CodeCompletion/InsightWindow.xaml index 79228529..2ece259e 100644 --- a/src/AvaloniaEdit/CodeCompletion/InsightWindow.xaml +++ b/src/AvaloniaEdit/CodeCompletion/InsightWindow.xaml @@ -24,7 +24,7 @@ Grid.Column="0" Margin="0,0,4,0" Orientation="Horizontal" - IsVisible="{TemplateBinding Path=Provider.Count, Converter={Static cc:CollapseIfSingleOverloadConverter.Instance}}"> + IsVisible="{TemplateBinding Path=Provider.Count, Converter={x:Static cc:CollapseIfSingleOverloadConverter.Instance}}">