ladybird/UI/Qt/DevToolsBanner.h
Sam Atkins a92b9a7e34 UI/Qt: Put DevTools banner in its own widget, not a status bar
Using the status bar for this meant that the "DevTools is enabled on
port X" message would get overwritten whenever the user hovered over a
menu item. We don't otherwise use or need a status bar, so replace it
with an explicit banner widget that's only used for this purpose. Keep
the existing styling so it looks the same as before.
2026-06-01 15:29:51 +01:00

37 lines
568 B
C++

/*
* Copyright (c) 2026-present, the Ladybird developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Types.h>
#include <QWidget>
class QLabel;
namespace Ladybird {
class DevToolsBanner final : public QWidget {
Q_OBJECT
public:
explicit DevToolsBanner(QWidget* parent = nullptr);
void set_port(u16 port);
signals:
void disable_requested();
private:
virtual bool event(QEvent*) override;
void update_chrome_style();
QLabel* m_label { nullptr };
bool m_is_updating_chrome_style { false };
};
}