* Revert "Fix popups position on X11 (#14551)"
This reverts commit 06f88f6e00.
* Revert "Use popupParent as X11 parent window (#14366)"
This reverts commit 0bde86b457.
* Discard additional lines upon inserting when AcceptReturn=false
* Use LineBreakEnumerator for detecting line breaks
* Remove unused member
Co-authored-by: Max Katz <maxkatz6@outlook.com>
* Use Grapheme enumerator
---------
Co-authored-by: Markus <markus@mlet.at>
Co-authored-by: Max Katz <maxkatz6@outlook.com>
Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com>
#Conflicts:
# src/Avalonia.Controls/TextBox.cs
* Ensure to use the appropriate parent when talking with X11 in X11Window
Signed-off-by: Mary Guillemard <mary@mary.zone>
* Translate root window coordinates to window coordinates when setting X11Window.Position
567561e272 caused the origin of window to not be (0, 0) for popups on X.
As a result, all popups were wrongly positioned.
This change Position to translate from root window coordinates (the display space) to parent window coordinates.
Signed-off-by: Mary Guillemard <mary@mary.zone>
---------
Signed-off-by: Mary Guillemard <mary@mary.zone>
* Update VirtualizingCarouselPanel.cs
Changes the calculation of the "forward" flag for the page transition to enable seamless forward and backward transitions.
* Update VirtualizingCarouselPanel.cs
Added Check for more than 2 items in carousel as there is actually no way to determine the correct transition with only 2 items. If there are only 2 items the transition behaviour is not changed.
* Update VirtualizingCarouselPanelTests.cs
Added Unit Tests for cycling through list forward and backward
* Added failing tests for #14456.
And one passing test.
* Handle converted compiled binding nodes...
...without a path. Previously the `convertedNode` was being discarded if the binding node had no arguments or property value assignments.
Fixes#14456
This fixes a case when elements have different widths and the BringIntoView wants to scroll horizontally due to custom TargetRect
Co-authored-by: Max Katz <maxkatz6@outlook.com>
* Delegate focus to TextBox
* Port FocusChanged from AutoCompleteBox to NumericUpDown
* Improve focus with NumericUpDown and ButtonSpinner bindings
---------
Co-authored-by: Max Katz <maxkatz6@outlook.com>
* Add failing test for control visibility changing.
There was already a test for when visibility moves from visible to invisible but we were missing one for the other way around.
* Create peer even for invisible controls.
When an invisible control is encountered, unless a peer is created for it, there is nothing to listen for the `IsVisible` property changing to `true`. Make sure we create a peer even for invisible controls; we just don't add them to the child collection.
Previously, the popupParent was ignored when present causing popups to
have the X root window as its parent.
This cause issues on gamescope (SteamOS session compositor) where that window would end up behind the
main window.
Signed-off-by: Mary Guillemard <mary@mary.zone>
Co-authored-by: Max Katz <maxkatz6@outlook.com>
* Fix TrayIconImpl not disposing WriteableBitmap when it should
* Replace WriteableBitmap with Bitmap in ColorPicker
* Replace ArrayList with PooledList to avoid extra allocations
* Make sure to clean up VisualChildren and created text runs when the TextLayout is invalidate
* Remove localized comment
---------
Co-authored-by: Tim <47110241+timunie@users.noreply.github.com>
#Conflicts:
# src/Avalonia.Controls/TextBlock.cs
* Add StartWithClassicDesktopLifetime overload with a lifetime builder
* Disallow changing Application.ApplicationLifetime after setup was completed
* Avoid static dependency on a singleton lifetime
* Introduce SetupWithClassicDesktopLifetime method
* Move more logic from Start method to Setup
* Add docs
* Avoid public API changes
* Fix tests
* Repalce locator usage with `.UseLifetimeOverride`
---------
Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com>
* [Mac] Check for space key when keyDown isn't consumed
* [Mac] Make sure no text input event is send when a modifier is pressed
* [Mac] Refactor keyDown handling
* Move ignoreUserInput
* Handle keyDown for doCommandSelector
#Conflicts:
# native/Avalonia.Native/src/OSX/AvnView.mm
* Use embed JSON parser instead of Regex while parsing Deps file
* Make RuntimeXamlDiagnostic.Document settable at any time
* Make JSONParser internal
# Conflicts:
# src/Markup/Avalonia.Markup.Xaml/RuntimeXamlLoaderConfiguration.cs
* Don't overwrite IsClipEnabled.
The user should be able to set this on an adorner themselves.
* Use correct clip bounds for adorners.
Only take the adorned visual's clip bounds into account if the adorner is clipped to these bounds.
* Disable clipping on GridSplitter adorner.
Fixes#10700
* Don't clip adorners in ControlCatalog.
Default setting is `true`, but this was being overridden in `AdornerLayer.AddVisualAdorner`. That was fixed by an earlier commit in this PR, so property needs to be set explicitly to false in ControlCatalog.