Use theme in titled toolbar.

This commit is contained in:
Luis Ángel San Martín
2018-09-13 00:07:07 +02:00
committed by Luis Ángel San Martín
parent cc73b27388
commit 58facbe744
3 changed files with 36 additions and 37 deletions

View File

@ -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