SettingsSelectionChrome
One rule for "this is the option you picked", across every selectable control DroppyKit publishes.
enum SettingsSelectionChrome
Type properties
disabledSelectedFill
static let disabledSelectedFill: Color
disabledSelectedOpacity
static let disabledSelectedOpacity: Double
emphasizedPrimaryText
static let emphasizedPrimaryText: Color
hoverAccentTint
static let hoverAccentTint: Double
Same, while the pointer is over the selected object.
pressedFill
static let pressedFill: Color
primaryText
static let primaryText: Color
raisedFill
static let raisedFill: Color
restAccentTint
static let restAccentTint: Double
Accent fraction composited over the emphasis fill on a selected object at rest.
segmentGlyphFont
static let segmentGlyphFont: Font
selectedBaseFill
static let selectedBaseFill: Color
trackFill
static let trackFill: Color
trackInsetRatio
static let trackInsetRatio: CGFloat
Inset between a segmented track's outer edge and its selection pill, as a RATIO of the track height (10%, from the host's 3pt inset on its 30pt card-row control tier). Taking the ratio rather than the number is what keeps the pill reading as the same object on the 34pt full-width track.
Type methods
accentTintOpacity(isSelected:isEnabled:isHovering:)
static func accentTintOpacity(isSelected: Bool, isEnabled: Bool, isHovering: Bool) -> Double
disabledSelectedFill(_:)
static func disabledSelectedFill(_ scheme: ColorScheme) -> Color
A selected object whose control is disabled: still the emphasis material, dimmed, never the unselected fill, or a disabled picker stops saying which option is active.
emphasizedPrimaryText(_:)
static func emphasizedPrimaryText(_ scheme: ColorScheme) -> Color
Text inside an emphasized surface, inverted against its fill.
labelColor(isSelected:isEnabled:)
static func labelColor(isSelected: Bool, isEnabled: Bool) -> Color
Label / glyph colour for one option. Selected inverts against its own pill; unselected recedes to 0.62, because with a solid pill marking the choice an almost-full-strength unselected segment competes with it.
onSurfaceLabelColor(isSelected:isEnabled:)
static func onSurfaceLabelColor(isSelected: Bool, isEnabled: Bool) -> Color
Label colour for text that NAMES a selected object without sitting on it, such as a caption under a tile. It must never invert: it is printed on the card, not on the pill.
pillFits(trackHeight:cornerRadius:)
static func pillFits(trackHeight: CGFloat, cornerRadius: CGFloat) -> Bool
True when a selection pill of trackHeight, inset by trackInset(forTrackHeight:), is fully inside a track corner of cornerRadius. The pill's corner arc is centred at (h/2, h/2) and the track's at (R, R), so containment is |h/2 - R| * sqrt(2) <= R - (h/2 - inset).
pillShape()
static func pillShape() -> Capsule
The selection pill's shape. A capsule, always.
pressedFill(_:)
static func pressedFill(_ scheme: ColorScheme) -> Color
Press fill on an UNSELECTED segment.
primaryText(_:)
static func primaryText(_ scheme: ColorScheme) -> Color
raisedFill(_:)
static func raisedFill(_ scheme: ColorScheme) -> Color
Hover lift on an UNSELECTED segment.
segmentFont(isSelected:)
static func segmentFont(isSelected: Bool) -> Font
selectedBaseFill(_:)
static func selectedBaseFill(_ scheme: ColorScheme) -> Color
THE rule: attention is a solid opaque capsule at the far end of the contrast range from its surface. White on a dark canvas, near-black on a light one. The same idea spelled with the other extreme, never the same white dimmed.
trackFill(_:)
static func trackFill(_ scheme: ColorScheme) -> Color
The quiet track a segmented row rests in.
trackInset(forTrackHeight:)
static func trackInset(forTrackHeight trackHeight: CGFloat) -> CGFloat
unselectedFill(isEnabled:isHovering:isPressed:)
static func unselectedFill(isEnabled: Bool, isHovering: Bool, isPressed: Bool = false) -> Color