From 09920126ddcc84d98e333287566d8483ad3410a8 Mon Sep 17 00:00:00 2001 From: StapleButter Date: Mon, 2 Oct 2017 01:58:09 +0200 Subject: add support for setting an explicit min size for libui controls. for now only supported by uiArea. --- src/libui_sdl/libui/windows/area.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/libui_sdl/libui/windows') diff --git a/src/libui_sdl/libui/windows/area.cpp b/src/libui_sdl/libui/windows/area.cpp index 3257631..74fe768 100644 --- a/src/libui_sdl/libui/windows/area.cpp +++ b/src/libui_sdl/libui/windows/area.cpp @@ -55,9 +55,11 @@ uiWindowsControlAllDefaults(uiArea) static void uiAreaMinimumSize(uiWindowsControl *c, int *width, int *height) { - // TODO - *width = 1; - *height = 1; + *width = c->c.MinWidth; + if (*width < 1) *width = 1; + + *height = c->c.MinHeight; + if (*height < 1) *height = 1; } ATOM registerAreaClass(HICON hDefaultIcon, HCURSOR hDefaultCursor) -- cgit v1.2.3