my first enquiry, I apologise in advance if not quite proper...
I am constrained to a limited pixel height and width on a small touch-sensitive display for a medical device using Raspberry Pi, program in C.
The current spinbutton in GTK2 is up/down icons next to the value field and these up/down icons are rather small for finger-tip navigation, even some stylus are difficult to use. I wish to update to GTK3 which has a better spinbutton layout but the default layout appears to have a minimum size which is too wide for the screen layout which requires several spinbuttons side-by-side. Being a fixed program on a fixed device I have no need for dynamic sizing.
Here is the spinbutton example provided with the GTK3 documentation which illustrates the problem.
#include <gtk/gtk.h>
static void destroy(GtkWidget *widget, gpointer data)
{
gtk_main_quit();
}
int main(int argc, char *argv[])
{
gtk_init(&argc, &argv);
GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
g_signal_connect(window, "destroy", G_CALLBACK(destroy), NULL);
GtkAdjustment *adjustment = gtk_adjustment_new(0, 0, 10, 1, 2, 0);
GtkWidget *spinbutton = gtk_spin_button_new(GTK_ADJUSTMENT(adjustment), 0, 0);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinbutton), 5);
gtk_container_add(GTK_CONTAINER(window), spinbutton);
gtk_widget_show_all(window);
gtk_main();
return 0;
}
I cannot find a reference to a simple means of controlling the width below the default. Any attempt to add statements to reduce the width of the spinbutton have no effect. Please advise if there is a solution or I am wasting my time. I am definitely not an advanced user.