mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:47:34 +00:00
Userland: Make Window::set_main_widget()
non-fallible
This commit is contained in:
parent
c9297126db
commit
3aa49f268c
120 changed files with 144 additions and 133 deletions
|
@ -43,7 +43,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
main_window->set_rect(670, 65, 325, 500);
|
||||
main_window->set_icon(app_icon.bitmap_for_size(16));
|
||||
|
||||
auto table_view = TRY(main_window->set_main_widget<GUI::TableView>());
|
||||
auto table_view = main_window->set_main_widget<GUI::TableView>();
|
||||
auto model = ClipboardHistoryModel::create();
|
||||
|
||||
TRY(model->read_from_file(clipboard_file_path));
|
||||
|
@ -100,7 +100,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
applet_window->set_title("ClipboardHistory");
|
||||
applet_window->set_window_type(GUI::WindowType::Applet);
|
||||
applet_window->set_has_alpha_channel(true);
|
||||
auto icon_widget = TRY(applet_window->set_main_widget<GUI::ImageWidget>());
|
||||
auto icon_widget = applet_window->set_main_widget<GUI::ImageWidget>();
|
||||
icon_widget->set_tooltip_deprecated("Clipboard History");
|
||||
icon_widget->load_from_file("/res/icons/16x16/edit-copy.png"sv);
|
||||
icon_widget->on_click = [&main_window = *main_window] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue