Mercurial > dwindows
changeset 2724:c1f8e598960d
Only expand the calendar control and box horizontally....
This works around an apparnent bug in either the Android layout or
CalendarView control. It was reporting 0 size and apparently making the
control 0 size, thus invisible when expanding both directions.
This is probably the idea way to layout the calendar control anyway so maybe
it won't be a big deal, but it deserves further investigation in the future.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 09 Dec 2021 19:51:48 +0000 |
parents | 27fd270cb0db |
children | 2dd68d2810ca |
files | dwtest.c |
diffstat | 1 files changed, 6 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/dwtest.c Thu Dec 09 12:40:17 2021 +0000 +++ b/dwtest.c Thu Dec 09 19:51:48 2021 +0000 @@ -298,7 +298,7 @@ { char *errors = NULL; - fp = fopen(filename, "r" ); + fp = fopen(filename, "r"); if(!fp) errors = strerror(errno); else @@ -311,9 +311,9 @@ for(i=0; i<1000; i++) { lp[i] = (char *)calloc(1, 1025); - if (fgets( lp[i], 1024, fp) == NULL) + if (fgets(lp[i], 1024, fp) == NULL) break; - len = (int)strlen( lp[i]); + len = (int)strlen(lp[i]); if (len > max_linewidth) max_linewidth = len; if(lp[i][len - 1] == '\n') @@ -616,8 +616,7 @@ int DWSIGNAL browse_file_callback(HWND window, void *data) { - char *tmp; - tmp = dw_file_browse("Pick a file", "dwtest.c", "c", DW_FILE_OPEN); + char *tmp = dw_file_browse("Pick a file", "dwtest.c", "c", DW_FILE_OPEN); if(tmp) { char *errors = read_file(tmp); @@ -1616,9 +1615,9 @@ dw_window_set_color(buttonsbox, DW_CLR_RED, DW_CLR_RED); calbox = dw_box_new(DW_HORZ, 0); - dw_box_pack_start(notebookbox5, calbox, 0, 0, TRUE, TRUE, 1); + dw_box_pack_start(notebookbox5, calbox, 0, 0, TRUE, FALSE, 1); cal = dw_calendar_new(100); - dw_box_pack_start(calbox, cal, -1, -1, TRUE, TRUE, 0); + dw_box_pack_start(calbox, cal, -1, -1, TRUE, FALSE, 0); dw_calendar_set_date(cal, 2019, 4, 30);