1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 21:27:45 +00:00

Taskbar: Add a factory function for TaskbarWindow

This means the errors all the way from Individual widgets get propagated
up.
This commit is contained in:
Arda Cinar 2022-12-23 22:00:17 +03:00 committed by Andreas Kling
parent f40cb8d771
commit 1acc788500
3 changed files with 36 additions and 10 deletions

View file

@ -8,6 +8,7 @@
#include "ClockWidget.h"
#include "WindowList.h"
#include <AK/NonnullRefPtr.h>
#include <LibConfig/Listener.h>
#include <LibDesktop/AppFile.h>
#include <LibGUI/Widget.h>
@ -21,6 +22,7 @@ class TaskbarWindow final : public GUI::Window
C_OBJECT(TaskbarWindow);
public:
static ErrorOr<NonnullRefPtr<TaskbarWindow>> create();
virtual ~TaskbarWindow() override = default;
static int taskbar_height() { return 27; }
@ -40,6 +42,9 @@ private:
void remove_window_button(::Window&, bool);
void update_window_button(::Window&, bool);
ErrorOr<void> populate_taskbar();
ErrorOr<void> load_assistant();
virtual void event(Core::Event&) override;
virtual void wm_event(GUI::WMEvent&) override;
virtual void screen_rects_change_event(GUI::ScreenRectsChangeEvent&) override;