comparison 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
comparison
equal deleted inserted replaced
2552:303f544d14fa 2553:2b4f2929408e
1138 dw_spinbutton_set_pos(imageyspin, 20); 1138 dw_spinbutton_set_pos(imageyspin, 20);
1139 imagestretchcheck = dw_checkbox_new("Stretch", 1021); 1139 imagestretchcheck = dw_checkbox_new("Stretch", 1021);
1140 dw_box_pack_start(hbox, imagestretchcheck, -1, 25, FALSE, TRUE, 0); 1140 dw_box_pack_start(hbox, imagestretchcheck, -1, 25, FALSE, TRUE, 0);
1141 1141
1142 button1 = dw_button_new("Refresh", 1223L ); 1142 button1 = dw_button_new("Refresh", 1223L );
1143 dw_box_pack_start(hbox, button1, 100, 25, FALSE, TRUE, 0); 1143 dw_box_pack_start(hbox, button1, -1, 25, FALSE, TRUE, 0);
1144 button2 = dw_button_new("Print", 1224L ); 1144 button2 = dw_button_new("Print", 1224L );
1145 dw_box_pack_start(hbox, button2, 100, 25, FALSE, TRUE, 0); 1145 dw_box_pack_start(hbox, button2, -1, 25, FALSE, TRUE, 0);
1146 1146
1147 /* Pre-create the scrollbars so we can query their sizes */ 1147 /* Pre-create the scrollbars so we can query their sizes */
1148 vscrollbar = dw_scrollbar_new(DW_VERT, 50); 1148 vscrollbar = dw_scrollbar_new(DW_VERT, 50);
1149 hscrollbar = dw_scrollbar_new(DW_HORZ, 50); 1149 hscrollbar = dw_scrollbar_new(DW_HORZ, 50);
1150 dw_window_get_preferred_size(vscrollbar, &vscrollbarwidth, NULL); 1150 dw_window_get_preferred_size(vscrollbar, &vscrollbarwidth, NULL);
1808 /* create a box to pack into the notebook page */ 1808 /* create a box to pack into the notebook page */
1809 scrollbox = dw_scrollbox_new(DW_VERT, 0); 1809 scrollbox = dw_scrollbox_new(DW_VERT, 0);
1810 dw_box_pack_start(notebookbox8, scrollbox, 0, 0, TRUE, TRUE, 1); 1810 dw_box_pack_start(notebookbox8, scrollbox, 0, 0, TRUE, TRUE, 1);
1811 1811
1812 abutton1 = dw_button_new("Show Adjustments", 0); 1812 abutton1 = dw_button_new("Show Adjustments", 0);
1813 dw_box_pack_start(scrollbox, abutton1, -1, 30, FALSE, FALSE, 0); 1813 dw_box_pack_start(scrollbox, abutton1, -1, -1, FALSE, FALSE, 0);
1814 dw_signal_connect(abutton1, DW_SIGNAL_CLICKED, DW_SIGNAL_FUNC(scrollbox_button_callback), NULL); 1814 dw_signal_connect(abutton1, DW_SIGNAL_CLICKED, DW_SIGNAL_FUNC(scrollbox_button_callback), NULL);
1815 1815
1816 for(i = 0; i < MAX_WIDGETS; i++) 1816 for(i = 0; i < MAX_WIDGETS; i++)
1817 { 1817 {
1818 tmpbox = dw_box_new(DW_HORZ, 0); 1818 tmpbox = dw_box_new(DW_HORZ, 0);
1819 dw_box_pack_start(scrollbox, tmpbox, 0, 24, TRUE, FALSE, 2); 1819 dw_box_pack_start(scrollbox, tmpbox, 0, 0, TRUE, FALSE, 2);
1820 sprintf(buf, "Label %d", i); 1820 sprintf(buf, "Label %d", i);
1821 labelarray[i] = dw_text_new(buf , 0); 1821 labelarray[i] = dw_text_new(buf , 0);
1822 dw_box_pack_start( tmpbox, labelarray[i], 0, 20, TRUE, FALSE, 0); 1822 dw_box_pack_start( tmpbox, labelarray[i], 0, -1, TRUE, FALSE, 0);
1823 sprintf(buf, "Entry %d", i); 1823 sprintf(buf, "Entry %d", i);
1824 entryarray[i] = dw_entryfield_new(buf , i); 1824 entryarray[i] = dw_entryfield_new(buf , i);
1825 dw_box_pack_start(tmpbox, entryarray[i], 0, 20, TRUE, FALSE, 0); 1825 dw_box_pack_start(tmpbox, entryarray[i], 0, -1, TRUE, FALSE, 0);
1826 } 1826 }
1827 } 1827 }
1828 1828
1829 /* Section for thread/event test */ 1829 /* Section for thread/event test */
1830 HWND threadmle, startbutton; 1830 HWND threadmle, startbutton;