Matthias Clasen
a628e03042
emoji: Improve section scrolling
...
Leave some space above the section heading when scrolling.
This is a part of https://gitlab.gnome.org/GNOME/gtk/merge_requests/143
by Julian Sperber.
2018-06-03 09:43:28 -04:00
Matthias Clasen
609cb85f3a
emoji chooser: Match search terms better
...
Use g_str_match_string for better results.
cherry-pick of be2853e5de
https://gitlab.gnome.org/GNOME/gtk/issues/898
2018-05-04 09:45:44 +01:00
Timm Bäder
04ff9b58f1
emojichooser: Only measure reference emoji once
...
Doing that once for every emoji is pretty slow and unnecessary as the
width does not change.
2018-03-12 14:40:02 +00:00
Matthias Clasen
9e3b814580
emoji: Skip overly wide fallback rendering
...
Some emoji fonts (such as Emoji One), render Emoji sequences
such as some of the family variations using multiple individual
glyphs. This rendering is too wide and breaks our grid layout.
Therefore, we will just skip any sequence whose rendering is
more than twice as wide as a simple smiley.
2018-01-15 08:21:52 -05:00
Matthias Clasen
55e8736613
emoji chooser: break out a helper function
...
This is just a small cleanup.
2017-11-22 19:11:31 +00:00
Matthias Clasen
6b126a70e2
emoji chooser: Make menu key work as expected
...
Whenever we have a right-click action, we should make
the menu key work as a keyboard-accessible alternative.
2017-11-22 19:11:31 +00:00
Matthias Clasen
f301b7874e
emoji chooser: handle right-click
...
Whereever we handle long-press for touch, it makes sense to handle
right-click as a faster alternative for mouse-based interaction.
This commit makes right-click work to bring up the variation
selector for Emojis.
2017-11-22 19:11:31 +00:00
Matthias Clasen
65457e6d12
emoji chooser: Don't leak gestures
...
We were not freeing these gestures as we should.
2017-11-22 19:11:31 +00:00
Benjamin Otte
f8cb3fc3a8
emojichooser: animate the adjustment
...
... instead of doing a dance with the scrolled window to get it to scroll
the adjustment.
2017-11-22 19:11:31 +00:00
Timm Bäder
45198d2312
emojichooser: Plug memory leak
2017-10-18 10:04:48 +01:00
Timm Bäder
3501a7ea41
emojichooser: Plug a memory leak
2017-09-24 19:19:20 +01:00
Daniel Boles
7210945292
EmojiChooser: Ensure always have a selected button
...
We were only selecting a section’s button if the adjustment y coord was
within its heading, so scrolling slightly into it unchecked all buttons.
This also fixes how we could end up with the first 2 selected, somehow.
https://bugzilla.gnome.org/show_bug.cgi?id=787172
2017-09-04 22:33:24 +01:00
Daniel Boles
02e310a1d5
EmojiChooser: Check the 1st button before 1st show
...
We scroll to the top in show() but only ever selected a button when the
adjustment changed, which doesn’t happen in init(). Check it manually.
https://bugzilla.gnome.org/show_bug.cgi?id=787172
2017-09-04 22:33:24 +01:00
Mohammed Sadiq
8d0dc64e61
emoji-chooser: fix subsequent scroll
...
Event handlers on scroll window should only be run once the widget
is shown.
https://bugzilla.gnome.org/show_bug.cgi?id=786964
2017-09-01 18:31:40 -04:00
Matthias Clasen
beb7bba3ce
Avoid empty space in the emoji chooser
...
We need to hide the empty flow boxes as well, to avoid
spacing between them.
https://bugzilla.gnome.org/show_bug.cgi?id=786966
2017-08-30 14:25:14 +01:00
Matthias Clasen
cfdb9f95dc
Handle emoji data change in emoji chooser
...
Update the settings schema to follow the change in Emoji data,
and make the emoji chooser code handle the new format.
2017-08-22 08:20:03 -04:00
Chun-wei Fan
7b240ae298
gtk/gtkemojichooser.c: Don't use g_autoptr()
...
We can't use g_autoptr() on non-GCC-style compilers.
https://bugzilla.gnome.org/show_bug.cgi?id=773299
2017-08-15 23:40:18 +08:00
Matthias Clasen
4cb9ba57b4
Remove an erroneous unref
...
This was leftover by accident.
2017-08-15 06:41:19 -04:00
Matthias Clasen
c56545f721
Redo emoji data slightly
...
No longer store variation sequences explicitly. Instead, put a 0
in the sequence where the modifiers will be inserted. This is more
compact, and it allows us to put variations directly into the
recent section. Update the type of the recent-emoji setting to
match these changes.
2017-08-15 06:41:19 -04:00
Matthias Clasen
f27d928e33
Don't update headings in an idle
...
It is not necessary since flow box invalidation is
all synchronous currently. If that ever changes,
this code will need adjustment.
2017-08-15 06:41:18 -04:00
Matthias Clasen
c7061d88a2
emoji: Fix a leak
...
We were leaking the list of recently used Emoji here.
Pointed out by Timm Bädert.
2017-08-13 07:52:31 -04:00
Matthias Clasen
66d9f4fe95
emoji: Start search on the first character
...
There is no need to wait for a longer prefix here.
We already display all the content anyway, it will
only get less.
2017-08-13 07:52:19 -04:00
Matthias Clasen
45b2e162ae
Add an Emoji chooser widget
...
Add a popover that shows color Emoji, with a search entry.
The recently-used Emoji are stored in a GSetting.
2017-08-11 15:42:54 -04:00