mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 16:57: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:
parent
7e8beadd57
commit
c74afdde26
5 changed files with 148 additions and 93 deletions
33
Userland/Services/Taskbar/QuickLaunchWidget.h
Normal file
33
Userland/Services/Taskbar/QuickLaunchWidget.h
Normal 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>);
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue