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

Taskbar: Integrate clock widget into taskbar window

Instead of running the clock widget as a separate menu applet,
let's just draw a clock here in the taskbar window.
This commit is contained in:
Andreas Kling 2021-03-25 22:11:12 +01:00
parent fc84076f18
commit 0668b5beef
6 changed files with 351 additions and 12 deletions

View file

@ -31,14 +31,15 @@
#include <LibGUI/Window.h>
class TaskbarWindow final : public GUI::Window {
C_OBJECT(TaskbarWindow)
C_OBJECT(TaskbarWindow);
public:
TaskbarWindow();
virtual ~TaskbarWindow() override;
int taskbar_height() const { return 28; }
static int taskbar_height() { return 28; }
private:
TaskbarWindow();
void create_quick_launch_bar();
void on_screen_rect_change(const Gfx::IntRect&);
NonnullRefPtr<GUI::Button> create_button(const WindowIdentifier&);
@ -49,5 +50,6 @@ private:
virtual void wm_event(GUI::WMEvent&) override;
RefPtr<GUI::Widget> m_task_button_container;
RefPtr<Gfx::Bitmap> m_default_icon;
};