summaryrefslogtreecommitdiff
path: root/textscreen/txt_checkbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'textscreen/txt_checkbox.c')
-rw-r--r--textscreen/txt_checkbox.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/textscreen/txt_checkbox.c b/textscreen/txt_checkbox.c
index e8222606..b413874e 100644
--- a/textscreen/txt_checkbox.c
+++ b/textscreen/txt_checkbox.c
@@ -8,13 +8,14 @@
#include "txt_main.h"
#include "txt_window.h"
-static int TXT_CheckBoxSizeCalc(txt_widget_t *widget)
+static void TXT_CheckBoxSizeCalc(txt_widget_t *widget, int *w, int *h)
{
txt_checkbox_t *checkbox = (txt_checkbox_t *) widget;
// Minimum width is the string length + two spaces for padding
- return strlen(checkbox->label) + 6;
+ *w = strlen(checkbox->label) + 6;
+ *h = 1;
}
static void TXT_CheckBoxDrawer(txt_widget_t *widget, int w, int selected)