Class

WindowAlignmentMarginPosition.Horizontal

A MenuPosition.Horizontal which horizontally aligns the menu within the window according to the given alignment.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free
Common
data class Horizontal(private val alignment: Alignment.Horizontal, private val margin: Int) :
        MenuPosition.Horizontal

A MenuPosition.Horizontal which horizontally aligns the menu within the window according to the given alignment.

The resulting x position will be coerced so that the menu remains within the area inside the given margin from the left and right edges of the window. If this is not possible, i.e., the menu is too wide, then it is centered horizontally instead.