mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:07:35 +00:00
LibGUI: Insert first displayed emoji on return
This enables users to insert emojis without using the mouse by searching for it in the EmojiInputDialog and then hitting return.
This commit is contained in:
parent
178f0b9971
commit
e5a9f030f2
2 changed files with 25 additions and 3 deletions
|
@ -19,6 +19,7 @@ class EmojiInputDialog final : public Dialog {
|
|||
struct Emoji {
|
||||
RefPtr<Button> button;
|
||||
Unicode::Emoji emoji;
|
||||
String text;
|
||||
};
|
||||
|
||||
public:
|
||||
|
@ -30,6 +31,7 @@ private:
|
|||
|
||||
Vector<Emoji> supported_emoji();
|
||||
void update_displayed_emoji();
|
||||
void select_first_displayed_emoji();
|
||||
|
||||
OwnPtr<ActionGroup> m_category_action_group;
|
||||
Optional<Unicode::EmojiGroup> m_selected_category;
|
||||
|
@ -38,6 +40,7 @@ private:
|
|||
RefPtr<Toolbar> m_toolbar;
|
||||
RefPtr<Widget> m_emojis_widget;
|
||||
Vector<Emoji> m_emojis;
|
||||
Emoji const* m_first_displayed_emoji { nullptr };
|
||||
String m_selected_emoji_text;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue