DVX_GUI/dvx/widgets/widgetSpacer.c
2026-03-09 22:50:06 -05:00

29 lines
710 B
C

// widgetSpacer.c — Spacer widget (invisible stretching element)
#include "widgetInternal.h"
// ============================================================
// wgtSpacer
// ============================================================
WidgetT *wgtSpacer(WidgetT *parent) {
WidgetT *w = widgetAlloc(parent, WidgetSpacerE);
if (w) {
w->weight = 100; // spacers stretch by default
}
return w;
}
// ============================================================
// widgetSpacerCalcMinSize
// ============================================================
void widgetSpacerCalcMinSize(WidgetT *w, const BitmapFontT *font) {
(void)font;
w->calcMinW = 0;
w->calcMinH = 0;
}