Struct ScyllaUIAspectBreakpoint
Aspect-ratio breakpoint used by ScyllaUILayoutStyle to override a base style's padding, spacing, and alignment when the current viewport aspect ratio matches a designer-configured threshold. Conceptually analogous to a CSS media query.
Inherited Members
Namespace: Scylla.Core.Util.UI
Assembly: ScyllaCore.dll
Syntax
[Serializable]
public struct ScyllaUIAspectBreakpoint
Remarks
Breakpoints are evaluated by ascending MinAspectRatio; the highest threshold less than or equal to the current width/height ratio wins. Aspect ratios are plain floats (dimensionless) so percent values are not meaningful here.
A breakpoint only carries override values for the properties marked active by
its Override* flags. Unchecked properties pass the base style value
through unchanged.
Fields
AlignmentOverride
Main-axis alignment value used when OverrideAlignment is true
and the viewport aspect ratio meets the breakpoint threshold. This field is ignored
when OverrideAlignment is false.
Declaration
public ScyllaUIAlignment AlignmentOverride
Field Value
| Type | Description |
|---|---|
| ScyllaUIAlignment |
MinAspectRatio
Minimum aspect ratio (width / height) at which this breakpoint applies. A
breakpoint matches the current viewport when the viewport aspect ratio is
greater than or equal to this value. Common reference values: 0.5
(portrait phone), 1.0 (square), 1.78 (16:9 widescreen),
2.33 (21:9 ultrawide).
Declaration
[Tooltip("Breakpoint matches when viewport width/height ratio is >= this value.")]
public float MinAspectRatio
Field Value
| Type | Description |
|---|---|
| float |
OverrideAlignment
When true, AlignmentOverride replaces the style's base
main-axis alignment for any viewport that matches this breakpoint. When false,
ResolveAlignment(float) passes the base
Alignment value through unchanged.
Declaration
[Tooltip("If true, replace the base style's alignment with AlignmentOverride.")]
public bool OverrideAlignment
Field Value
| Type | Description |
|---|---|
| bool |
OverridePadding
When true, PaddingOverride replaces the style's base padding
for any viewport that matches this breakpoint. When false,
ResolvePadding(float) passes the base
Padding value through unchanged regardless of
what PaddingOverride contains.
Declaration
[Tooltip("If true, replace the base style's padding with PaddingOverride.")]
public bool OverridePadding
Field Value
| Type | Description |
|---|---|
| bool |
OverrideSpacing
When true, SpacingOverride replaces the style's base spacing
for any viewport that matches this breakpoint. When false,
ResolveSpacing(float) passes the base
Spacing value through unchanged.
Declaration
[Tooltip("If true, replace the base style's spacing with SpacingOverride.")]
public bool OverrideSpacing
Field Value
| Type | Description |
|---|---|
| bool |
PaddingOverride
Per-edge padding values used when OverridePadding is true and
the viewport aspect ratio meets the breakpoint threshold. Uses the same
ScyllaUIEdgeInsets type as Padding.
This field is ignored when OverridePadding is false.
Declaration
public ScyllaUIEdgeInsets PaddingOverride
Field Value
| Type | Description |
|---|---|
| ScyllaUIEdgeInsets |
SpacingOverride
Main-axis spacing value used when OverrideSpacing is true and
the viewport aspect ratio meets the breakpoint threshold. Uses the same
ScyllaUILength type as Spacing.
This field is ignored when OverrideSpacing is false.
Declaration
public ScyllaUILength SpacingOverride
Field Value
| Type | Description |
|---|---|
| ScyllaUILength |