29 lines
710 B
C
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;
|
|
}
|