summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/EmojiInputDialog.cpp
AgeCommit message (Collapse)Author
2022-09-20LibGUI: Use fuzzy matching when searching for emoji by nameTimothy Flynn
This allows the user to have slight typos in their search query.
2022-09-16LibGUI: Load emoji icons for EmojiInputDialog through Gfx::EmojiTimothy Flynn
No difference when cold-loading the emoji icons, but for a warm load, this provides a per-process cache of the loaded icons.
2022-09-16LibGUI: Defer loading emoji icons until their first paint eventTimothy Flynn
The EmojiInputDialog re-uses emoji buttons to help with performance as filters are applied / removed. The downside of pre-creating the buttons is that it currently takes upwards of 600ms (on my machine) to load all emoji icons from disk at once. This will only become worse over time as more emoji are added. To alleviate this, defer loading the icons until they are needed for painting (i.e. come into view).
2022-09-11LibGUI: Support emoji with multiple code points in EmojiInputDialogTimothy Flynn
2022-09-11LibGUI: Use discovered emoji files as the EmojiInputDialog button iconsTimothy Flynn
Rather than rendering the emoji as text, use the emoji icons themselves.
2022-09-11LibGUI: Add an emoji category filter for SerenityOS custom emojisTimothy Flynn
Most of the emoji are 7x10px (or close to that). But some are larger, on the order of 128x128px. The icon used for the SerenityOS category is one such large emoji, and must be scaled down to an appropriate size for rendering.
2022-09-11LibGUI: Ensure unknown emoji have a set display orderTimothy Flynn
Currently, we use code point values as a tie break when sorting emoji by display order. When multiple code point emoji are supported, this will become a bit awkward. Rather than dealing with varying code point length while sorting, just set a maximum display order to ensure these are placed at the end.
2022-09-09Spreadsheet+LibGUI: Set EmojiInputDialog as a CaptureInput modalthankyouverycool
This has two advantages: First the picker no longer changes the active window state of its parent. Visually this is an additional hint that the dialog is "fragile" and will close on loss of focus. Second, because it contains a search box, its own input won't be preempted by global application shortcuts when typing (pending #15129). This is a problem in apps like PixelPaint which use shortcuts without modifiers.
2022-09-09LibGUI: Allow blocking CommandPalette/EmojiInput on a per Window basisthankyouverycool
Instead of having to negate every focusable widget or textbox, let windows override all their widgets. These two Dialogs now block themselves and each other.
2022-09-08LibGUI: Add Unicode emoji group filters to the EmojiInputDialogTimothy Flynn
This allows users to filter the list of displayed emoji by the group to which the emoji belong.
2022-09-08LibGUI: Display emoji in the EmojiInputDialog in Unicode display orderTimothy Flynn
2022-09-07LibGUI: Set a tooltip on the emojis' buttons to their code point namesTimothy Flynn
2022-09-07LibGUI: Add a search box to filter EmojiInputDialog by code point namesTimothy Flynn
2022-09-07LibGUI: Disable EmojiInputDialog updates while re-displaying emojiTimothy Flynn
To prevent lag when the displayed code points are redrawn in support of a search box, disable updates while re-adding the emoji buttons.
2022-09-07LibGUI: Create the emoji buttons only once for EmojiInputDialogTimothy Flynn
To prevent lag when the displayed code points are redrawn in support of a search box, only create the GUI::Button objects for the emoji a single time. Re-use those buttons when adding them to the dialog.
2022-09-07LibGUI: Move code to display emoji buttons to a helper functionTimothy Flynn
For a search box to be added, this code will need to be re-invoked as the search query updates.
2022-09-07LibGUI: Wrap the EmojiInputDialog in a scrollable containerTimothy Flynn
This will prevent the dialog from growing endlessly as emoji are added.
2022-09-07LibGUI: Convert EmojiInputDialog to GMLTimothy Flynn
This will allow easily adding components such as a search box. Also, increase the number of emoji per row. This does not fix the issue where too many emoji will cause the dialog to grow limitlessly, but it looks a bit more reasonable now with the number of emoji that we have.
2022-08-25Apps+Demos+Dialogs: Remove unnecessary minimum window sizesthankyouverycool
The new layout system conveniently calculates these for us now. In the case of Mandelbrot where it needs to be overriden, make sure to disable obey min widget size first. In EmojiInputDialog's case, the window needs to be resized instead to center correctly.
2022-07-12Everywhere: Add sv suffix to strings relying on StringView(char const*)sin-ack
Each of these strings would previously rely on StringView's char const* constructor overload, which would call __builtin_strlen on the string. Since we now have operator ""sv, we can replace these with much simpler versions. This opens the door to being able to remove StringView(char const*). No functional changes.
2022-06-29LibGUI: Close EmojiDialog on active window changeOlivier De Cannière
This patch makes EmojiDialog be closed whenever the focus moves away from it just like the CommandPalette.
2022-05-13LibGUI+Userland: Make Dialog::ExecResult an enum classSam Atkins
2022-02-23LibGUI/EmojiInputDialog: Skip multi code point emojis for nowLinus Groh
These will require some tweaking here and elsewhere in LibGUI, to handle both rendering of the emojis as single glyphs consistently, and faking key events with multiple code points after selecting one.
2022-02-23LibGUI/EmojiInputDialog: Automatically calculate the dialog sizeLinus Groh
This was getting way too crowded again. Let's just fix the FIXME. :^)
2022-01-18EmojiInputDialog: Increase size of buttons and dialogLady Gegga
Display some emojis earlier hidden behind "..." and add spacing.
2022-01-07EmojiInputDialog: Ensure that all buttons are equal widthFiliph Sandström
Previously we only set the min size which meant that some emoji buttons was larger than others :^)
2021-11-11Everywhere: Pass AK::StringView by valueAndreas Kling
2021-08-18Userland+LibGUI: Add shorthand versions of the Margins constructorsin-ack
This allows for typing [8] instead of [8, 8, 8, 8] to specify the same margin on all edges, for example. The constructors follow CSS' style of specifying margins. The added constructors are: - Margins(int all): Sets the same margin on all edges. - Margins(int vertical, int horizontal): Sets the first argument to top and bottom margins, and the second argument to left and right margins. - Margins(int top, int vertical, int bottom): Sets the first argument to the top margin, the second argument to the left and right margins, and the third argument to the bottom margin.
2021-06-30AK+Everywhere: Use mostly StringView in LexicalPathMax Wipfli
This changes the m_parts, m_dirname, m_basename, m_title and m_extension member variables to StringViews onto the m_string String. It also removes the m_is_absolute member in favour of computing if a path is absolute in the is_absolute() getter. Due to this, the canonicalize() method has been completely rewritten. The parts() getter still returns a Vector<String>, although it is no longer a const reference as m_parts is no longer a Vector<String>. Rather, it is constructed from the StringViews in m_parts upon request. The parts_view() getter has been added, which returns Vector<StringView> const&. Most previous users of parts() have been changed to use parts_view(), except where Strings are required. Due to this change, it's is now no longer allow to create temporary LexicalPath objects to call the dirname, basename, title, or extension getters on them because the returned StringViews will point to possible freed memory.
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-13Everywhere: It's now "Foobar", not "FooBar", and not "foo bar"Andreas Kling
I hereby declare these to be full nouns that we don't split, neither by space, nor by underscore: - Breadcrumbbar - Coolbar - Menubar - Progressbar - Scrollbar - Statusbar - Taskbar - Toolbar This patch makes everything consistent by replacing every other variant of these with the proper one. :^)
2021-01-12Libraries: Move to Userland/Libraries/Andreas Kling