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

Taskbar: Add dropping of AppFiles to QuickLaunch

This change adds the capability to drop AppFiles to the quick launch
section of the Taskbar. All logic was moved to a new
QuickLaunchWidget.
This commit is contained in:
faxe1008 2021-11-18 19:43:16 +01:00 committed by Brian Gianforcaro
parent 7e8beadd57
commit c74afdde26
5 changed files with 148 additions and 93 deletions

View file

@ -0,0 +1,33 @@
/*
* Copyright (c) 2021, Fabian Blatz <fabianblatz@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibConfig/Listener.h>
#include <LibDesktop/AppFile.h>
#include <LibGUI/Button.h>
#include <LibGUI/Frame.h>
namespace Taskbar {
class QuickLaunchWidget : public GUI::Frame
, public Config::Listener {
C_OBJECT(QuickLaunchWidget);
public:
virtual ~QuickLaunchWidget() override;
virtual void config_key_was_removed(String const&, String const&, String const&) override;
virtual void config_string_did_change(String const&, String const&, String const&, String const&) override;
virtual void drop_event(GUI::DropEvent&);
private:
QuickLaunchWidget();
void add_or_adjust_button(String const&, NonnullRefPtr<Desktop::AppFile>);
};
}