forked from AvaloniaUI/Avalonia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge release/0.10.18 - Squashed commit of the following:
commit 401bc52 Author: Dan Walmsley <[email protected]> Date: Mon Aug 15 14:29:34 2022 +0100 bump version. commit 62a5ee1 Author: Max Katz <[email protected]> Date: Sat Aug 13 03:34:22 2022 -0400 Merge pull request AvaloniaUI#8739 from AvaloniaUI/update-skia Update SkiaSharp # Conflicts: # build/HarfBuzzSharp.props commit 0ac982f Merge: 9f50abd 96187d7 Author: Dan Walmsley <[email protected]> Date: Mon Aug 15 13:39:20 2022 +0100 Merge pull request AvaloniaUI#8753 from AvaloniaUI/fix-listBoxTests-stable Fix ListBoxTests on stable commit 96187d7 Author: Takoooooo <[email protected]> Date: Mon Aug 15 15:20:34 2022 +0300 Fix ListBoxTests. commit 9f50abd Author: Dan Walmsley <[email protected]> Date: Mon Mar 7 16:54:24 2022 +0000 Merge pull request AvaloniaUI#7755 from AvaloniaUI/fixes/win32-can-resize Fixes/win32 can resize commit ff86693 Author: Max Katz <[email protected]> Date: Thu Aug 11 19:30:58 2022 -0400 Merge pull request AvaloniaUI#8728 from jp2masa/gl-control-render-rect Fixed OpenGlControlBase render rect commit 7627db1 Author: Max Katz <[email protected]> Date: Sat Aug 6 05:28:31 2022 -0400 Merge pull request AvaloniaUI#8683 from AvaloniaUI/stop-transition-if-it-was-cancelled Stop TransitioningContentControl if it was cancelled commit 7eb0a48 Author: Max Katz <[email protected]> Date: Sun Aug 7 02:52:50 2022 -0400 Merge pull request AvaloniaUI#8569 from hez2010/visual-fixes Avoid crashing when fail to create OpenGL context commit 5f9c852 Author: Dan Walmsley <[email protected]> Date: Tue Aug 9 18:38:40 2022 +0100 Merge pull request AvaloniaUI#8574 from AvaloniaUI/fixes/win32-consistent-minimize-restore-window-size Win32: Retain window position and size when docked and then minimized and restored. # Conflicts: # tests/Avalonia.IntegrationTests.Appium/WindowTests.cs commit 46d83d1 Author: Dan Walmsley <[email protected]> Date: Tue Aug 9 17:09:06 2022 +0100 Merge pull request AvaloniaUI#8618 from AvaloniaUI/fixes/macos-dont-reopen-hidden-window macos: Don't reopen hidden window when parent clicked. # Conflicts: # tests/Avalonia.IntegrationTests.Appium/WindowTests_MacOS.cs commit d758481 Merge: 765c4d7 7b33526 Author: Max Katz <[email protected]> Date: Tue Aug 9 01:29:08 2022 -0400 Merge pull request AvaloniaUI#8699 from timunie/fix/backport_GH_7778 Backport PR 7778 commit 7b33526 Author: Tim <[email protected]> Date: Mon Aug 8 11:24:12 2022 +0200 Backport PR 7778 commit 765c4d7 Author: Tako <[email protected]> Date: Wed Aug 3 18:44:47 2022 +0300 Merge pull request AvaloniaUI#8655 from AvaloniaUI/use-correct-toggleModifier-for-treeView-on-macOS-with-multiselection Use correct ToggleModifier in TreeView multiselection on MacOS commit fb607cc Author: Steven Kirk <[email protected]> Date: Wed Aug 3 17:05:21 2022 +0200 Merge pull request AvaloniaUI#8637 from AvaloniaUI/use-correct-toggleModifier-for-listBox-on-macOS-with-multiselection Use correct ToggleModifier in ListBox multiselection on MacOS. commit fcada17 Author: Steven Kirk <[email protected]> Date: Wed Aug 3 18:24:46 2022 +0200 Added AvaloniaLocator.GetRequiredService. commit 50f02de Author: Max Katz <[email protected]> Date: Tue Jul 26 23:06:08 2022 -0400 Merge pull request AvaloniaUI#8604 from AvaloniaUI/feature/tray-icon-non-mandatory Don't throw exceptions for missing windowing platform since it's actually not mandatory for TrayIcon commit dfabf4d Author: Max Katz <[email protected]> Date: Sat Jul 30 13:56:36 2022 -0400 Merge pull request AvaloniaUI#8599 from jinek/fixes/scene-hittest-exclusive Scene hittest now uses exclusive `Rect.Contains`. Fixes https://githu… commit 1628b20 Author: Nikita Tsukanov <[email protected]> Date: Tue Jul 26 13:52:23 2022 +0300 Merge pull request AvaloniaUI#8597 from AvaloniaUI/feature/x11-wmclass-spec Set WM_CLASS property according to ICCCM spec commit d2f8fe6 Author: Jumar Macato <[email protected]> Date: Fri Jul 15 21:04:07 2022 +0800 Merge pull request AvaloniaUI#8520 from timunie/fix/DataGrid_LastColumnIsClipped fix: RowDesiredWidth was missing the RowHeaderWidth commit 2d2cd97 Author: Max Katz <[email protected]> Date: Thu Jul 28 12:04:17 2022 -0400 Backport proper exception handling in win32 system dialogs commit 7fb8c01 Author: Nikita Tsukanov <[email protected]> Date: Tue Jul 26 16:41:15 2022 +0300 Merge pull request AvaloniaUI#8601 from AvaloniaUI/fixes/7773-skia-stream-workaround Workaround for SkiaSharp broken image decoding. commit e975100 Author: Dan Walmsley <[email protected]> Date: Mon Jul 18 15:38:27 2022 +0100 Merge pull request AvaloniaUI#8538 from AvaloniaUI/feature/expose-gtk-thread-invoke Introduced GtkInteropHelper.RunOnGlibThread, fixed demos # Conflicts: # samples/ControlCatalog.NetCore/NativeControls/Gtk/EmbedSample.Gtk.cs # samples/ControlCatalog.NetCore/NativeControls/Gtk/GtkHelper.cs # Conflicts: # build/SharedVersion.props
- Loading branch information
Showing
36 changed files
with
704 additions
and
467 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup> | ||
<PackageReference Include="HarfBuzzSharp" Version="2.8.2-preview.178" /> | ||
<PackageReference Condition="'$(IncludeLinuxSkia)' == 'true'" Include="HarfBuzzSharp.NativeAssets.Linux" Version="2.8.2-preview.178" /> | ||
<PackageReference Condition="'$(IncludeWasmSkia)' == 'true'" Include="HarfBuzzSharp.NativeAssets.WebAssembly" Version="2.8.2-preview.178"/> | ||
<PackageReference Include="HarfBuzzSharp" Version="2.8.2.1-preview.108" /> | ||
<PackageReference Condition="'$(IncludeLinuxSkia)' == 'true'" Include="HarfBuzzSharp.NativeAssets.Linux" Version="2.8.2.1-preview.108" /> | ||
<PackageReference Condition="'$(IncludeWasmSkia)' == 'true'" Include="HarfBuzzSharp.NativeAssets.WebAssembly" Version="2.8.2.1-preview.108" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup> | ||
<PackageReference Include="SkiaSharp" Version="2.88.1-preview.1" /> | ||
<PackageReference Condition="'$(IncludeLinuxSkia)' == 'true'" Include="SkiaSharp.NativeAssets.Linux" Version="2.88.1-preview.1" /> | ||
<PackageReference Condition="'$(IncludeWasmSkia)' == 'true'" Include="SkiaSharp.NativeAssets.WebAssembly" Version="2.88.1-preview.1" /> | ||
<PackageReference Include="SkiaSharp" Version="2.88.1-preview.108" /> | ||
<PackageReference Condition="'$(IncludeLinuxSkia)' == 'true'" Include="SkiaSharp.NativeAssets.Linux" Version="2.88.1-preview.108" /> | ||
<PackageReference Condition="'$(IncludeWasmSkia)' == 'true'" Include="SkiaSharp.NativeAssets.WebAssembly" Version="2.88.1-preview.108" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/Avalonia.Visuals/Rendering/SceneGraph/GeometryBoundsHelper.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using System; | ||
using Avalonia.Media; | ||
using Avalonia.Utilities; | ||
|
||
namespace Avalonia.Rendering.SceneGraph; | ||
|
||
internal static class GeometryBoundsHelper | ||
{ | ||
/// <summary> | ||
/// Calculates the bounds of a given geometry with respect to the pens <see cref="IPen.LineCap"/> | ||
/// </summary> | ||
/// <param name="originalBounds">The calculated bounds without <see cref="IPen.LineCap"/>s</param> | ||
/// <param name="pen">The pen with information about the <see cref="IPen.LineCap"/>s</param> | ||
/// <returns></returns> | ||
public static Rect CalculateBoundsWithLineCaps(this Rect originalBounds, IPen? pen) | ||
{ | ||
if (pen is null || MathUtilities.IsZero(pen.Thickness)) return originalBounds; | ||
|
||
switch (pen.LineCap) | ||
{ | ||
case PenLineCap.Flat: | ||
return originalBounds; | ||
case PenLineCap.Round: | ||
return originalBounds.Inflate(pen.Thickness / 2); | ||
case PenLineCap.Square: | ||
return originalBounds.Inflate(pen.Thickness); | ||
default: | ||
throw new ArgumentOutOfRangeException(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System; | ||
using System.ComponentModel; | ||
using System.Threading.Tasks; | ||
|
||
namespace Avalonia.X11.Interop; | ||
|
||
public class GtkInteropHelper | ||
{ | ||
public static async Task<T> RunOnGlibThread<T>(Func<T> cb) | ||
{ | ||
if (!await NativeDialogs.Gtk.StartGtk().ConfigureAwait(false)) | ||
throw new Win32Exception("Unable to initialize GTK"); | ||
return await NativeDialogs.Glib.RunOnGlibThread(cb).ConfigureAwait(false); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.