From 2f7c6371a546998b1aabbdad08062178027c6c8c Mon Sep 17 00:00:00 2001 From: ahopper Date: Sat, 2 Feb 2019 18:34:11 +0000 Subject: [PATCH 01/13] use XDocument to deserialize assets --- .../Utilities/AvaloniaResourcesIndex.cs | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/Avalonia.Base/Utilities/AvaloniaResourcesIndex.cs b/src/Avalonia.Base/Utilities/AvaloniaResourcesIndex.cs index 22e5c952bf..66024236da 100644 --- a/src/Avalonia.Base/Utilities/AvaloniaResourcesIndex.cs +++ b/src/Avalonia.Base/Utilities/AvaloniaResourcesIndex.cs @@ -4,6 +4,8 @@ using System.IO; using System.Runtime.CompilerServices; using System.Runtime.Serialization; using System.Runtime.Serialization.Json; +using System.Xml.Linq; +using System.Linq; // ReSharper disable AssignNullToNotNullAttribute @@ -19,10 +21,20 @@ namespace Avalonia.Utilities { var ver = new BinaryReader(stream).ReadInt32(); if (ver > LastKnownVersion) - throw new Exception("Resources index format version is not known"); - var index = (AvaloniaResourcesIndex) - new DataContractSerializer(typeof(AvaloniaResourcesIndex)).ReadObject(stream); - return index.Entries; + throw new Exception("Resources index format version is not known"); + + var assetDoc = XDocument.Load(stream); + XNamespace assetNs = assetDoc.Root.Attribute("xmlns").Value; + List entries= + (from entry in assetDoc.Root.Element(assetNs + "Entries").Elements(assetNs + "AvaloniaResourcesIndexEntry") + select new AvaloniaResourcesIndexEntry + { + Path = entry.Element(assetNs + "Path").Value, + Offset = int.Parse(entry.Element(assetNs + "Offset").Value), + Size = int.Parse(entry.Element(assetNs + "Size").Value) + }).ToList(); + + return entries; } public static void Write(Stream stream, List entries) From ce3461ac46affe7bff909cceca58c4d6365ed28f Mon Sep 17 00:00:00 2001 From: ahopper Date: Sun, 3 Feb 2019 07:29:49 +0000 Subject: [PATCH 02/13] use xdocument in XamlLoader --- .../Avalonia.Markup.Xaml/AvaloniaXamlLoader.cs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoader.cs b/src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoader.cs index a825deeae3..255357e027 100644 --- a/src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoader.cs +++ b/src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoader.cs @@ -13,6 +13,8 @@ using System.Reflection; using System.Runtime.Serialization; using System.Runtime.Serialization.Json; using System.Text; +using System.Xml.Linq; +using System.Linq; namespace Avalonia.Markup.Xaml { @@ -240,15 +242,21 @@ namespace Avalonia.Markup.Xaml { using (var xamlInfoStream = assetLocator.Open(xamlInfoUri)) { - var xamlInfo = (AvaloniaResourceXamlInfo)s_xamlInfoSerializer.ReadObject(xamlInfoStream); - if (xamlInfo.ClassToResourcePathIndex.TryGetValue(typeName, out var rv) == true) + var assetDoc = XDocument.Load(xamlInfoStream); + XNamespace assetNs = assetDoc.Root.Attribute("xmlns").Value; + XNamespace arrayNs = "http://schemas.microsoft.com/2003/10/Serialization/Arrays"; + Dictionary xamlInfo = + assetDoc.Root.Element(assetNs + "ClassToResourcePathIndex").Elements(arrayNs + "KeyValueOfstringstring") + .ToDictionary(entry =>entry.Element(arrayNs + "Key").Value, + entry => entry.Element(arrayNs + "Value").Value); + + if (xamlInfo.TryGetValue(typeName, out var rv) == true) { yield return new Uri($"avares://{asm}{rv}"); yield break; } } - } - + } yield return new Uri("resm:" + typeName + ".xaml?assembly=" + asm); yield return new Uri("resm:" + typeName + ".paml?assembly=" + asm); From a24c29175624c06ed58664056a5d411132ddec52 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Thu, 7 Feb 2019 15:03:10 +0000 Subject: [PATCH 03/13] potential fix for nre in deferred renderer. --- .../Rendering/DeferredRenderer.cs | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/Avalonia.Visuals/Rendering/DeferredRenderer.cs b/src/Avalonia.Visuals/Rendering/DeferredRenderer.cs index 60e624948e..f9c21bd212 100644 --- a/src/Avalonia.Visuals/Rendering/DeferredRenderer.cs +++ b/src/Avalonia.Visuals/Rendering/DeferredRenderer.cs @@ -255,15 +255,19 @@ namespace Avalonia.Rendering } var (scene, updated) = UpdateRenderLayersAndConsumeSceneIfNeeded(GetContext); - using (scene) + + if (scene != null) { - var overlay = DrawDirtyRects || DrawFps; - if (DrawDirtyRects) - _dirtyRectsDisplay.Tick(); - if (overlay) - RenderOverlay(scene.Item, GetContext()); - if (updated || forceComposite || overlay) - RenderComposite(scene.Item, GetContext()); + using (scene) + { + var overlay = DrawDirtyRects || DrawFps; + if (DrawDirtyRects) + _dirtyRectsDisplay.Tick(); + if (overlay) + RenderOverlay(scene.Item, GetContext()); + if (updated || forceComposite || overlay) + RenderComposite(scene.Item, GetContext()); + } } } finally From a8b8454a6c680ca9bedcf93caba6de15540da0ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9=20=D0=97=D0=B0?= =?UTF-8?q?=D0=B2=D0=BE=D0=B4=D1=81=D0=BA=D0=BE=D0=B9?= Date: Sat, 9 Feb 2019 03:54:28 +0300 Subject: [PATCH 04/13] add StrokeDashOffset support for shapes --- src/Avalonia.Controls/Shapes/Shape.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Avalonia.Controls/Shapes/Shape.cs b/src/Avalonia.Controls/Shapes/Shape.cs index f77c43acd0..0387328a46 100644 --- a/src/Avalonia.Controls/Shapes/Shape.cs +++ b/src/Avalonia.Controls/Shapes/Shape.cs @@ -20,7 +20,10 @@ namespace Avalonia.Controls.Shapes AvaloniaProperty.Register(nameof(Stroke)); public static readonly StyledProperty> StrokeDashArrayProperty = - AvaloniaProperty.Register>("StrokeDashArray"); + AvaloniaProperty.Register>(nameof(StrokeDashArray)); + + public static readonly StyledProperty StrokeDashOffsetProperty = + AvaloniaProperty.Register(nameof(StrokeDashOffset)); public static readonly StyledProperty StrokeThicknessProperty = AvaloniaProperty.Register(nameof(StrokeThickness)); @@ -103,6 +106,12 @@ namespace Avalonia.Controls.Shapes get { return GetValue(StrokeDashArrayProperty); } set { SetValue(StrokeDashArrayProperty, value); } } + + public double StrokeDashOffset + { + get { return GetValue(StrokeDashOffsetProperty); } + set { SetValue(StrokeDashOffsetProperty, value); } + } public double StrokeThickness { @@ -124,7 +133,7 @@ namespace Avalonia.Controls.Shapes if (geometry != null) { - var pen = new Pen(Stroke, StrokeThickness, new DashStyle(StrokeDashArray), + var pen = new Pen(Stroke, StrokeThickness, new DashStyle(StrokeDashArray, StrokeDashOffset), StrokeDashCap, StrokeStartLineCap, StrokeEndLineCap, StrokeJoin); context.DrawGeometry(Fill, pen, geometry); } From b2f250acb4001a1ad96da1a0315fe989bb914737 Mon Sep 17 00:00:00 2001 From: danwalmsley Date: Sat, 9 Feb 2019 17:19:26 +0000 Subject: [PATCH 05/13] Oops --- src/Avalonia.Visuals/Rendering/DeferredRenderer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Avalonia.Visuals/Rendering/DeferredRenderer.cs b/src/Avalonia.Visuals/Rendering/DeferredRenderer.cs index f9c21bd212..eb1c1d7471 100644 --- a/src/Avalonia.Visuals/Rendering/DeferredRenderer.cs +++ b/src/Avalonia.Visuals/Rendering/DeferredRenderer.cs @@ -256,7 +256,7 @@ namespace Avalonia.Rendering var (scene, updated) = UpdateRenderLayersAndConsumeSceneIfNeeded(GetContext); - if (scene != null) + if (scene?.Item != null) { using (scene) { From 44cc084bd6cd1d6bbe1259c890dad916aaa5ecd6 Mon Sep 17 00:00:00 2001 From: Sorien Date: Sat, 9 Feb 2019 19:08:53 +0100 Subject: [PATCH 06/13] Update PR template hide section desc with html comments --- .github/PULL_REQUEST_TEMPLATE.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 78b9cff039..acff8cc117 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,18 +1,18 @@ ## What does the pull request do? + -Give a bit of background on the PR here, together with links to with related issues etc. ## What is the current behavior? + -If the PR is a fix, describe the current incorrect behavior, otherwise delete this section. ## What is the updated/expected behavior with this PR? + -Describe how to test the PR. ## How was the solution implemented (if it's not obvious)? + -Include any information that might be of use to a reviewer here. ## Checklist @@ -21,12 +21,11 @@ Include any information that might be of use to a reviewer here. - [ ] Consider submitting a PR to https://github.com/AvaloniaUI/Avaloniaui.net with user documentation ## Breaking changes + -List any breaking changes here. When the PR is merged please add an entry to https://github.com/AvaloniaUI/Avalonia/wiki/Breaking-Changes ## Fixed issues - -If the pull request fixes issue(s) list them like this: - + From e9f59a90e8aec0ab2ebd321e699ab7edeee92f10 Mon Sep 17 00:00:00 2001 From: danwalmsley Date: Sun, 10 Feb 2019 10:47:05 +0000 Subject: [PATCH 07/13] ensure scene is always disposed --- src/Avalonia.Visuals/Rendering/DeferredRenderer.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Avalonia.Visuals/Rendering/DeferredRenderer.cs b/src/Avalonia.Visuals/Rendering/DeferredRenderer.cs index eb1c1d7471..3bc5e92fb4 100644 --- a/src/Avalonia.Visuals/Rendering/DeferredRenderer.cs +++ b/src/Avalonia.Visuals/Rendering/DeferredRenderer.cs @@ -256,9 +256,9 @@ namespace Avalonia.Rendering var (scene, updated) = UpdateRenderLayersAndConsumeSceneIfNeeded(GetContext); - if (scene?.Item != null) + using (scene) { - using (scene) + if (scene?.Item != null) { var overlay = DrawDirtyRects || DrawFps; if (DrawDirtyRects) @@ -267,7 +267,7 @@ namespace Avalonia.Rendering RenderOverlay(scene.Item, GetContext()); if (updated || forceComposite || overlay) RenderComposite(scene.Item, GetContext()); - } + } } } finally From fa8d8c896dbb722bbebdaf484de232fdeca0fdeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Pedro?= Date: Mon, 11 Feb 2019 22:44:09 +0000 Subject: [PATCH 08/13] Removed redundant bool comparisons. --- src/Avalonia.Base/Data/Core/BindingExpression.cs | 2 +- src/Avalonia.Controls/AutoCompleteBox.cs | 2 +- src/Avalonia.Controls/Presenters/ScrollContentPresenter.cs | 2 +- src/Avalonia.Visuals/Rendering/SceneGraph/VisualNode.cs | 2 +- src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoader.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Avalonia.Base/Data/Core/BindingExpression.cs b/src/Avalonia.Base/Data/Core/BindingExpression.cs index c4ffa839e0..f1717bde3b 100644 --- a/src/Avalonia.Base/Data/Core/BindingExpression.cs +++ b/src/Avalonia.Base/Data/Core/BindingExpression.cs @@ -177,7 +177,7 @@ namespace Avalonia.Data.Core protected override void Subscribed(IObserver observer, bool first) { - if (!first && _value != null && _value.TryGetTarget(out var val) == true) + if (!first && _value != null && _value.TryGetTarget(out var val)) { observer.OnNext(val); } diff --git a/src/Avalonia.Controls/AutoCompleteBox.cs b/src/Avalonia.Controls/AutoCompleteBox.cs index 1bc402bc2f..b054804c86 100644 --- a/src/Avalonia.Controls/AutoCompleteBox.cs +++ b/src/Avalonia.Controls/AutoCompleteBox.cs @@ -1893,7 +1893,7 @@ namespace Avalonia.Controls { bool callTextChanged = false; // Update the Text dependency property - if ((userInitiated == null || userInitiated == true) && Text != value) + if ((userInitiated ?? true) && Text != value) { _ignoreTextPropertyChange++; Text = value; diff --git a/src/Avalonia.Controls/Presenters/ScrollContentPresenter.cs b/src/Avalonia.Controls/Presenters/ScrollContentPresenter.cs index c05c1672f8..30330ef9ac 100644 --- a/src/Avalonia.Controls/Presenters/ScrollContentPresenter.cs +++ b/src/Avalonia.Controls/Presenters/ScrollContentPresenter.cs @@ -285,7 +285,7 @@ namespace Avalonia.Controls.Presenters { scrollable.InvalidateScroll = () => UpdateFromScrollable(scrollable); - if (scrollable.IsLogicalScrollEnabled == true) + if (scrollable.IsLogicalScrollEnabled) { _logicalScrollSubscription = new CompositeDisposable( this.GetObservable(CanHorizontallyScrollProperty) diff --git a/src/Avalonia.Visuals/Rendering/SceneGraph/VisualNode.cs b/src/Avalonia.Visuals/Rendering/SceneGraph/VisualNode.cs index 159c3cd0fa..2fb8e84a2e 100644 --- a/src/Avalonia.Visuals/Rendering/SceneGraph/VisualNode.cs +++ b/src/Avalonia.Visuals/Rendering/SceneGraph/VisualNode.cs @@ -236,7 +236,7 @@ namespace Avalonia.Rendering.SceneGraph { foreach (var operation in DrawOperations) { - if (operation.Item.HitTest(p) == true) + if (operation.Item.HitTest(p)) { return true; } diff --git a/src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoader.cs b/src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoader.cs index 255357e027..2720e674cc 100644 --- a/src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoader.cs +++ b/src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoader.cs @@ -250,7 +250,7 @@ namespace Avalonia.Markup.Xaml .ToDictionary(entry =>entry.Element(arrayNs + "Key").Value, entry => entry.Element(arrayNs + "Value").Value); - if (xamlInfo.TryGetValue(typeName, out var rv) == true) + if (xamlInfo.TryGetValue(typeName, out var rv)) { yield return new Uri($"avares://{asm}{rv}"); yield break; From 039991da684187c5d64104ca310a14a6793b496f Mon Sep 17 00:00:00 2001 From: mstr2 Date: Wed, 13 Feb 2019 03:54:04 +0100 Subject: [PATCH 09/13] Fixed a bug where AddOwner would add a property to AvaloniaPropertyRegistry's property list more than once --- src/Avalonia.Base/AvaloniaPropertyRegistry.cs | 12 ++++++++---- .../AvaloniaPropertyRegistryTests.cs | 5 +++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/Avalonia.Base/AvaloniaPropertyRegistry.cs b/src/Avalonia.Base/AvaloniaPropertyRegistry.cs index 6f57dfbf13..5fcdf76c0f 100644 --- a/src/Avalonia.Base/AvaloniaPropertyRegistry.cs +++ b/src/Avalonia.Base/AvaloniaPropertyRegistry.cs @@ -13,8 +13,8 @@ namespace Avalonia /// public class AvaloniaPropertyRegistry { - private readonly List _properties = - new List(); + private readonly Dictionary _properties = + new Dictionary(); private readonly Dictionary> _registered = new Dictionary>(); private readonly Dictionary> _attached = @@ -33,7 +33,7 @@ namespace Avalonia /// /// Gets a list of all registered properties. /// - internal IReadOnlyList Properties => _properties; + internal IReadOnlyCollection Properties => _properties.Values; /// /// Gets all non-attached s registered on a type. @@ -220,7 +220,11 @@ namespace Avalonia inner.Add(property.Id, property); } - _properties.Add(property); + if (!_properties.ContainsKey(property.Id)) + { + _properties.Add(property.Id, property); + } + _registeredCache.Clear(); } diff --git a/tests/Avalonia.Base.UnitTests/AvaloniaPropertyRegistryTests.cs b/tests/Avalonia.Base.UnitTests/AvaloniaPropertyRegistryTests.cs index 8220b7d6e7..d11319114f 100644 --- a/tests/Avalonia.Base.UnitTests/AvaloniaPropertyRegistryTests.cs +++ b/tests/Avalonia.Base.UnitTests/AvaloniaPropertyRegistryTests.cs @@ -27,6 +27,7 @@ namespace Avalonia.Base.UnitTests var property = new AttachedProperty("test", typeof(object), metadata, true); registry.Register(typeof(object), property); registry.RegisterAttached(typeof(AvaloniaPropertyRegistryTests), property); + property.AddOwner(); Assert.Equal(1, registry.Properties.Count); } @@ -150,5 +151,9 @@ namespace Avalonia.Base.UnitTests private class AttachedOwner2 : AttachedOwner { } + + private class Class4 : AvaloniaObject + { + } } } From 0fce33e43ea0c1dd3d2646ea3dda51acc821b676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Pedro?= Date: Wed, 13 Feb 2019 23:37:39 +0000 Subject: [PATCH 10/13] XML comment fixes. --- src/Avalonia.Controls/MenuItem.cs | 2 +- src/Avalonia.Controls/PixelPointEventArgs.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Avalonia.Controls/MenuItem.cs b/src/Avalonia.Controls/MenuItem.cs index 055d49fb0b..99e00ce72e 100644 --- a/src/Avalonia.Controls/MenuItem.cs +++ b/src/Avalonia.Controls/MenuItem.cs @@ -421,7 +421,7 @@ namespace Avalonia.Controls } /// - /// Called when the property changes. + /// Called when the property changes. /// /// The property change event. private void HeaderChanged(AvaloniaPropertyChangedEventArgs e) diff --git a/src/Avalonia.Controls/PixelPointEventArgs.cs b/src/Avalonia.Controls/PixelPointEventArgs.cs index 55a3d5601f..2456d0aea4 100644 --- a/src/Avalonia.Controls/PixelPointEventArgs.cs +++ b/src/Avalonia.Controls/PixelPointEventArgs.cs @@ -13,7 +13,7 @@ namespace Avalonia.Controls /// /// Initializes a new instance of the class. /// - /// The data. + /// The data. public PixelPointEventArgs(PixelPoint point) { Point = point; From 7b8b6374a056191feb2c90d916872107d80e359a Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Thu, 14 Feb 2019 21:17:33 +0000 Subject: [PATCH 11/13] Scaling of 1 on monitors >= FullHD --- src/Avalonia.X11/X11Screens.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Avalonia.X11/X11Screens.cs b/src/Avalonia.X11/X11Screens.cs index f2a0520c10..38f685ed0d 100644 --- a/src/Avalonia.X11/X11Screens.cs +++ b/src/Avalonia.X11/X11Screens.cs @@ -99,6 +99,8 @@ namespace Avalonia.X11 { if (mon.MWidth == 0) density = 1; + else if (mon.Width <= 1920) + density = 1; else density = X11Screen.GuessPixelDensity(mon.Width, mon.MWidth); } @@ -237,7 +239,14 @@ namespace Avalonia.X11 } else if (pixelDensity == null) { - PixelDensity = GuessPixelDensity(bounds.Width, physicalSize.Value.Width); + if (bounds.Width <= 1920) + { + PixelDensity = 1; + } + else + { + PixelDensity = GuessPixelDensity(bounds.Width, physicalSize.Value.Width); + } } else { From 27565d80bde42495edd9f1861ed3cc2fba50b941 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Fri, 15 Feb 2019 10:24:25 +0000 Subject: [PATCH 12/13] [X11] put FullHd res check inside GuessPixelDensity. --- src/Avalonia.X11/X11Screens.cs | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/Avalonia.X11/X11Screens.cs b/src/Avalonia.X11/X11Screens.cs index 38f685ed0d..ad5cad7eae 100644 --- a/src/Avalonia.X11/X11Screens.cs +++ b/src/Avalonia.X11/X11Screens.cs @@ -11,6 +11,7 @@ namespace Avalonia.X11 { class X11Screens : IScreenImpl { + private const int FullHDWidth = 1920; private IX11Screens _impl; public X11Screens(IX11Screens impl) @@ -99,8 +100,6 @@ namespace Avalonia.X11 { if (mon.MWidth == 0) density = 1; - else if (mon.Width <= 1920) - density = 1; else density = X11Screen.GuessPixelDensity(mon.Width, mon.MWidth); } @@ -239,14 +238,7 @@ namespace Avalonia.X11 } else if (pixelDensity == null) { - if (bounds.Width <= 1920) - { - PixelDensity = 1; - } - else - { - PixelDensity = GuessPixelDensity(bounds.Width, physicalSize.Value.Width); - } + PixelDensity = GuessPixelDensity(bounds.Width, physicalSize.Value.Width); } else { @@ -256,6 +248,6 @@ namespace Avalonia.X11 } public static double GuessPixelDensity(double pixelWidth, double mmWidth) - => Math.Max(1, Math.Round(pixelWidth / mmWidth * 25.4 / 96)); + => pixelWidth <= FullHDWidth ? 1 : Math.Max(1, Math.Round(pixelWidth / mmWidth * 25.4 / 96)); } } From 1a661e657f270a33a6152e56789fa4b2296b76fe Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Fri, 15 Feb 2019 11:14:07 +0000 Subject: [PATCH 13/13] fix error. --- src/Avalonia.X11/X11Screens.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Avalonia.X11/X11Screens.cs b/src/Avalonia.X11/X11Screens.cs index ad5cad7eae..6bfc8779da 100644 --- a/src/Avalonia.X11/X11Screens.cs +++ b/src/Avalonia.X11/X11Screens.cs @@ -11,7 +11,6 @@ namespace Avalonia.X11 { class X11Screens : IScreenImpl { - private const int FullHDWidth = 1920; private IX11Screens _impl; public X11Screens(IX11Screens impl) @@ -219,6 +218,7 @@ namespace Avalonia.X11 class X11Screen { + private const int FullHDWidth = 1920; public bool Primary { get; } public string Name { get; set; } public PixelRect Bounds { get; set; }