width = theme->buffer.width;
height = theme->buffer.height;
if (width < 2 ||
- width < 2 * theme->frame_width) {
+ width < 2 * theme->frame_width ||
+ width < 2 * theme->button_margin + 2 * theme->button_padding +
+ 3 * theme->button_size) {
widget_draw_fallback(theme);
} else if (height < theme->control_height + 2 * theme->frame_width) {
widget_draw_fallback(theme);
*width = minw;
if (*height < minh)
*height = minh;
+
+ minw = 2 * theme->button_margin + 2 * theme->button_padding +
+ 3 * theme->button_size;
+ minh = theme->button_size + 2 * theme->button_padding;
+ if (*width < minw)
+ *width = minw;
+ if (*height < minh)
+ *height = minh;
}
static void widget_resize(struct wlt_widget *widget, struct wlt_rect *alloc,