mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 13:36:13 +03:00
By default, a flat QPushButton does not have a hover effect. Add a small subclass to provide such an effect to make it clearer it is a button.
28 lines
401 B
C++
28 lines
401 B
C++
/*
|
|
* Copyright (c) 2024, Tim Flynn <trflynn89@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <QPushButton>
|
|
|
|
class QEvent;
|
|
class QIcon;
|
|
class QWidget;
|
|
|
|
namespace Ladybird {
|
|
|
|
class TabBarButton : public QPushButton {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit TabBarButton(QIcon const& icon, QWidget* parent = nullptr);
|
|
|
|
protected:
|
|
bool event(QEvent* event);
|
|
};
|
|
|
|
}
|