Steven Kirk
e7e57d0e91
Fix text rendering where TextAlignment != Left.
The renderer was using the wrong bounds for text where `TextAlignment != Left` as seen in #1625 . To fix this, change `FormattedTextImpl.Size` to `Bounds`, which returns a rect that takes into account the text alignment and similarly change `FormattedText.Measure` to return a `Rect` instead of a `Size.
Fixes #1625 .
7 years ago
Steven Kirk
b32a10ceda
Update tests/Avalonia.Layout.UnitTests/LayoutManagerTests.cs
Co-Authored-By: donandren <donandren@gmail.com>
7 years ago
Steven Kirk
9b4bd8d621
Update tests/Avalonia.Layout.UnitTests/LayoutManagerTests.cs
Co-Authored-By: donandren <donandren@gmail.com>
7 years ago
Steven Kirk
260789c425
Update tests/Avalonia.Layout.UnitTests/LayoutManagerTests.cs
Co-Authored-By: donandren <donandren@gmail.com>
7 years ago
Steven Kirk
61be769d61
Update tests/Avalonia.Layout.UnitTests/LayoutManagerTests.cs
Co-Authored-By: donandren <donandren@gmail.com>
7 years ago
Andrey Kunchev
a4132890bf
add unit tests for layout queue
7 years ago
Andrey Kunchev
d53dbe9416
add some more layout manager tests for potential issues with infinity loop and proper work
7 years ago
Wiesław Šoltés
338fe1d5eb
Use thickness instead of width and height
7 years ago
Nikita Tsukanov
2741fec63e
Register cursor factory for tests
7 years ago
Wiesław Šoltés
29cef8a7de
Update FullLayoutTests.cs
7 years ago
wieslawsoltes
5d8c6beed0
Fix tests
7 years ago
wieslawsoltes
1d8ea08d0b
Try to fix tests
7 years ago
Jeremy Koritzinsky
acb3d46ca0
Enable generating NuGet packages via the MSBuild Pack target.
8 years ago
Jeremy Koritzinsky
4ec647b870
Make our unit tests support library (Avalonia.UnitTests) target netstandard2.0 so we don't have to worry about targetting .NET Framework on linux.
8 years ago
Steven Kirk
7ba9d33b0e
Added extra test for Bounds/Margin.
And removed empty test.
8 years ago
Steven Kirk
30e78dc5b6
Only run unit tests on .net core.
This allows us to run them on linux.
8 years ago
Steven Kirk
8a80a724d7
Implement disabling of ListBox scrollbars.
Fixes #1344 .
8 years ago
Steven Kirk
46bcbacc53
Fix layout in ScrollContentPresenter.
- Share common layout logic between `Border`, `ContentPresenter` and `ScrollContentPresenter`
- Added a bunch of tests for things not previously convered
- Fix `ScrollContentPresenter` child layout
8 years ago
Jeremy Koritzinsky
eb7c010462
Retarget .Net Framework projects to 4.7
Works around dotnet/standard#567 .
8 years ago
Steven Kirk
04c489daa5
Make Collection Properties get-only
Fixes #1302 .
8 years ago
Steven Kirk
5cc5b91930
Fix xunit warnings.
8 years ago
Nikita Tsukanov
a4c9f1e400
Make ShapeLayoutTests use MockPlatformRenderInterface
8 years ago
Nikita Tsukanov
913149d093
Switched to .NET Standard 2.0
9 years ago
Eli Arbel
aee42bad6c
Add scroll bar & slider buttons
9 years ago
Steven Kirk
e81b22b9d2
IResourceProvider -> IResourceNode
9 years ago
Steven Kirk
090a1ec8cf
Lazily initialize Styles.
Added an `IStyleHost.IsStylesInitialized` property to prevent the need for allocating empty `Styles` collections for many controls.
9 years ago
Steven Kirk
d1fee611bf
IResourceHost -> IResourceProvider.
9 years ago
Steven Kirk
84aa27162f
Made a start adding Control/Application.Resources.
9 years ago
Steven Kirk
061a264ca4
Don't need to create LayoutManager target.
There is already one on the root.
9 years ago
Steven Kirk
5e3f604308
Removed unnecessary service locator code.
`ILayoutManager` is not longer retrieved from `AvaloniaLocator` so can remove this stuff.
9 years ago
Steven Kirk
188a0ce442
Fix compile errors.
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
ac3ca7ca29
Make LayoutManager pass new tests.
9 years ago
Steven Kirk
309c9f7a4b
Added some LayoutManager tests.
Some passing, some failing.
9 years ago
Wiesław Šoltés
872575b9b7
Set project OutputType
9 years ago
Nikita Tsukanov
eb6bfd3de8
Moved layout manager from service locator to ILayoutRoot
9 years ago
Steven Kirk
4730ee1c41
Fix spelling of descendant.
While "descendent" is an acceptable English spelling, "descendant" is the common spelling.
9 years ago
Steven Kirk
15c3ef499b
Added failing test for #993 .
9 years ago
Steven Kirk
e6cb529878
Ported immutable media impls from scenegraph.
The deferred renderer requires immutable objects for drawing as it
renders on a separate thread.
9 years ago
Steven Kirk
376535b198
Make IFormattedTextImpl immutable.
Previously `IFormattedTextImpl` had `SetForegroundBrush` which set
mutable state. Make `FormattedText` fully mutable (before it was kinda
mutable, kinda immutable) and create immutable `IFormattedTextImpl`s on
demand.
9 years ago
Steven Kirk
4e719262c4
Make WindowBase.IsVisible return correct value.
`WindowBase.IsVisible` now tracks the visibility of the window. Still
needs to call `Show` and `Hide` when changed.
9 years ago
Wiesław Šoltés
3495017a07
Removed project guid
9 years ago
Wiesław Šoltés
ad65b6192e
Moved inports to test projects
9 years ago
Wiesław Šoltés
f8097cc27d
Added msbuild props for package references
9 years ago
Steven Kirk
65dd1a423b
Use the default compile items in unit tests.
For the tests that have been ported to .net core at least.
9 years ago
Nikita Tsukanov
6cf037ad7c
One liners
9 years ago
Nikita Tsukanov
66ac05b2c2
Removed <Name> elements from new projects
9 years ago
Nikita Tsukanov
d1caaaca3e
Removed <Project>
9 years ago
Nikita Tsukanov
886a65beaa
Use dotnet test for layout and controls tests
9 years ago
Nikita Tsukanov
dc8a32d1b1
Run Avalonia.Base.UnitTests using `dotnet test`
9 years ago