enum

Phosphor::Flex

Inherits Enum < Comparable < Value < Object

Controls how Layout#split distributes items within the space left over after every Constraint has been satisfied. Useful for centering a fixed widget or adding equal gaps between toolbar buttons.

See DESIGN.md § "Layout and Constraint" for the full rationale.

Constants

Start = 0

Items packed to the start of the axis. The default — matches the existing left/top-aligned behavior, so no layout needs updating to adopt Flex.

End = 1

Items packed to the end of the axis.

Center = 2

Items centered in the available space.

SpaceBetween = 3

Equal space inserted between items; none at the outer edges.

SpaceAround = 4

Equal space added around each item, so edges get half the gap that appears between items.

Instance methods

center?

Returns true if this enum value equals Center

Source
end?

Returns true if this enum value equals End

Source
space_around?

Returns true if this enum value equals SpaceAround

Source
space_between?

Returns true if this enum value equals SpaceBetween

Source
start?

Returns true if this enum value equals Start

Source