changeset 143:c45e449c78ed

Switch to autosizing the spinbutton controls. Improves visuals on iOS. The iOS stepper is absolutely huge complared to other platforms... So using a static value for these controls makes it unusable on iOS. The Preferences layout needs to be completely rewritten, it isn't working as it is... but this helps make it usable for now.
author Brian Smith <brian@dbsoft.org>
date Mon, 18 Oct 2021 15:56:30 -0500
parents f192e2dbb8a5
children fc6f7cc9f793
files src/handyftp.c
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/handyftp.c	Sun Oct 03 14:45:39 2021 -0500
+++ b/src/handyftp.c	Mon Oct 18 15:56:30 2021 -0500
@@ -2263,7 +2263,7 @@
 	dw_spinbutton_set_limits(handles[3], 60L, 0L);
 	dw_spinbutton_set_pos(handles[3], ftptimeout);
 
-	dw_box_pack_start(hbox, handles[3], 60, -1, FALSE, TRUE, 1);
+	dw_box_pack_start(hbox, handles[3], -1, -1, FALSE, TRUE, 1);
 
 	/* Second Line */
 	hbox = dw_box_new(BOXHORZ, 0);
@@ -2287,7 +2287,7 @@
 	dw_spinbutton_set_limits(handles[4], 60L, 0L);
 	dw_spinbutton_set_pos(handles[4], retrymax);
 
-	dw_box_pack_start(hbox, handles[4], 60, -1, FALSE, TRUE, 1);
+	dw_box_pack_start(hbox, handles[4], -1, -1, FALSE, TRUE, 1);
 
 	/* Third Line */
 	hbox = dw_box_new(BOXHORZ, 0);
@@ -2311,7 +2311,7 @@
 	dw_spinbutton_set_limits(handles[5], 100L, 0L);
 	dw_spinbutton_set_pos(handles[5], cachemax);
 
-	dw_box_pack_start(hbox, handles[5], 60, -1, FALSE, TRUE, 1);
+	dw_box_pack_start(hbox, handles[5], -1, -1, FALSE, TRUE, 1);
 
 	/* Fourth Line */
 	hbox = dw_box_new(BOXHORZ, 0);
@@ -2335,7 +2335,7 @@
 	dw_spinbutton_set_limits(handles[7], 1000L, 0L);
 	dw_spinbutton_set_pos(handles[7], bandwidthlimit);
 
-	dw_box_pack_start(hbox, handles[7], 60, -1, FALSE, TRUE, 1);
+	dw_box_pack_start(hbox, handles[7], -1, -1, FALSE, TRUE, 1);
 
 	/* Fifth Line */
 	hbox = dw_box_new(BOXHORZ, 0);
@@ -5405,8 +5405,8 @@
 	dw_spinbutton_set_limits(site[thispage]->port_num, 65535L, 0L);
 	dw_spinbutton_set_pos(site[thispage]->port_num, 21);
 
-	dw_box_pack_start(controlbox, site[thispage]->port_num, 65, -1, FALSE, TRUE, 0);
-    dw_window_set_tooltip(site[thispage]->port_num, "TCP/IP port number from 0 to 65535");
+	dw_box_pack_start(controlbox, site[thispage]->port_num, -1, -1, FALSE, TRUE, 0);
+	dw_window_set_tooltip(site[thispage]->port_num, "TCP/IP port number from 0 to 65535");
 
 	stext = dw_text_new(locale_string("Username:", 148), 0);