mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 20:27:45 +00:00
Taskbar: Made it possible to add a system menu to taskbar later
This makes it possible to construct the taskbar before the system menu and remove the awkward reference in Taskbar/main.cpp
This commit is contained in:
parent
7456a84e68
commit
7afb7e65d5
3 changed files with 28 additions and 14 deletions
|
@ -7,6 +7,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "ClockWidget.h"
|
||||
#include "Taskbar/QuickLaunchWidget.h"
|
||||
#include "WindowList.h"
|
||||
#include <LibConfig/Listener.h>
|
||||
#include <LibDesktop/AppFile.h>
|
||||
|
@ -26,9 +27,10 @@ public:
|
|||
static int taskbar_icon_size() { return 16; }
|
||||
|
||||
virtual void config_string_did_change(String const&, String const&, String const&, String const&) override;
|
||||
virtual void add_system_menu(NonnullRefPtr<GUI::Menu> system_menu);
|
||||
|
||||
private:
|
||||
explicit TaskbarWindow(NonnullRefPtr<GUI::Menu> system_menu);
|
||||
explicit TaskbarWindow();
|
||||
static void show_desktop_button_clicked(unsigned);
|
||||
static void toggle_show_desktop();
|
||||
void set_quick_launch_button_data(GUI::Button&, String const&, NonnullRefPtr<Desktop::AppFile>);
|
||||
|
@ -49,7 +51,7 @@ private:
|
|||
|
||||
void set_start_button_font(Gfx::Font const&);
|
||||
|
||||
NonnullRefPtr<GUI::Menu> m_system_menu;
|
||||
RefPtr<GUI::Menu> m_system_menu;
|
||||
RefPtr<GUI::Widget> m_task_button_container;
|
||||
RefPtr<Gfx::Bitmap> m_default_icon;
|
||||
|
||||
|
@ -57,6 +59,7 @@ private:
|
|||
RefPtr<GUI::Frame> m_applet_area_container;
|
||||
RefPtr<GUI::Button> m_start_button;
|
||||
RefPtr<GUI::Button> m_show_desktop_button;
|
||||
RefPtr<Taskbar::QuickLaunchWidget> m_quick_launch;
|
||||
RefPtr<Taskbar::ClockWidget> m_clock_widget;
|
||||
|
||||
RefPtr<Desktop::AppFile> m_assistant_app_file;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue