Repository navigation
feat: Support Themes DefaultDensity and DefaultCornerRadius properties - #1589
Conversation
…and DefaultCornerRadius properties
There was a problem hiding this comment.
Pull request overview
This PR bumps Uno Toolkit to the 9.0 line and aligns it with Uno Themes 7.0 by refactoring toolkit theme wrappers to inherit directly from the underlying Uno Themes, while updating package management and documentation for the new design-token customization surface.
Changes:
- Update versioning and central package versions to use Uno Themes
7.0.0-dev.29and start the9.0-dev.*prerelease line. - Refactor
MaterialToolkitThemeandSimpleToolkitThemeto inherit fromMaterialTheme/SimpleThemeand remove the toolkit’sBaseToolkitTheme. - Update migration/getting-started docs to describe new theme properties (e.g.,
DefaultDensity,DefaultCornerRadius) and URI changes for generated merged dictionaries.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| version.json | Bumps repo version to 9.0-dev.{height}. |
| src/Uno.Toolkit.UI/Uno.Toolkit.WinUI.csproj | Removes direct Uno.Themes.WinUI reference from the base WinUI toolkit package. |
| src/Uno.Toolkit.UI/Themes/BaseToolkitTheme.cs | Deletes toolkit-owned theme wrapper base class as themes now inherit directly from Uno Themes. |
| src/library/Uno.Toolkit.Simple/SimpleToolkitTheme.cs | Switches toolkit theme to derive from SimpleTheme and adds toolkit resource merges via GenerateSpecificResources(). |
| src/library/Uno.Toolkit.Material/MaterialToolkitTheme.cs | Switches toolkit theme to derive from MaterialTheme and adds toolkit resource merges via GenerateSpecificResources(). |
| src/Directory.Packages.props | Updates Uno Themes version and centralizes Uno.Simple.WinUI to use $(UnoThemesVersion). |
| samples/Directory.Packages.props | Updates sample Uno Themes version to match 7.0.0-dev.29. |
| doc/uno-toolkit-migration.md | Adds/updates Toolkit 9.0 migration guidance for the new theme system and design tokens. |
| doc/simple-getting-started.md | Updates Simple getting-started docs to document DefaultDensity / DefaultCornerRadius and related guidance. |
| doc/material-getting-started.md | Updates Material getting-started docs to document DefaultDensity / DefaultCornerRadius. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-1589.eastus2.azurestaticapps.net |
1 similar comment
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-1589.eastus2.azurestaticapps.net |
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-1589.eastus2.azurestaticapps.net |
This pull request updates Uno Toolkit to version 9.0, introducing significant changes to theme customization and dependency management. The most important updates are the adoption of Uno Themes 7.0, a new unified design-token system, and the refactoring of theme classes to inherit directly from their underlying themes. This brings new properties for density and corner radius customization, changes to resource dictionary URIs, and the removal of the toolkit's
BaseToolkitThemein favor of direct inheritance. Documentation is updated to reflect all these changes.Theme System and API Changes
MaterialToolkitThemeand the newSimpleToolkitThemenow inherit directly from their underlying themes (MaterialThemeandSimpleTheme), exposing all theme properties (such asColors,DefaultDensity,DefaultCornerRadius, and font/color overrides) directly and removing the need for the toolkit's ownBaseToolkitThemeclass. This simplifies theme initialization and customization. [1] [2] [3]Colorsproperty is introduced as the recommended way to customize theme colors, supporting seed color generation and override dictionaries. Legacy override properties are routed through this new property.Design Token Customization
MaterialToolkitThemeandSimpleToolkitTheme) now exposeDefaultDensityandDefaultCornerRadiusproperties, allowing control over base spacing and corner radius units. Documentation is updated to describe these properties and their effects. [1] [2] [3] [4]Dependency and Package Updates
7.0.0-dev.29and ensures that package references are consistent and centrally managed. [1] [2] [3] [4]Uno.Themes.WinUIin the toolkit project file, relying on the new inheritance and package structure.Documentation Improvements
These changes modernize the theme system, improve customization, and streamline the codebase for future development.