Mercurial > dwindows
diff dwtest.c @ 2553:2b4f2929408e
Android: Fix issue with specifying static sizes... still some issues.
Needed to set the width and height DURING creation of LayoutParams.
Some android controls still don't layout properly when forcing sizes.
So change to -1 (auto size) in dwtest to work around it for now.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sat, 15 May 2021 20:46:17 +0000 |
parents | dbd15c13f5bb |
children | 4c75fb6089a9 |
line wrap: on
line diff
--- a/dwtest.c Sat May 15 19:11:53 2021 +0000 +++ b/dwtest.c Sat May 15 20:46:17 2021 +0000 @@ -1140,9 +1140,9 @@ dw_box_pack_start(hbox, imagestretchcheck, -1, 25, FALSE, TRUE, 0); button1 = dw_button_new("Refresh", 1223L ); - dw_box_pack_start(hbox, button1, 100, 25, FALSE, TRUE, 0); + dw_box_pack_start(hbox, button1, -1, 25, FALSE, TRUE, 0); button2 = dw_button_new("Print", 1224L ); - dw_box_pack_start(hbox, button2, 100, 25, FALSE, TRUE, 0); + dw_box_pack_start(hbox, button2, -1, 25, FALSE, TRUE, 0); /* Pre-create the scrollbars so we can query their sizes */ vscrollbar = dw_scrollbar_new(DW_VERT, 50); @@ -1810,19 +1810,19 @@ dw_box_pack_start(notebookbox8, scrollbox, 0, 0, TRUE, TRUE, 1); abutton1 = dw_button_new("Show Adjustments", 0); - dw_box_pack_start(scrollbox, abutton1, -1, 30, FALSE, FALSE, 0); + dw_box_pack_start(scrollbox, abutton1, -1, -1, FALSE, FALSE, 0); dw_signal_connect(abutton1, DW_SIGNAL_CLICKED, DW_SIGNAL_FUNC(scrollbox_button_callback), NULL); for(i = 0; i < MAX_WIDGETS; i++) { tmpbox = dw_box_new(DW_HORZ, 0); - dw_box_pack_start(scrollbox, tmpbox, 0, 24, TRUE, FALSE, 2); + dw_box_pack_start(scrollbox, tmpbox, 0, 0, TRUE, FALSE, 2); sprintf(buf, "Label %d", i); labelarray[i] = dw_text_new(buf , 0); - dw_box_pack_start( tmpbox, labelarray[i], 0, 20, TRUE, FALSE, 0); + dw_box_pack_start( tmpbox, labelarray[i], 0, -1, TRUE, FALSE, 0); sprintf(buf, "Entry %d", i); entryarray[i] = dw_entryfield_new(buf , i); - dw_box_pack_start(tmpbox, entryarray[i], 0, 20, TRUE, FALSE, 0); + dw_box_pack_start(tmpbox, entryarray[i], 0, -1, TRUE, FALSE, 0); } }