1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 14:55:08 +00:00

LibGUI: Make the emojis in the emoji input dialog fit in the window

GUI::Button has a default min-width of 32, so we have to override that
here in order to squeeze all the emojis into the window.

Fixes #4689.
This commit is contained in:
Andreas Kling 2020-12-31 14:30:00 +01:00
parent c0356fc183
commit d441dec5d8

View file

@ -83,6 +83,7 @@ EmojiInputDialog::EmojiInputDialog(Window* parent_window)
builder.append(Utf32View(&code_points[index++], 1));
auto emoji_text = builder.to_string();
auto& button = horizontal_container.add<Button>(emoji_text);
button.set_min_size(16, 16);
button.set_button_style(Gfx::ButtonStyle::CoolBar);
button.on_click = [this, button = &button](auto) {
m_selected_emoji_text = button->text();