Merge branch 'spinbutton-hint' into 'main'

gtkspinbutton: Set number input hint for text field

See merge request GNOME/gtk!7485
This commit is contained in:
Matthias Clasen 2024-07-26 22:05:34 +00:00
commit d09a610433

View File

@ -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]);
}
}