spinbutton: No emoji for numeric input

Continuing from cfc871f031, when a spin button is in numeric mode,
set the no-emoji input hint, since Emoji aren't useful in numeric
input.
This commit is contained in:
Matthias Clasen 2024-08-31 18:23:49 -04:00
parent 6c88713f82
commit edc50c85ef

View File

@ -2296,6 +2296,9 @@ gtk_spin_button_set_numeric (GtkSpinButton *spin_button,
spin_button->numeric = numeric;
gtk_text_set_input_purpose (GTK_TEXT (spin_button->entry),
numeric ? GTK_INPUT_PURPOSE_NUMBER: GTK_INPUT_PURPOSE_FREE_FORM);
gtk_text_set_input_hints (GTK_TEXT (spin_button->entry),
numeric ? GTK_INPUT_HINT_NO_EMOJI : GTK_INPUT_HINT_NONE);
g_object_notify_by_pspec (G_OBJECT (spin_button), spinbutton_props[PROP_NUMERIC]);
}
}