Skip to content

Commit

Permalink
feat: add lightweight styling to checkbox
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyeenvy committed Jul 14, 2023
1 parent cd955fe commit 3fc1611
Showing 1 changed file with 74 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#endif
using Microsoft.UI.Xaml.Media;
using Uno.Extensions.Markup.Internals;
using Microsoft.UI.Xaml;

namespace Uno.Themes.Markup
{
Expand Down Expand Up @@ -133,43 +134,55 @@ public static class BorderBrush
public static ResourceValue<Brush> IndeterminateDisabled => new("CheckBoxBorderBrushIndeterminateDisabled", true);
}

public static class GlyphForeground
public static class Glyph
{
[ResourceKeyDefinition(typeof(Brush), "CheckBoxGlyphForegroundUnchecked")]
public static ResourceValue<Brush> Unchecked => new("CheckBoxGlyphForegroundUnchecked", true);
public static class Foreground
{
[ResourceKeyDefinition(typeof(Brush), "CheckBoxGlyphForegroundUnchecked")]
public static ResourceValue<Brush> Unchecked => new("CheckBoxGlyphForegroundUnchecked", true);

[ResourceKeyDefinition(typeof(Brush), "CheckBoxGlyphForegroundUncheckedPointerOver")]
public static ResourceValue<Brush> UncheckedPointerOver => new("CheckBoxGlyphForegroundUncheckedPointerOver", true);
[ResourceKeyDefinition(typeof(Brush), "CheckBoxGlyphForegroundUncheckedPointerOver")]
public static ResourceValue<Brush> UncheckedPointerOver => new("CheckBoxGlyphForegroundUncheckedPointerOver", true);

[ResourceKeyDefinition(typeof(Brush), "CheckBoxGlyphForegroundUncheckedPressed")]
public static ResourceValue<Brush> UncheckedPressed => new("CheckBoxGlyphForegroundUncheckedPressed", true);
[ResourceKeyDefinition(typeof(Brush), "CheckBoxGlyphForegroundUncheckedPressed")]
public static ResourceValue<Brush> UncheckedPressed => new("CheckBoxGlyphForegroundUncheckedPressed", true);

[ResourceKeyDefinition(typeof(Brush), "CheckBoxGlyphForegroundUncheckedDisabled")]
public static ResourceValue<Brush> UncheckedDisabled => new("CheckBoxGlyphForegroundUncheckedDisabled", true);
[ResourceKeyDefinition(typeof(Brush), "CheckBoxGlyphForegroundUncheckedDisabled")]
public static ResourceValue<Brush> UncheckedDisabled => new("CheckBoxGlyphForegroundUncheckedDisabled", true);

[ResourceKeyDefinition(typeof(Brush), "CheckBoxGlyphForegroundChecked")]
public static ResourceValue<Brush> Checked => new("CheckBoxGlyphForegroundChecked", true);
[ResourceKeyDefinition(typeof(Brush), "CheckBoxGlyphForegroundChecked")]
public static ResourceValue<Brush> Checked => new("CheckBoxGlyphForegroundChecked", true);

[ResourceKeyDefinition(typeof(Brush), "CheckBoxGlyphForegroundCheckedPointerOver")]
public static ResourceValue<Brush> CheckedPointerOver => new("CheckBoxGlyphForegroundCheckedPointerOver", true);
[ResourceKeyDefinition(typeof(Brush), "CheckBoxGlyphForegroundCheckedPointerOver")]
public static ResourceValue<Brush> CheckedPointerOver => new("CheckBoxGlyphForegroundCheckedPointerOver", true);

[ResourceKeyDefinition(typeof(Brush), "CheckBoxGlyphForegroundCheckedPressed")]
public static ResourceValue<Brush> CheckedPressed => new("CheckBoxGlyphForegroundCheckedPressed", true);
[ResourceKeyDefinition(typeof(Brush), "CheckBoxGlyphForegroundCheckedPressed")]
public static ResourceValue<Brush> CheckedPressed => new("CheckBoxGlyphForegroundCheckedPressed", true);

[ResourceKeyDefinition(typeof(Brush), "CheckBoxGlyphForegroundCheckedDisabled")]
public static ResourceValue<Brush> CheckedDisabled => new("CheckBoxGlyphForegroundCheckedDisabled", true);
[ResourceKeyDefinition(typeof(Brush), "CheckBoxGlyphForegroundCheckedDisabled")]
public static ResourceValue<Brush> CheckedDisabled => new("CheckBoxGlyphForegroundCheckedDisabled", true);

[ResourceKeyDefinition(typeof(Brush), "CheckBoxGlyphForegroundIndeterminate")]
public static ResourceValue<Brush> Indeterminate => new("CheckBoxGlyphForegroundIndeterminate", true);
[ResourceKeyDefinition(typeof(Brush), "CheckBoxGlyphForegroundIndeterminate")]
public static ResourceValue<Brush> Indeterminate => new("CheckBoxGlyphForegroundIndeterminate", true);

[ResourceKeyDefinition(typeof(Brush), "CheckBoxGlyphForegroundIndeterminatePointerOver")]
public static ResourceValue<Brush> IndeterminatePointerOver => new("CheckBoxGlyphForegroundIndeterminatePointerOver", true);
[ResourceKeyDefinition(typeof(Brush), "CheckBoxGlyphForegroundIndeterminatePointerOver")]
public static ResourceValue<Brush> IndeterminatePointerOver => new("CheckBoxGlyphForegroundIndeterminatePointerOver", true);

[ResourceKeyDefinition(typeof(Brush), "CheckBoxGlyphForegroundIndeterminatePressed")]
public static ResourceValue<Brush> IndeterminatePressed => new("CheckBoxGlyphForegroundIndeterminatePressed", true);
[ResourceKeyDefinition(typeof(Brush), "CheckBoxGlyphForegroundIndeterminatePressed")]
public static ResourceValue<Brush> IndeterminatePressed => new("CheckBoxGlyphForegroundIndeterminatePressed", true);

[ResourceKeyDefinition(typeof(Brush), "CheckBoxGlyphForegroundIndeterminateDisabled")]
public static ResourceValue<Brush> IndeterminateDisabled => new("CheckBoxGlyphForegroundIndeterminateDisabled", true);
[ResourceKeyDefinition(typeof(Brush), "CheckBoxGlyphForegroundIndeterminateDisabled")]
public static ResourceValue<Brush> IndeterminateDisabled => new("CheckBoxGlyphForegroundIndeterminateDisabled", true);
}

public static class PathData
{
[ResourceKeyDefinition(typeof(string), "CheckBoxHyphenGlyphPathData")]
public static ResourceValue<string> Hyphen => new("CheckBoxHyphenGlyphPathData", true);

[ResourceKeyDefinition(typeof(string), "CheckBoxCheckGlyphPathData")]
public static ResourceValue<string> Check => new("CheckBoxCheckGlyphPathData", true);
}
}

