mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
gtkspinbutton: Set number input hint for text field if numeric
The main reason to do this is so that the OSK shows a numeric touchpad instead of the regular keyboard when the spin button only accepts numbers
This commit is contained in:
parent
23e4c788fa
commit
cfc871f031
@ -2294,6 +2294,8 @@ gtk_spin_button_set_numeric (GtkSpinButton *spin_button,
|
||||
if (spin_button->numeric != numeric)
|
||||
{
|
||||
spin_button->numeric = numeric;
|
||||
gtk_text_set_input_purpose (GTK_TEXT (spin_button->entry),
|
||||
numeric ? GTK_INPUT_PURPOSE_NUMBER: GTK_INPUT_PURPOSE_FREE_FORM);
|
||||
g_object_notify_by_pspec (G_OBJECT (spin_button), spinbutton_props[PROP_NUMERIC]);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user