### Enumeration

# Gtk Align

#### Declaration

    enum Gtk.Align

#### Description [src]

Controls how a widget deals with extra space in a single dimension.

Alignment only matters if the widget receives a “too large” allocation, for example if you packed the widget with the `GtkWidget:hexpand` property inside a `GtkBox`, then the widget might get extra space. If you have for example a 16x16 icon inside a 32x32 space, the icon could be scaled and stretched, it could be centered, or it could be positioned to one side of the space.

Note that in horizontal context `GTK_ALIGN_START` and `GTK_ALIGN_END` are interpreted relative to text direction.

Baseline support is optional for containers and widgets, and is only available for vertical alignment. `GTK_ALIGN_BASELINE_CENTER and`GTK_ALIGN_BASELINE_FILL`are treated similar to`GTK_ALIGN_CENTER`and`GTK_ALIGN_FILL`, except that it positions the widget to line up the baselines, where that is supported.

#### Members

`GTK_ALIGN_FILL`

  Stretch to fill all space if possible, center if no meaningful way to stretch.

  - Value: `0`
  - Nickname: `fill`
  - Available since: 4.0
`GTK_ALIGN_START`

  Snap to left or top side, leaving space on right or bottom.

  - Value: `1`
  - Nickname: `start`
  - Available since: 4.0
`GTK_ALIGN_END`

  Snap to right or bottom side, leaving space on left or top.

  - Value: `2`
  - Nickname: `end`
  - Available since: 4.0
`GTK_ALIGN_CENTER`

  Center natural width of widget inside the allocation.

  - Value: `3`
  - Nickname: `center`
  - Available since: 4.0
`GTK_ALIGN_BASELINE_FILL`

  A different name for `GTK_ALIGN_BASELINE`.

  - Value: `4`
  - Nickname: `baseline-fill`
  - Available since: 4.12
`GTK_ALIGN_BASELINE`

  Align the widget according to the baseline.

  - Value: `4`
  - Nickname: `baseline`
  - Available since: 4.0
`GTK_ALIGN_BASELINE_CENTER`

  Stretch to fill all space, but align the baseline.

  - Value: `5`
  - Nickname: `baseline-center`
  - Available since: 4.12