Граф коммитов

25991 Коммитов

Автор SHA1 Сообщение Дата
Nikita Tsukanov 78b0001a74 Changed modifiers for injected non-client implementable method (#16626)
* Changed modifiers for injected non-client implementable method

* Keep internal modifier
2024-10-08 10:42:32 +02:00
Nikita Tsukanov 06f7715fa5 Don't apply our weird window positioning hacks for clicks on traffic lights (#17181)
This hack fixes the minimize problem with macOS 15.0
2024-10-08 09:28:30 +02:00
Steven Kirk c407354b58 Fix context menu keyboard selection. (#16354)
When opening a context menu and pressing the "arrow down" key, the first menu item was not selected. This issue was introduced by #11287. The fix is to make the `ContextMenu` focusable.

Added an integration test to try to prevent regressions.

Co-authored-by: Max Katz <maxkatz6@outlook.com>
2024-07-31 14:18:45 +02:00
Jumar Macato b941a819df Reset scroller valuators on XI2Manager.cs (#16185)
When the focus is lost to avoid instant jumps when coming/scrolling from another linux window.
2024-07-24 13:27:24 +02:00
Steven Kirk 5062f9a358 Make VirtualizingStackPanel better handle container size changes (#16168)
* Add a failing test for #15712.

* Validate StartU at the start of a measure pass.

If any container U size has changed since the last layout pass then `StartU` must be considered unstable as the average container height will have changed.

* Correctly position focused element.

If the focused element has been moved outside the visible viewport due to a realized container size change, then we need to ensure it's positioned correctly.

* We can skip check if StartU is already unstable.

* Don't invalidate virt. panels more than necessary.

* Add another virt panel test.

And revert the expected results for another test to the way they were at the beginning of this PR.

* Tweak container size estimation.

Use the desired size of _measured_ containers instead of the bounds: a layout pass may not had completed on the containers yet, so the bounds may not be up-to-date. Was easier to move the estimation methods out of `RealizedStackElements` and into `VirtualizingStackPanel` itself in order to do this, and arguably makes more sense.
2024-07-24 13:26:55 +02:00
Max Katz 3b5284da16 Fix nunit tests adapter losing async locals (#16157)
* Fix NUnit test context not being properly set

* Add failing tests

* Capture ExecutionContext to keep async locals

* Remove explicit EstablishExecutionEnvironment call, as it was a bad idea

* Make ExecutionContext usage disabled by default, and only enabled for NUnit
2024-07-24 13:26:34 +02:00
Benedikt Stebner f9be42b522 Make sure focus lost is delayed until IMM32 has finished up the composition on kill focus (#15907) 2024-06-12 23:08:51 +02:00
Steven Kirk 21ee489fc6 Fix VirtualizingStackPanel ScrollIntoView (#15449)
* Add more tests for ScrollIntoView.

* Improve ScrollIntoView.

Take into account the element we're scrolling to when calculating the anchor element for realization.
2024-06-12 23:08:40 +02:00
Nikita Tsukanov d719dd21fe Create a new run loop observer for a nested loop if it's being started from an observer callback (#15425)
Co-authored-by: Nikita Tsukanov <kekekeks@Nikitas-MacBook-Pro.local>
2024-06-12 23:08:23 +02:00
Max Katz 6471650310 Implement MacOSProperties.IsTemplateIcon attached property on TrayIcon (#14348)
* Implement MacOS.IsTemplateIcon attached property on TrayIcon

* Use MacOS.IsTemplateIcon in the ControlCatalog

* Rename MacOS to MacOSProperties

* Extract IsTemplateIcon to ITrayIconWithIsTemplateImpl
2024-06-12 23:07:45 +02:00
Ilya Pospelov 75aea9d1db
Backport fix NullReferenceException in X11Window.Activate (#14787) 2024-03-04 18:27:45 -08:00
Max Katz f95a329981 Revert single new test, as necessary API wasn't backported 2024-02-26 19:51:33 -08:00
Nikita Tsukanov b229779fb3 GPU interop features now don't require to skip the first frame and available earlier in general (#14651)
# Conflicts:
#	src/iOS/Avalonia.iOS/Platform.cs
2024-02-23 17:16:22 -08:00
Benedikt Stebner 760c6749d0 Recreate TextLayout on measure to make sure constraint is updated (#14705)
* Recreate TextLayout on measure to make sure constraint is updated

* Add failing test
2024-02-23 17:13:20 -08:00
Max Katz 9fcf022358 Manual backport of WindowImpl 11.0 changes 2024-02-22 20:16:16 -08:00
Steven Kirk 426d0f134a Use dynamic resources in expander button theme. (#14542)
I'm not sure why, but the fluent `Expander` theme uses a mix of static and dynamic resources with seemingly no reason to differentiate them? It's not so much a problem for the resources in the default values for `Expander` as these can be overridden with local values, but for the toggle button and trigger styles, it means there's no way to customize these values.

Converted all of the `StaticResource`s to `DynamicResource`s.
2024-02-22 15:46:23 -08:00
Benedikt Stebner 2d898139aa Fix InlinesCollection Logical/VisualParent update (#14679)
* Add failing test

* Update Visual/LogicalTree when parents change
#Conflicts:
#	src/Avalonia.Controls/Documents/InlineCollection.cs
2024-02-22 15:49:23 -08:00
Ge 833af16021 Fixes improper IME composition ignorance (#14664) 2024-02-22 15:46:23 -08:00
Benedikt Stebner 998b7a8e9c Fix initial selection for AlwaysSelected (#14668)
#Conflicts:
#	tests/Avalonia.Controls.UnitTests/TabControlTests.cs
2024-02-22 15:46:51 -08:00
Bas 027d1eac93 added _windowProperties override (#14649) 2024-02-20 12:42:32 -08:00
Donzasto 04d9d37f10 Fix TextBlock wrong caret position (#14627) 2024-02-20 12:42:32 -08:00
Dan Walmsley 5b1043fe8a Add icon and trayicon to the integration test app, so that loading icons will be tests. (#14593)
Co-authored-by: Max Katz <maxkatz6@outlook.com>
2024-02-20 12:42:32 -08:00
Benedikt Stebner 406a5feb89 Fix InlineUIContainer focus (#14590)
* Fix TextBlock MeasureOverride visual child handling

* Make sure InlineUIContainer's child retains focus on measure

* Resolve merge error
#Conflicts:
#	src/Avalonia.Controls/TextBlock.cs
2024-02-20 12:44:17 -08:00
Steven Kirk 3d5014400c Move ScrollInfoView into ItemsControl. (#14538)
Fixes #14524
2024-02-20 12:42:32 -08:00
Nikita Tsukanov 7dc9ff8a4e Fixes/revert x11 popup changes (#14573)
* Revert "Fix popups position on X11 (#14551)"

This reverts commit 06f88f6e00.

* Revert "Use popupParent as X11 parent window (#14366)"

This reverts commit 0bde86b457.
2024-02-10 16:36:17 +06:00
Max Katz b1670ab2c7 Fix not handling first window creation (#14553) 2024-02-08 18:09:52 -08:00
Max Katz 0c4b19b247 Fix previewer sometimes not finding deps file (#14552) 2024-02-08 18:09:52 -08:00
markl65536 8434202629 Discard additional lines upon inserting when AcceptsReturn=false (#14173)
* 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
2024-02-08 18:11:51 -08:00
Mary Guillemard eea1a339dc Fix popups position on X11 (#14551)
* 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>
2024-02-08 18:09:52 -08:00
workgroupengineering 1a89228a00 fix(Browser): Handle mouse wheel coordinates. (#14533) 2024-02-08 18:09:52 -08:00
Max Katz 1a7a99c05e Avoid NRE from GetGlyphPath (#14530)
Co-authored-by: Jumar Macato <16554748+jmacato@users.noreply.github.com>
2024-02-08 18:09:52 -08:00
Nikita Tsukanov 8a540e3165 Fix bitmap->icon conversion? (#13445) 2024-02-08 18:09:52 -08:00
Max Katz 1bc946d14d Adjust ApiDiffHelper 2024-02-07 22:17:29 -08:00
Benedikt Stebner 84e2fa9628 Correctly compare source and destination pixel format (#12940) 2024-02-07 20:08:26 -08:00
Max Katz b0f6313027 Revert accidental breaking Android/iOS change 2024-02-07 19:43:43 -08:00
Benedikt Stebner 503e49f4a1 Introduce PixelFormatWriter (#12807)
Introduce PixelFormatTranscoder
Introduce Bitmap.CopyPixels that transcodes pixel and alpha format
2024-02-07 19:14:25 -08:00
Max Katz a0d4bfc57a Remove code branch that shouldn't be a part of 11.0.x 2024-02-07 19:06:10 -08:00
LuckyGeorge1975 d6f7ca0bda Fix: Enable seamless forward and backward transition in VirtualizingCarouselPanel (#14125)
* 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
2024-02-07 18:54:04 -08:00
Max Katz 98c329fc67 Fix DevTools popup freezing (#14462) 2024-02-07 18:54:04 -08:00
Steven Kirk b8683229b9 Fix CompiledBinding with RelativeSource/ElementName but no Path (#14514)
* 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
2024-02-07 18:54:04 -08:00
Bartosz Korczyński 873bb90ef9 Double BringIntoView in VirtualizingStackPanel (#14419)
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>
2024-02-07 18:54:04 -08:00
Lubomir Tetak 98304bce6f Prevent random dispatcher deadlocks (#14229)
Co-authored-by: Lubomir Tetak <l.tetak.ext@sportradar.com>
2024-02-07 18:54:04 -08:00
Dan Walmsley d11f5f314f fix macos crash at startup by not parsing all app arguments into uris. (#14494) 2024-02-07 18:54:04 -08:00
Magnus Lindhe 8d87c36901 Improve NumericUpDown and AutoCompleteBox focusability (#13376)
* 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>
2024-02-07 18:54:04 -08:00
KrzysztofDusko 3433a6aa6d Removes hard-coded Grid.RowSpan and Grid.ColumnSpan from FluentTheme in Data grid - based on #12301 (#14460) 2024-02-07 18:54:04 -08:00
Emmanuel Hansen f715ba2d9c ignore frame extents if window has no decorations (#14441) 2024-02-07 18:54:04 -08:00
Dávid Szabó 275e279247 Fix Windows 7 'api-ms-win-core-winrt-string-l1-1-0.dll' error (#14436) 2024-02-07 18:54:04 -08:00
Ildar Khusnutdinov e032f08b57 EnableDataValidation for DatePicker (#14430) 2024-02-07 18:54:04 -08:00
Steven Kirk 611c45db16 Fix controls not showing up in accessibility when made visibile (#14424)
* 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.
2024-02-07 18:54:04 -08:00
Benedikt Stebner 8a19c6f2e0 [Mac] Make sure emulated text input is generated after key down (#14407)
* [Mac] Make sure emulated text input is generated after key down

* Don't send AvnKeyEnter as line breaks

* Revert some changes
2024-02-07 18:54:04 -08:00