16 Commits

Author SHA1 Message Date
Patrik Svensson
52c1d9122b
Add global usings (#668)
* Use global usings

* Fix namespace declarations for test projects
2021-12-23 16:50:31 +01:00
Patrik Svensson
ec1188b837 Use file scoped namespace declarations 2021-12-22 08:51:17 -05:00
Cédric Luthi
a5716a35e2 Future-proof conditional compilation
* Invert `#if NET5_0` conditions so that when adding net6.0 target framework, the _new_ APIs are used.
* Use `NET5_0_OR_GREATER` instead of `NET5_0` to ensure consistent behaviour on future target frameworks.
2021-09-29 10:01:31 +02:00
Ion Dormenco
c147929f16
Add color aliases 2021-05-12 23:44:11 +02:00
Patrik Svensson
fe5096dceb Fixes color system detection bug
If an application runs on Windows 10.0.15063 or above, on a
runtime prior to net5.0, the color system detection will fail
and fall back to 8-bit color support.

The reason for this is because the behavior of
Environment.OSVersion.Version differs between runtimes. Unless you're
running on net5.0, both the major and build version components will
not reflect those in the actual Windows version.
2021-04-07 11:15:45 -04:00
Andreia Gaita
759b16aed9 Fix OS version detection 2021-04-04 09:28:20 -04:00
Phil Scott
c765bbd0dd Uses OSVersion instead of RegEx to detect Windows Build info
Perf improvement.
2021-04-02 18:51:30 +02:00
Patrik Svensson
58400fe74e Fix code generation
Previous changes introduced some bugs to the
code generation scripts and templates, which
now have been fixed.
2021-01-29 21:46:08 +01:00
Patrik Svensson
a23bec4082 Add profile support
Closes #231
2021-01-19 17:53:03 +01:00
Patrik Svensson
eeb3f967b6 Update emoji support
* Add constants for emojis
* Move emoji shortcode rendering to Markup
* Add documentation
* Add example
* Add tests
2020-09-18 16:11:51 +02:00
Patrik Svensson
5d132220ba Enable nullable reference types
Closes #36
2020-08-11 17:24:34 +02:00
AdmiringWorm
2e7b3d520a Update regex to correctly identify Windows 10
When running .NET Core 2.1 or .NET Framework 4.6.1, the used regex for
detecting Windows 10 TrueColor support does not match the OSDescription.
The reason for this is because on those frameworks the description has
trailing whitespaces, but they do not on .NET Core 3.1.
This commit updates the regex to ignore any trailing whitespaces.
2020-08-07 08:11:34 +02:00
Patrik Svensson
e5bf2bd498 Autogenerate known colors and palettes
This will make it a bit easier to make changes
2020-08-03 15:22:39 +02:00
Patrik Svensson
5267ebda49 Get color names from lookup table
Also adds tests for Color struct and fixes a bug
that had to do with equality.
2020-08-03 11:32:17 +02:00
Patrik Svensson
f19202b427 Improve text composite
- A `Text` object should not be able to justify itself.
  All justification needs to be done by a parent.
- Apply colors and styles to part of a `Text` object
- Markup parser should return a `Text` object
2020-08-02 22:45:01 +02:00
Patrik Svensson
334dcddc1a Initial commit 2020-07-21 12:03:41 +02:00