Make the banner snazzier.

This commit is contained in:
Lukas Brübach 2025-01-22 11:55:41 +01:00
parent 364865487a
commit b80acd9864
4 changed files with 73 additions and 2 deletions

View file

@ -0,0 +1,23 @@
#ifndef BANNER_WIDGET_H
#define BANNER_WIDGET_H
#include <QWidget>
#include <QLabel>
class BannerWidget : public QWidget
{
Q_OBJECT
public:
explicit BannerWidget(const QString& text, Qt::Orientation orientation = Qt::Vertical, int transparency = 80, QWidget* parent = nullptr);
protected:
void paintEvent(QPaintEvent* event) override;
private:
QLabel* bannerLabel;
Qt::Orientation gradientOrientation;
int transparency; // Transparency percentage for the gradient
};
#endif //BANNER_WIDGET_H