Skip to content

Decoration Width

Static and Scripted Decorations have three requested width modes: Content, Fixed, and Flexible. Content is the default for both kinds of new definitions.

  • Content sizes the Decoration to its whole-Decoration text and normal presentation padding.
  • Fixed uses the specified extent. For Static Decorations, set Width from 1 to 4096 in Settings or in a metadata header; an imported Width above 4096 is an error. A Scripted Decoration can set decoration.fixedWidth to a logical-pixel integer from 1 to 4096.
  • Flexible shares remaining taskbar space equally with other participating Flexible Decorations.

The Settings Width value controls the extent along the taskbar’s item flow: it is horizontal on a horizontal panel and vertical on a vertical panel. It does not position the Decoration or change its place in the workspace. Taskbar orientation comes from the applet, not the Decoration’s Settings preview orientation.

Scripted Decorations choose a requested mode in Lua with decoration.widthMode ("Content", "Fixed", or "Flexible"); an unset mode defaults to Content. Scripted Content measures the intrinsic extent of parsed whole-Decoration text runs. Positioned text and graphics do not contribute. If no whole-text runs were parsed but positioned or graphics output exists, the effective mode falls back to Flexible with a warning; genuinely empty output remains Content. The requested Lua mode and the effective layout mode are distinct in this fallback case. Assigning decoration.fixedWidth selects Fixed mode; the assigned width remains available in that runtime when another mode is selected. Unsupported values leave the previous requested mode unchanged.

Flexible sizing does not create another order or a separate layout lane. It can also affect how ordinary Taskbar Alignment appears to work; see placing Decorations for the shared workspace order.