mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:57:44 +00:00
Taskbar: Add show desktop button to toggle showing of the desktop
This commit is contained in:
parent
271840ca22
commit
cefa2e3dd2
2 changed files with 13 additions and 0 deletions
|
@ -88,6 +88,12 @@ TaskbarWindow::TaskbarWindow(NonnullRefPtr<GUI::Menu> start_menu)
|
|||
|
||||
main_widget.add<Taskbar::ClockWidget>();
|
||||
|
||||
m_show_desktop_button = GUI::Button::construct();
|
||||
m_show_desktop_button->set_tooltip("Show Desktop");
|
||||
m_show_desktop_button->set_fixed_size(12, 21);
|
||||
m_show_desktop_button->on_click = TaskbarWindow::show_desktop_button_clicked;
|
||||
main_widget.add_child(*m_show_desktop_button);
|
||||
|
||||
auto af_path = String::formatted("{}/{}", Desktop::AppFile::APP_FILES_DIRECTORY, "Assistant.af");
|
||||
m_assistant_app_file = Desktop::AppFile::open(af_path);
|
||||
}
|
||||
|
@ -96,6 +102,11 @@ TaskbarWindow::~TaskbarWindow()
|
|||
{
|
||||
}
|
||||
|
||||
void TaskbarWindow::show_desktop_button_clicked(unsigned)
|
||||
{
|
||||
GUI::WindowManagerServerConnection::the().async_toggle_show_desktop();
|
||||
}
|
||||
|
||||
void TaskbarWindow::create_quick_launch_bar()
|
||||
{
|
||||
auto& quick_launch_bar = main_widget()->add<GUI::Frame>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue