EmojiInputDialog: Port to GML compilation

This commit is contained in:
Aryan Baburajan
2024-04-02 12:54:01 +05:30
committed by Tim Schumacher
parent d6ca054935
commit b2587cb11b
Notes: sideshowbarker 2024-07-17 07:31:31 +09:00
4 changed files with 33 additions and 9 deletions

View File

@@ -18,7 +18,7 @@
#include <LibGUI/BoxLayout.h>
#include <LibGUI/Button.h>
#include <LibGUI/EmojiInputDialog.h>
#include <LibGUI/EmojiInputDialogGML.h>
#include <LibGUI/EmojiInputDialogWidget.h>
#include <LibGUI/Frame.h>
#include <LibGUI/ScrollableContainerWidget.h>
#include <LibGUI/TextBox.h>
@@ -48,8 +48,8 @@ EmojiInputDialog::EmojiInputDialog(Window* parent_window)
: Dialog(parent_window)
, m_category_action_group(make<ActionGroup>())
{
auto main_widget = set_main_widget<Frame>();
main_widget->load_from_gml(emoji_input_dialog_gml).release_value_but_fixme_should_propagate_errors();
auto main_widget = EmojiInputDialogWidget::try_create().release_value_but_fixme_should_propagate_errors();
set_main_widget(main_widget);
set_window_type(GUI::WindowType::Popup);
set_window_mode(GUI::WindowMode::Modeless);
@@ -59,7 +59,7 @@ EmojiInputDialog::EmojiInputDialog(Window* parent_window)
auto& scrollable_container = *main_widget->find_descendant_of_type_named<GUI::ScrollableContainerWidget>("scrollable_container"sv);
m_search_box = main_widget->find_descendant_of_type_named<GUI::TextBox>("search_box"sv);
m_toolbar = main_widget->find_descendant_of_type_named<GUI::Toolbar>("toolbar"sv);
m_emojis_widget = main_widget->find_descendant_of_type_named<GUI::Widget>("emojis"sv);
m_emojis_widget = scrollable_container.widget();
m_emojis = supported_emoji();
m_category_action_group->set_exclusive(true);