Julien Lebosquain
5e13c5b59a
Implemented layout and render time graph overlays
3 years ago
Steven Kirk
ec74057151
Removed a number of interfaces.
`IAvaloniaObject`, `IControl`, `ILayoutable`, `IPanel`, `IStyledElement`, `IVisual`.
3 years ago
Takoooooo
825fcfab31
Remove obsolete members from Avalonia.Base namespace
4 years ago
Lubomir Tetak
22971f56cb
EffectiveViewportChangedListeners must be reference type
4 years ago
Lubomir Tetak
230166d0bc
EffectiveViewportChangedListeners thread safety improved
4 years ago
Dan Walmsley
96931e2203
prevent excess layout passes in layout manager to catch other scenarios causing
excessive layout passes.
4 years ago
Steven Kirk
fb0da85ad3
Merge core libraries. ( #5831 )
* Merge core libraries.
Everything below `Avalonia.Controls` into `Avalonia.Base`.
* Move new files to correct place.
* Removed unused dirs/projects,
* Removed outdated references from theme assemblies.
* Merge unit tests to match new assembly layout.
* Fixup test namespaces.
* Make directory match namespace.
* Move files to match namespace.
* Move files to match namespace.
* Fix up incorrect namespace.
`Avalonia.Visuals.Media.Imaging` -> `Avalonia.Media.Imaging`.
* Fix resource URL.
* Removed outdated dependencies.
* Added missing project reference.
* Update test namespaces.
* Fix merge error.
* Fix merge errors.
* Fix bad merge in WindowsInteropTest.csproj.
* Fix up merge errors in csprojs.
* Remove merged tests from nuke.
* Fix up namespace.
* Fix compile error.
* Fix failing tests.
Now that more unit tests are present in Avalonia.Base.UnitTests, general `AvaloniaObject` properties are getting registered. Ignore those.
Co-authored-by: Jumar Macato <16554748+jmacato@users.noreply.github.com>
4 years ago
Steven Kirk
f20039070d
Fix a couple of bugs in LayoutManager.
- Clear `_running` at the end of all layout passes, not at the end of the first set of 3 attempts
- Fix a bizarre anti-copy-pasta in `RaiseEffectiveViewportChanged` where we were comparing `startCount` to the size of the measure queue twice instead of the arrange queue
6 years ago
Steven Kirk
13d828cdcc
Duplicate listeners before raising EffectiveViewportChanged.
6 years ago
Steven Kirk
02b2f3dc15
Remove listeners backwards in case of duplicates.
6 years ago
Steven Kirk
64174f37af
Tweak effective viewport calculation.
This logic isn't in the UWP version as it only clips to scrollports.
6 years ago
Steven Kirk
d0e74b7dbd
Include transforms in effective bounds.
6 years ago
Steven Kirk
b5da0310f1
Update tests from UWP tests.
UWP tests are at: https://github.com/grokys/EffectiveBoundsTestsUWP
Try to make the Avalonia tests match them as closely as possible in order to easily port them across.
6 years ago
Steven Kirk
9c7aeaf713
Initial implementation of EffectiveViewportChanged.
6 years ago
Steven Kirk
2807cbe6cb
Make LayoutManager disposable.
And dispose it on `TopLevel` close: this allows layout passes to be run before a window/popup is shown but prevents it being run after close.
6 years ago
Steven Kirk
536a2f7c62
Check correct root in invalidation calls.
6 years ago
Steven Kirk
7694fc0484
Don't run layout passes on hidden TopLevels.
To do this we need to pass the root to `LayoutManager`.
Fixes #4161
6 years ago
Dariusz Komosinski
57ea1d502c
Mark LayoutManager public functions as virtual so users can adjust the behavior.
6 years ago
Steven Kirk
479d480ad9
Parameterize logger on area as well as level.
So we can filter our more logging calls early.
6 years ago
Steven Kirk
d46265233d
Raise LayoutUpdated at the end of layout pass.
This attempts to match the behavior of `LayoutUpdated` in WPF and UWP.
6 years ago
Steven Kirk
e209307931
Added nullable annotations.
6 years ago
Steven Kirk
4d01dacd77
Remove copyright headers.
Some of our files had them, some didn't. They serve no purpose legally so best to remove the ceremony.
6 years ago
Steven Kirk
d5fc004df0
Prevent reentrancy in ExecuteInitialLayoutPass.
Fixes #3550 .
6 years ago
Dariusz Komosinski
5ee8b01808
Fix typo.
6 years ago
Dariusz Komosinski
2b05319b6b
Remove unnecessary allocations from the layout loop.
6 years ago
Dariusz Komosinski
5814bd7163
Remove direct logging functions.
6 years ago
Dariusz Komosinski
01a404836e
Reduce allocations caused by logging.
6 years ago
Andrey Kunchev
6d7d051f3e
extract layoutqueue to separate file
7 years ago
Andrey Kunchev
b97b3c5935
make internal stored Info a strcut to optimize memory (pr note)
7 years ago
Andrey Kunchev
8c07461323
LayoutManager InfinityLoop protection and safety improvements
7 years ago
Miha Markič
0a38876590
Spellchecks all projects except for Base, Controls, Samples and Testing
8 years ago
Steven Kirk
64ed0761c7
Rename Dispatcher invoke methods.
`InvokeAsync` -> `Post`
`InvokeTaskAsync` -> `InvokeAsync`
8 years ago
Nikita Tsukanov
70c24908a9
Various fixes for GTK and DeferredRenderer support
8 years ago
Dan Walmsley
71dff48a7a
add fix for null reference exception when arranging.
added comments explaining the conditions that the bug occurs in.
(cherry picked from commit fa1f5bc8f9 )
9 years ago
Nikita Tsukanov
abf866cf61
Fixes to get it working again after merge
9 years ago
Steven Kirk
ab30fd343b
Handle no previous measure/arrange.
This shouldn't happen, but if it does, don't crash.
9 years ago
Steven Kirk
40c342989b
Assert control invalidation behavior.
Controls not attached to the visual tree should not notify the `LayoutManager` that they have had their layout invalidated. Similarly when added to the visual tree their parents and themselves should have their layout invalidated.
9 years ago
Steven Kirk
18f9e2840d
Explain the algoithm a bit.
9 years ago
Steven Kirk
a1d46a7784
Use a stack instead of HashSet.
Controls that are already invalid will not invalidate themselves again to with the `LayoutManager`, so we don't need to worry about duplicates.
9 years ago
Steven Kirk
f97ebe961b
Fixed some stupid mistakes in algorithm.
9 years ago
Steven Kirk
ac3ca7ca29
Make LayoutManager pass new tests.
9 years ago
Nikita Tsukanov
09c9d7b7d5
Layout integration seems to be working now
9 years ago
Nikita Tsukanov
00fbc5cea7
Use (0, 0) as default for non-existing PreviousMeasure
9 years ago
Nikita Tsukanov
eb6bfd3de8
Moved layout manager from service locator to ILayoutRoot
9 years ago
Steven Kirk
7067fa0146
Cross-axis scrolling for virtualized lists.
There are still a few bugs around scrollbar behavior, and maybe Grid. To
see them, add a long item in the middle of VirtualizationTest's items,
resize the window to require a scrollbar and scroll up and down.
10 years ago
Steven Kirk
8ed3a7bc7c
Fix copy/paste error in LayoutManager.
Fixes test previously added.
10 years ago
Steven Kirk
8e6976a0da
Tweak measure/arrange algorithm.
To ensure that parent controls are measured/arranged before children.
10 years ago
Steven Kirk
5be41985c3
Renamed Perspex -> Avalonia
10 years ago
Steven Kirk
ea6b1d4cfd
Starting removing hard dependency on Serilog.
Instead log through a static Logger, and provide a Serilog consumer for
this.
10 years ago
Michael Mayfield
645d76c725
Improve rendering when resizing
10 years ago