import { Graphics } from 'pixi.js'; import { drawHeaderBar, HStack, Theme } from '../ui'; /** The bar across the top of a tab: its controls in a row on the header colour, a line below. */ export class TabHeader extends HStack { private readonly bg = new Graphics(); constructor() { super({ gap: Theme.gap, padding: Theme.headerPadding, align: 'center' }); this.minHeight = Theme.controlHeight + Theme.headerPadding * 2; this.addChildAt(this.bg, 0); } override redraw(): void { drawHeaderBar(this.bg, this.w, this.h); } }