We were using one Emoji chooser when triggered
via the context menu, and another one when
triggered via the icon.
Change things to always use the same Emoji
chooser instance.
The primary icon is on the right in RTL, so don't offset the text child
to the right for it.
Fixes the text and icon overlapping in the second entry
in tests/testentryicons
Use a GtkText child, and delegate the editable functionality
to it. Also forward all the properties that are provided by
GtkText.
Some of the more internal APIs, such as layout and im context
access and caps-lock warning, are removed here, but we preserve
most of the plain GtkEntry API by forwarding it to the GtkText
child.
Some of the flags got lost in the meson transition or were demoted from
error flags to warning flags.
This commit reintroduces them.
It also includes fixes for the code that had warnings with those flags.
The big one being -Wshadow.
This gives us a better way of choosing the color of the placeholder text
(and enabled general css styling on it of course).
Closes#378 (If you want to keep the placeholder on focused and empty
entries, just don't set the placeholder opacity to 0 in
entry:focus>placeholder. This is the default behavior but this commit
includes a rule in Adwaita to hide it.
and use 150 as natural-width.
Currently there's no way for a GtkEntry to be less
than 150px wide (apart from using "width-chars" property),
this is too much for a default minimum-width, an app
developer may need to have a shorter GtkEntry, for example
when the UI it's been shrunk by the user (see [1]) or when
you want to match the size of another widget (which is less
than 150px) see [2] for Evince bug on using
gtk_combo_box_new_with_model_and_entry() for PDF forms where
GtkEntry of ComboBox is too wide and doesn't match the combo
list width.
Using "width-chars" property may be a workaround to obtain
a short minimum-width for the entry, but is not a proper
solution for the mentioned cases as you may not know how
short your GtkEntry will be, or the fact that using "chars"
as a width unit is not pixel accurate.
Curious note: the commit that introduced the GtkEntry
minimum-width to be 150px is from 20 years ago, see
https://bit.ly/2ySEfK4
[1] This change was already suggested by Benjamin Otte
in a blog comment https://bit.ly/2J96wRo
[2] Fixes issue evince#1002
This is to go along with the newly introduced GdkDrop.
This commit includes the necessary updates to the X11, Wayland
and Broadway backends. Other backends have to be updated separately.
Instead of doing all handling manually in the ::event vfunc,
set up drag/multipress gestures on icon images, and implement
emission of ::icon-press/release and DnD there.
As a side effect, the GdkEvent field in ::icon-press/release
signals has been dropped. Callers that might be interested on it
may still use gtk_get_current_event*().