mirror of
https://github.com/YACReader/yacreader
synced 2025-07-23 07:24:58 -04:00
Use theme in titled toolbar.
This commit is contained in:
committed by
Luis Ángel San Martín
parent
cc73b27388
commit
58facbe744
@ -1,6 +1,8 @@
|
||||
#ifndef YACREADER_TITLED_TOOLBAR_H
|
||||
#define YACREADER_TITLED_TOOLBAR_H
|
||||
|
||||
#include "theme.h"
|
||||
|
||||
#include <QWidget>
|
||||
#include <QLabel>
|
||||
#include <QPaintEvent>
|
||||
@ -14,7 +16,7 @@ class DropShadowLabel : public QLabel
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DropShadowLabel(QWidget *parent = 0);
|
||||
DropShadowLabel(QWidget *parent = nullptr);
|
||||
void paintEvent(QPaintEvent *event);
|
||||
void setColor(const QColor &color);
|
||||
void setDropShadowColor(const QColor &color);
|
||||
@ -23,14 +25,16 @@ private:
|
||||
QColor dropShadowColor;
|
||||
QColor textColor;
|
||||
void drawText(QPainter *painter, QPoint offset);
|
||||
void drawTextEffect(QPainter *painter, QPoint offset);
|
||||
void drawTextEffect(QPainter* painter, QPoint offset);
|
||||
|
||||
Theme theme = Theme::currentTheme();
|
||||
};
|
||||
|
||||
class YACReaderTitledToolBar : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit YACReaderTitledToolBar(const QString &title, QWidget *parent = 0);
|
||||
explicit YACReaderTitledToolBar(const QString &title, QWidget *parent = nullptr);
|
||||
|
||||
signals:
|
||||
|
||||
@ -40,7 +44,8 @@ public slots:
|
||||
void addSepartor();
|
||||
|
||||
private:
|
||||
DropShadowLabel *nameLabel;
|
||||
DropShadowLabel * nameLabel;
|
||||
Theme theme = Theme::currentTheme();
|
||||
};
|
||||
|
||||
#endif // YACREADER_TITLED_TOOLBAR_H
|
||||
|
Reference in New Issue
Block a user