aboutsummaryrefslogtreecommitdiff
path: root/src/libui_sdl/libui/windows
diff options
context:
space:
mode:
authorStapleButter <thetotalworm@gmail.com>2017-10-02 01:58:09 +0200
committerStapleButter <thetotalworm@gmail.com>2017-10-02 01:58:09 +0200
commit09920126ddcc84d98e333287566d8483ad3410a8 (patch)
treeede915edf24788c3998cdfc7adef5249f47a7e7a /src/libui_sdl/libui/windows
parentce592a1d80db2eb1de0dc5ac55c2270e3a6befb3 (diff)
add support for setting an explicit min size for libui controls. for now only supported by uiArea.
Diffstat (limited to 'src/libui_sdl/libui/windows')
-rw-r--r--src/libui_sdl/libui/windows/area.cpp8
1 files changed, 5 insertions, 3 deletions
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)