public static class Typo
Expand All @@ -189,6 +202,42 @@ public static class Typo
[ResourceKeyDefinition(typeof(double), "CheckBoxCharacterSpacing")]
public static ResourceValue<double> CharacterSpacing => new("CheckBoxCharacterSpacing", true);
}

public static class FocusArea
{
public static class Size
{
[ResourceKeyDefinition(typeof(double), "CheckBoxFocusAreaSize")]
public static ResourceValue<double> Default => new("CheckBoxFocusAreaSize", true);
}
}

public static class CheckArea
{
public static class Size
{
[ResourceKeyDefinition(typeof(double), "CheckBoxCheckAreaSize")]
public static ResourceValue<double> Default => new("CheckBoxCheckAreaSize", true);
}

public static class Length
{
[ResourceKeyDefinition(typeof(GridLength), "CheckBoxCheckAreaLength")]
public static ResourceValue<GridLength> Default => new("CheckBoxCheckAreaLength", true);
}

public static class CornerRadiuses
{
[ResourceKeyDefinition(typeof(CornerRadius), "CheckBoxCheckAreaCornerRadius")]
public static ResourceValue<CornerRadius> Default => new("CheckBoxCheckAreaCornerRadius", true);
}

public static class BorderThickness
{
[ResourceKeyDefinition(typeof(Thickness), "CheckBoxCheckAreaBorderThickness")]
public static ResourceValue<Thickness> Default => new("CheckBoxCheckAreaBorderThickness", true);
}
}
}
}
}
Expand Down

0 comments on commit 3fc1611

Please sign in to comment.