Commit Graph

27362 Commits

Author SHA1 Message Date
Julien Lebosquain 246cbfc566 Remove Direct2D1 (#20132) 2025-11-24 11:50:03 +00:00
Max Katz cace969828 Add alternative Nuke build command for direct execution 2025-11-22 21:08:44 -08:00
Julien Lebosquain 40a3af4aa5 Remove netstandard2.0 from almost all projects (#20111)
* Remove netstandard2.0 from almost all projects

* Fix duplicated target frameworks in unit tests

* Fix DesignerSupport tests

* Fix Designer.HostApp packaging

* Build ControlCatalog.Desktop on CI

* Fix another bad auto merge

* Fix LeakTests duplicated target frameworks

* Don't hardcode target framework in DesignerSupportTests
2025-11-21 09:59:39 +00:00
Emmanuel Hansen 28f687ec63 Fix winforms mnemonic handler being called when textbox is focused. (#20091)
* fix winforms pneumonic handler being called when textbox is focused.

* use GetService instead
2025-11-21 09:43:31 +00:00
Betta_Fish e351303d1f feat: Allow stopping composition animation (#20074)
* feat: Allow stopping composition animation

* docs: Add XML comment

* fix: Fix nullability

* feat: Add StopAnimationGroup

* docs: Add XML comments

---------

Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
2025-11-21 09:20:52 +00:00
Lin e3dbedbcfa Fixed the issue where a newline character required two backspaces to be deleted in Windows. (#20073)
* Fixed the issue where a newline character required two backspaces to be deleted in Windows.

* add unit test

* Handling the differences between HeadlessTextShaperStub and TextShaperImpl

* Make unit tests available

* Treat "\r\n" as a single unit.

* The backspace test against CRLF

* Backspace should treat CRLF as a unit.
2025-11-20 13:38:33 +00:00
Max Katz 12741e861b Remove Avalonia.Browser.Blazor (#20105) 2025-11-20 09:57:34 +00:00
Emmanuel Hansen 8b23a2e342 directly use the surface window handle cached in InvalidationAwareSurfaceView instead of requesting new handles (#20093) 2025-11-20 09:22:32 +00:00
Julien Lebosquain 70ebc1e226 Remove ReactiveUI (#20101) 2025-11-19 21:05:12 +00:00
Julien Lebosquain fb0f3848f9 Update to .NET 10 (#19869)
* Update to .NET 10 and C# 14

* Remove reflection usage in AvaloniaAccessHelper

* Fix Android nullability errors

* Fix WindowMetrics.WindowInsets removed from AndroidX

* Update pipelines

* Fix ValidateApiDiff for missing frameworks

* Fix Windows integration tests

* Update Xamarin.AndroidX.Window to 1.5.0

* Fix MacCatalyst supported version

* Remove unused Xunit.Extensions.Ordering

* Try to fix macOS integration tests

* Update pipeline runner to macOS 15

* Disable LeakTests

* Fix .NET Framework unit tests

* Fix BuildTests

* Bump minimum Android API level to 24

* Update to .NET 10 RTM

* Update XamlX

* update android insets and activity code to handle deprecated behaviors in api 36

---------

Co-authored-by: Emmanuel Hansen <emmausssss@gmail.com>
2025-11-19 15:22:43 +01:00
Emmanuel Hansen 8631917d57 Fix popups not closing when using WinForms Host (#20090)
* fix popups not closing in embedded view in winforms

* fix winforms integration test sample

* addressed review
2025-11-19 07:47:20 +00:00
Max Katz d0720348c7 Update Avalonia.BuildServices package version (#20078) 2025-11-17 15:07:23 +00:00
Julien Lebosquain 2a639ea00f Properly snapshot GlSkiaImportedImage (#20053)
* Properly snapshot GlSkiaImportedImage

* Snapshot to an OpenGL texture

* Address review

* Share FBO between imported images
2025-11-17 10:25:42 +00:00
Emmanuel Hansen 4be786a5f6 Support reading from and copying images to clipboard (#19930)
* support reading images from clipboard(win32/android)

* Add DataFormat.Image. Prioritize png format when retrieving image from clipboard

* add browser support

* addressed comments

* win32 - add support for CF_DIB and CF_BITMAP formats

* win32 - add support for copying bitmaps to clipboard as DIB

* browser - add support for copying bitmap to clipboard

* Implement bitmap clipboard for iOS

* rename DataFormat.Image to DataFormat.Bitmap

* Implement Bitmap clipboard on macOS

* Use MemoryStream for bitmap clipboard/dnd on macOS backend

* Add public.jpeg support on macOS backend (convert it to png while in objc)

* Support TIFF format on iOS backend, by converting it to UIImage first

* Add Bitmap DND sample

* add clipboard bitmap support on linux

* simply bitmap format search on win32 clipboard

* fix linux clipboard image

* Bump MACOSX_DEPLOYMENT_TARGET

* Fix IDL incompatibility

* address review

* more reviews

* Fix Android crash on copy when a bitmap is present in the clipboard

* Handle any error that might occur pasting from an external content provider

* Add data transfer extension methods for Bitmap

---------

Co-authored-by: Max Katz <maxkatz6@outlook.com>
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
2025-11-15 04:35:07 +00:00
zacfromaustinpowder 5ab8604436 Added an optional "ConvertBack" method to FuncValueConverter (#19920) 2025-11-13 08:50:03 +00:00
zacfromaustinpowder 538a4b2993 Added a constructor to FuncMultiValueConverter that takes an IReadOnlyList instead of an IEnumerable (#19936)
Co-authored-by: Max Katz <maxkatz6@outlook.com>
2025-11-13 06:32:29 +00:00
Jumar Macato 80223ca7d4 Impl SuggestedFileType for Save/OpenFilePicker (#20026)
* new SuggestedFileType API

* Add impl for Win32 SuggestedFileType

* Impl suggestedFileType for GTK

* DBus impl

* Impl API for mac

* Add sample for suggested file filter

---------

Co-authored-by: Emmanuel Hansen <emmausssss@gmail.com>
2025-11-13 00:45:42 +00:00
Benedikt Stebner de2aa227b7 Fix EmbeddedFontCollection TryGetNearestMatch caching (#20013) 2025-11-12 10:08:08 +00:00
Emmanuel Hansen dfd3b8864d win32 - do not activate embedded windows when shown (#20027) 2025-11-10 15:34:44 +00:00
Emmanuel Hansen 60415288b0 android - fix external app not reading text in clipboard (#20023) 2025-11-10 13:22:59 +00:00
Max Katz a4bfae1c29 Headless AvaloniaTestIsolationLevel (#20000)
* Remove Unstable from HeadlessUnitTestSession

* Implement headless AvaloniaTestIsolationLevel

* Duplicate headless unit tests with different levels of isolation

* Fix accidental ABI breaking change

* Adjust docs

* Add IsolationTests

* Fix RunCoreLibsTests nukebuild target

* Headless: reuse sync context, instead of always forcing avalonia context
2025-11-10 01:03:46 -08:00
Tom Edwards d500f91121 Enable use of new VS extension with ControlCatalog by compiling XAML files as AvaloniaXaml (#19971)
Removed manual InitializeComponent definitions
Replaced uses of Get, FindControl, etc. with generated fields
2025-11-08 13:42:49 +00:00
Benedikt Stebner 1936725f2d Cache platform font manager TryMatchCharacter result (#19987) 2025-11-08 13:35:20 +00:00
Bobby Cannon a12b8d7061 Fix for previous PR19985 - AccessibilityNodeInfoCompat.Checked (#19991)
* fixed

* fixed

* fixed naming

* just not having a good PR
2025-11-08 11:16:42 +00:00
Sattar Imamov 7bbf4e1d71 - Fixed XButtons event handler for MacOs (#19997) 2025-11-08 11:13:37 +00:00
Andrey Rusyaev 7aed580721 Add Record struct and field to ComVariant to ensure that it has proper binary size (4 pointers (16 bytes) on a 32-bit processor, 3 pointers (24 bytes) on a 64-bit processor). (#20017)
Based on dotnet/runtime implementation https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshalling/ComVariant.cs
2025-11-07 17:47:02 +00:00
aguahombre 83b10db596 Fix ServerCompositionSimplePen memory leak (#19958)
* Fix for Issue#16451

* Remove the pen from the brush observers without queuing the pen for invalidation.
2025-11-07 16:19:57 +00:00
zacfromaustinpowder fee3032a04 Fixed Selector.ValidateNestingSelector not calling overrides when iterating up through parent selectors (#19947)
* Fixed Selector.ValidateNestingSelector not calling overrides when iterating up through parent selectors

Changed ValidateNestingSelector to call recursively, walking up
the hierarchy of parent selectors. This means function overrides
are taken into account when walking up the tree. Now if a
selector has an OrSelector as its parent, it doesn't throw an
exception.

* Updated ToString methods to surround OrSelectors with parenthesis where useful
2025-11-07 16:15:55 +00:00
Tim Miller 052bf2d46d [Win] Handle mouse movement in non-client areas of window. (#19922)
* V1: Handle MouseLeave Event to handle caption buttons

* Update methods
2025-11-07 15:19:24 +00:00
snowflysky da3d8207b8 macOS - Correct key mapping for scan code 0x18 (OemPlus instead of OemMinus) (#20009) 2025-11-07 09:13:47 +00:00
Benedikt Stebner 7f69ff1a93 Make ContentPresenter.RecognizesAccessKey stylable (#19893)
* Make HyperlinkButton's ContentPresenter.RecognizesAccessKey stylable

* Adjust all controls that are using RecognizesAccessKey
2025-11-05 15:03:40 +00:00
Jan Kučera 99db0e1eca Primary mouse device (#19898)
* Primary mouse device

* Addressing feedback

---------

Co-authored-by: Jan Kučera <miloush@users.noreply.github.com>
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
2025-11-04 12:37:29 +00:00
Bobby Cannon 4d3a28114e fixed (#19985) 2025-11-04 10:27:25 +00:00
startewho e294245f01 Handle long file paths in UriFromFilePath (#19955)
* fix long path

* Update UriExtensionsTests.cs

* Update StorageProviderHelpers.cs
2025-11-04 08:44:43 +00:00
Matt Lacey c530f7b208 Don't let the PreviewerWindow grow without limit (#19957) 2025-11-03 15:44:45 +00:00
Tom Edwards 1a938de66d Add file locations to diagnostics reported by AvaloniaNameIncrementalGenerator (#19934)
Add a pure XML parsing fallback which allows InitializeContext to be generated even if XAML parsing failed
Improve diagnostic messages and make user errors warnings, so that the compile can continue and fail "properly" later
2025-11-03 10:03:07 +00:00
Tim Miller c811bd42ae [Avalonia.Native] Fix fullscreen transitions with ExtendClientAreaToDecorationsHint windows (#19939) 2025-10-29 06:58:36 +00:00
Emmanuel Hansen 3ed7b9e9fa Fix/win32 no border sysmenu (#19923)
* remove ws_sysmenu from non full decoration windows

* update decorated window sample to not resize on maximize
2025-10-28 16:08:37 +00:00
Benedikt Stebner 8c8545bc52 [Text] Properly handle DrawableRun.Baseline (#19896)
* Add failing test

* Also handle decent
2025-10-28 14:35:02 +00:00
Jumar Macato 2c540873ec Add Impl for SaveFilePickerWithResultAsync API (#19783)
* Add new SaveFilePickerWithResultAsync API to the base

* Add SaveFilePickerWithResultAsync stub impl

* Control Catalog SaveFilePickerWithResultAsync sample with XML and JSON types

* Make SaveFilePickerResult a struct

* Add managed picker implementation

* Make SaveFilePickerResult a readonly struct

* Windows implementation of SaveFilePickerWithResultAsync

* Test impl for dbus

* Reuse the file type object (FTO) so StorageFile consumer can match exactly the right FTO when receiving the SaveFilePicker's result.

* Add Gtk impl

* Avalonia.Native: surface selected save dialog filters

* macOS: report selected NSSavePanel filter

* Modify the conditional in case there's duplicate descriptions of FTO's in DBusSystemDialog.cs

* Instantiate FPFT as fallback

* Pass the mime/pattern to instantiated FPFT

* Update API diff

* Fix review comments

---------

Co-authored-by: Max Katz <maxkatz6@outlook.com>
2025-10-27 03:43:09 +00:00
Wiesław Šoltés a533f5f268 Added guards in TryGetGlyphTypeface so the $Default placeholder stops… (#19891)
* Added guards in TryGetGlyphTypeface so the $Default placeholder stops recursing once the concrete default family cannot be resolved

* Throw if $Default is used as the default family name

* Stripped the redundant $Default guard/continue blocks

---------

Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
2025-10-23 11:05:11 +00:00
Benedikt Stebner f5fe25b2c6 Distribute LineGap evenly to top and bottom (#19556)
* Distribute LineGap evenly to top and bottom

* Add comment

* Add tests

* Fix line height override and add tests for it

* Remove extra spaces
2025-10-23 08:00:53 +00:00
Benedikt Stebner c5efedb81a Adjust GetBackspaceCaretCharacterHit (#19586)
* Adjust GetBackspaceCaretCharacterHit implementation so it works with codepoint boundaries

* Add a unit test
2025-10-22 15:37:53 +00:00
Michal Rezny c98fe78528 Introduced resources to be able to properly resize Checkbox and RadioButton in the Compact density of the Fluent theme. (#19882) 2025-10-22 11:44:52 +00:00
Benedikt Stebner c676419cfa Deal with non standard oblique typefaces on Windows (#19876) 2025-10-22 07:17:13 +00:00
Julien Lebosquain 037d7621d1 Prevent duplicated files during drag-and-drop (#19864) 2025-10-22 07:08:29 +00:00
Mahmoud Darwish 6e35604b9d Fix GTK file chooser to show network locations on Linux (#19855)
GTK file choosers default to local_only=TRUE, which hides network
locations (SMB, SFTP, NFS) mounted via GVFS. This change calls
gtk_file_chooser_set_local_only(FALSE) to enable network browsing.

Fixes browsing to network shares in OpenFileDialog, OpenFolderDialog,
and SaveFileDialog on Linux.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: meywd <meywd@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-10-22 06:46:32 +00:00
pavelovcharov 1d8e38417b LayoutTransformControl - fix memory leak due to Transform.Changed event subscription (#19718)
* fix Transform.Changed memory leak in LayoutTransformControl

* refix

* apply transform on attach to visual tree
2025-10-22 06:45:34 +00:00
memorydream 6cf9b87a95 fix: DBus tray icon NRE when change visible (#19742)
* fix: TrayIcon NRE when change visible

* fix: DBus tray icon duplicated click event

---------

Co-authored-by: Max Katz <maxkatz6@outlook.com>
2025-10-18 05:20:51 +00:00
Jan Kučera 47470f9304 Internal PointerCaptureChanging event (#19833)
* PointerCaptureChanging event

* PR feedback

* Announce implicit capture to platform

---------

Co-authored-by: Jan Kučera <miloush@users.noreply.github.com>
Co-authored-by: Max Katz <maxkatz6@outlook.com>
2025-10-17 04:33:31 -07:00