Commit Graph

27487 Commits

Author SHA1 Message Date
Julien Lebosquain 9f02346cd6 Headless NUnit: Handle async SetUp/TearDown (#20612)
* Headless NUnit: Fix TearDown not always working

* Headless NUnit: Handle async SetUp/TearDown
2026-02-05 08:23:20 +00:00
Julien Lebosquain cac4650c98 Remove obsolete members from Avalonia.Base (#20613)
* Remove CubicBezierEasing

* Remove CustomAnimatorBase

* Remove BindingPriority.TemplatedParent

* Remove CompiledBindingPath.SetRawSource

* Remove StyleDiagnostics

* Remove RadialGradientBrush.Radius

* Remove Color.ToUint32

* Remove DrawingContext.PushPreTransform/PushPostTransform

* Remove ICompositionGpuImporterObject.ImportCompeted

* Remove IStyleable

* Remove AvaloniaResourcesIndex.WriteResources

* Remove AvaloniaObjectExtensions.Bind overload

* Update API suppressions
2026-02-05 07:24:54 +00:00
Julien Lebosquain 934ca7c9f5 Release implicit mouse capture on focus lost (#20574)
* macOS: Release implicit mouse capture on focus lost

* Added native modal test to EmbeddingPage
2026-02-04 10:50:15 +00:00
Julien Lebosquain 6d45ee8cd7 Make NUnit tests visible in Rider again (#20594) 2026-02-04 03:15:15 +00:00
Julien Lebosquain 656d691940 Move ConstructorArgumentAttribute and remove BindingMode from ReflectionBinding constructor (#20589)
* Move ConstructorArgumentAttribute to Avalonia.Base assembly

* Move IOptionalFeatureProvider to Avalonia namespace

* Remove BindingMode from ReflectionBinding constructor

* Update API suppressions
2026-02-04 03:14:54 +00:00
Julien Lebosquain 0fee13f821 Add IsAlive property to IRef<T> (#20593) 2026-02-04 03:14:51 +00:00
Julien Lebosquain 313bceea90 Remove AutoCompleteBox.BindingEvaluator (#20596)
* Remove AutoCompleteBox.BindingEvaluator

* Fix AutoCompleteBoxPage sample

* Update API suppressions
2026-02-04 03:08:24 +00:00
Julien Lebosquain d670efd162 Make IPopupHost a private API (#20597)
* Make IPopupHost a private API

* Update API suppressions
2026-02-04 03:07:23 +00:00
Thad House babab4f9cb Add screen orientation support for Linux DRM (#20154)
* On Frame-Buffer-Orientation: Add screen orientation support for Linux frame buffer and DRM applications.

This commit introduces support for screen orientation across various components by adding a new `Orientation` property of type `SurfaceOrientation` in `DrmOutputOptions` and `FbDevOutputOptions`. The `IScreenInfoProvider` interface is updated to inherit from `ISurfaceOrientation`, ensuring consistent orientation management.

Key changes include:
- Enhanced `FramebufferToplevelImpl` to handle orientation in size calculations.
- Updated `LibInputBackend` for device input coordinate rotation based on screen orientation.
- Implemented `ISurfaceOrientation` in `DrmOutput` and `FbdevOutput` classes.
- Modified `DrawingContextImpl` to support canvas rotation based on orientation.
- Improved `FramebufferRenderTarget` and `PixelFormatConversionShim` to respect framebuffer orientation during surface creation and pixel format conversions.
- Streamlined rendering methods to ensure drawing operations align with the current surface orientation.
- Removed redundant code related to framebuffer handling.

* Fix review comments, add ability to test

* Some formatting

* Should be working now

* Remove fbdev changes

Theres really no point to do this in fbdev.

* Better method of rotating and transforming the canvas

* Remove breaking changes

* Switch to using a 2nd frame buffer in the rotation case

* Fix review comments

* Incorrect variable

* Fix sample

---------

Co-authored-by: davidw <davidw@icselectronics.co.uk>
2026-02-03 09:01:29 +00:00
Julien Lebosquain 92190e6ee1 Improve error message for invalid surface size (#20591) 2026-02-02 21:57:27 +00:00
Thad House 7d9c8eeb7b Fix warnings and index bugs in ControlCatalog sample (#20590) 2026-02-02 20:07:00 +00:00
Daniel Lerch 0715676f22 Raise IAvaloniaActivity.Activated on new intent (#20564)
Co-authored-by: Emmanuel Hansen <emmausssss@gmail.com>
2026-02-02 14:15:27 +00:00
Julien Lebosquain 5483217944 Merge IResourceHost2 into IResourceHost (#20576)
* Merge IResourceHost2 into IResourceHost

* Update API suppressions
2026-01-30 15:32:10 +00:00
Julien Lebosquain 806193a43d Remove NativeMenuItemToggleType and NativeMenuBar.EnableMenuItemClickForwarding (#20577)
* Remove NativeMenuItemToggleType

* Remove NativeMenuBar.EnableMenuItemClickForwarding

* Update API suppressions
2026-01-30 09:57:39 +00:00
Julien Lebosquain 4c3c9aa99f Add AlphaFormat to ILockedFramebuffer (#20556)
* Add AlphaFormat to ILockedFramebuffer

* Update API suppressions
2026-01-30 09:55:40 +00:00
Julien Lebosquain 3394815603 Simplify text formatting constructors (#20527)
* Remove the flowDirection parameter from TextCollapsingProperties.CreateCollapsedRuns

* Simplify text formatting constructors

* Update API suppressions
2026-01-30 09:55:24 +00:00
Matt Lacey 5361b98ce1 #19962 Add AXAML Source Information to debug Builds (#20524)
* #19962 Add AXAML Source Information to debug Builds

* SimplifyXamlSourceInfo

* Add XamlSourceInfo for as many elements as possible

* Add tests to confirm XamlSourceInfo is set for all types

* Remove property only added for debugging during development

* update skipped test so it runs (even though it doesn't yet pass)

* Wrap XamlAstNewClrObjectNode instead of XamlAstObjectNode, run transformer late

* Remove unsupported value types from the More_Resources_Get_XamlSourceInfo_Set

* Fix Document property not being set in runtime parser

* Add a dedicated CreateSourceInfo parameter for RuntimeXamlLoaderConfiguration, instead of reusing DesignMode

* Inherit real XamlValueWithManipulationNode, move actual manipulation to a separate class

* Fix group transformers by unwrapping manipulation nodes first

* minor Resource related test change

* Update public API as agreed

* Add new failing tests for the dictionaries

* Fix randomly failing tests, that depend on the test order

* Fix assert

* Rename AvaloniaXamlResourceTransformer

* Emit XamlSourceInfo from AvaloniaXamlResourceTransformer

* Rename AvaloniaXamlIlResourceTransformer for consistency

* Cleanup comments

* Remove XamlSourceInfoValueWithManipulationNode, use standard XamlValueWithManipulationNode

* Add new RuntimeXamlLoaderDocument.Document property

* Use UriBuilder trick to support unix paths on windows

* Add private AttachedProperty for avalonia objects, instead of always using weak table

* Fix wrong UriBuilder usage and add more test assets

* Fix "Invalid URI" exception

---------

Co-authored-by: KimHenrik <kimhenrik@outlook.de>
Co-authored-by: Max Katz <maxkatz6@outlook.com>
2026-01-30 08:19:09 +00:00
Julien Lebosquain f92035b914 Headless: use HarfBuzz by default (#20561) 2026-01-28 13:27:47 +00:00
Julien Lebosquain 1ee1509352 Fixes several simple TODO12 (#20544)
* Remove obsolete TextInputMethodClient.ShowInputPanel method

* Merge Move and Move private in KeyboardNavigationHandler

* Change Inline.TextDecorations type to AttachedProperty

* Change TextSearch.GetText/SetText parameter to Interactive

* Remove Design.SetPreviewWith overload

* Replace JSWebWorkerClone with JSWebWorker

* Remove StringTokenizer

* Update API suppressions

* Add reflection comment to RenderWorker
2026-01-27 12:55:05 +00:00
Melissa b775804b61 Implemented AutomationProperties.LiveSetting (#20473)
* Implemented LiveSetting property

* Make sure PropertyChanged callback is called on AvnAutomationPeer

* Remove `optional` from `AvnAccessibility`: we were never checking whether they respond to the selector or not anyway

* Formatting

* Use ARIA and Live Region Changed constants from mac APIs

* Fixed Mac build

* Reverted constants that don't exist on integration test XCode version

---------

Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
2026-01-26 13:48:21 +00:00
kerams 232e2aee39 Fix Android surface recreation (#20538) 2026-01-26 10:49:42 +00:00
Julien Lebosquain d5d7a7b0e8 Merge IGeometryContext and IGeometryContext2 (#20528)
Co-authored-by: Max Katz <maxkatz6@outlook.com>
2026-01-24 15:53:11 +00:00
Julien Lebosquain 3c88142694 Make Screen abstract (#20529) 2026-01-24 09:41:04 +00:00
Dong Bin 01a8042094 Disable scroll chaining for ScrollVIewers in popup. (#20503)
* feat: disable scroll chaining for AutoCompleteBox, ComboBox, and MenuScrollViewer.

* feat: disable scroll chaining for AutoCompleteBox, ComboBox, and MenuFlyoutPresenter

* feat: enable scroll chaining for ScrollViewer in MenuFlyoutPresenter.
2026-01-23 12:03:39 +00:00
Benedikt Stebner 1bce702bd4 Introduce TextOptions (#20107)
* Introduce TextOptions API

* Store BaselinePixelAlignment as byte. Move to a dedicated file.

* Update API suppressions

---------

Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
2026-01-23 11:22:27 +00:00
Julien Lebosquain 8d2f1475ca Remove IInternalScroller and move IScrollable to Avalonia.Base (#20519)
* Remove IInternalScroller and move IScrollable to Avalonia.Base

* Update API suppressions
2026-01-23 07:26:26 +00:00
lindexi 62fac86360 Reduce the number of WrapDirect3D11Texture calls (#20517)
* Reduce the number of WrapDirect3D11Texture calls

Reduce the number of WrapDirect3D11Texture calls by tying the EglSurface lifetime to _renderTexture.
When testing on a 4K display, I observed that eglCreatePbufferFromClientBuffer, which is invoked by WrapDirect3D11Texture, can take around 5 ms per frame.
By reducing the number of eglCreatePbufferFromClientBuffer calls, I was able to improve rendering performance by about 30%.
However, I’m not sure why the previous implementation needed to call WrapDirect3D11Texture on every frame.

* Remove the commented code
2026-01-22 15:28:46 +00:00
Nikita Tsukanov 8cdb68f6b5 Use net8.0 TFM for shipped build props (#20518) 2026-01-22 15:27:43 +00:00
Matt Lacey cae6ee2234 Fix typo in build.md (#20513)
just a single typo fix
2026-01-21 14:18:56 +00:00
Evan 65adcde081 Fix TimePicker to respect custom Width property (#20507)
* Fix TimePicker to respect Width by removing MinWidth from internal Button

* Add MinWidth to DatePicker for consistency
2026-01-21 10:06:02 +00:00
lindexi 93eeadf3c1 Fix the DxgiRenderTimerLoop thread get the screens from UI thread (#20511)
Fixes https://github.com/AvaloniaUI/Avalonia/issues/20508
2026-01-21 08:32:25 +00:00
Julien Lebosquain 0fb64d65cc Enable warnings as errors (#20504) 2026-01-21 08:16:46 +00:00
Evan 5f3dbae222 Fix DatePicker to respect Width by removing MinWidth from internal Button (#20487)
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
2026-01-20 22:53:29 +00:00
lindexi 3b3a5d2b76 Add thread name in DxgiConnection (#20505)
The thread name in WinUiCompositorConnection is DwmRenderTimerLoop
2026-01-20 14:16:34 +00:00
Julien Lebosquain ac37bd6353 Implement scene delegate for iOS (#20454)
* Implement scene delegate for iOS

* Move OS check to its own method to make analyzer happy
2026-01-20 08:39:27 +00:00
Melissa a2a1663f4b Added automation peer for Expander control (#20475)
* Added `ExpanderAutomationPeer` for `Expander` control

* Use Group/"group" on UIA and NSAccessibilityDisclosureTriangleRole on AX

---------

Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
2026-01-19 18:19:42 +00:00
Melissa a77f7adce0 Added property changed event for IToggleProvider (#20486) 2026-01-19 10:32:38 +00:00
Melissa 2bcbbde723 Fixed title bar appearing in content element tree (#20485) 2026-01-19 10:11:15 +00:00
Melissa 80be90dcea Fixed broken accessibility properties in ScrollBar control (#20483)
* Fixed broken accessibility properties in ScrollBar control

* Prefer setting Thumb name in xaml instead

* Fixed broken accessibility propertes in ScrollBar control on Simple theme
2026-01-19 10:09:20 +00:00
Julien Lebosquain ff0a61486d Update headless xUnit support to v3 (#20481)
* Update headless xUnit support to v3

* Update API suppressions
2026-01-17 17:16:07 +00:00
Steven Kirk 1086d9b5b0 Move compiled bindings to Avalonia.Base. (#20439)
* Reminder for future me.

* Move compiled bindings to Avalonia base.

* Update suppressions.

* Update API suppressions

---------

Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
2026-01-16 11:52:50 +00:00
Julien Lebosquain 8215194f32 Reset cached transform on PopEffect (#20474) 2026-01-15 15:17:07 +00:00
Julien Lebosquain 737732861b Do not inherit TextDecorations in popup (#20472) 2026-01-15 11:59:16 +00:00
Julien Lebosquain 942f23274f Remove EnableUnsafeBinaryFormatterSerialization property (#20467) 2026-01-14 12:57:15 +00:00
Julien Lebosquain eb80c729d9 Fix NuGet warnings (#20466) 2026-01-14 12:19:15 +00:00
Gehongyan d3642f9871 Fix Avalonia.Desktop.slnf compiling (#20461) 2026-01-13 16:01:17 +00:00
Julien Lebosquain c8f59f84af Fix xUnit warnings in AnimationIterationTests (#20459) 2026-01-13 13:55:18 +00:00
Tim Miller e8a0bee928 Null Reference Check for Animation keyframes (#20422)
* Null Reference Check for Animator

* Add Animation_Completes_Gracefully_When_First_KeyFrame_Value_Is_Null

* Use neutralValue
2026-01-13 09:37:06 +00:00
Julien Lebosquain f07e42d2bb Remove BinaryFormatter (#20455) 2026-01-13 03:49:23 +00:00
Tim 9ab60f262d Fix for HarfBuzz was missing (#20456)
* Fix for HarfBuzz was missing

* Address review
2026-01-12 18:52:48 +00:00