added dark window to dark theme

This commit is contained in:
fourtf
2018-04-05 23:44:46 +02:00
parent 5433daa1ea
commit 723f8f4989
8 changed files with 88 additions and 71 deletions
+7 -5
View File
@@ -17,11 +17,14 @@ namespace widgets {
NotebookButton::NotebookButton(BaseWidget *parent)
: RippleEffectButton(parent)
{
setMouseEffectColor(QColor(0, 0, 0));
this->setAcceptDrops(true);
}
void NotebookButton::themeRefreshEvent()
{
this->setMouseEffectColor(this->themeManager.tabs.regular.text);
}
void NotebookButton::paintEvent(QPaintEvent *)
{
QPainter painter(this);
@@ -30,15 +33,14 @@ void NotebookButton::paintEvent(QPaintEvent *)
QColor foreground;
if (mouseDown || mouseOver) {
background = this->themeManager.tabs.regular.backgrounds.regular.color();
background = this->themeManager.tabs.regular.backgrounds.hover.color();
foreground = this->themeManager.tabs.regular.text;
} else {
background = this->themeManager.tabs.regular.backgrounds.regular.color();
foreground = QColor(70, 80, 80);
foreground = this->themeManager.tabs.regular.text;
}
painter.setPen(Qt::NoPen);
// painter.fillRect(this->rect(), background);
float h = height(), w = width();
+1
View File
@@ -21,6 +21,7 @@ public:
NotebookButton(BaseWidget *parent);
protected:
virtual void themeRefreshEvent() override;
virtual void paintEvent(QPaintEvent *) override;
virtual void mouseReleaseEvent(QMouseEvent *) override;
virtual void dragEnterEvent(QDragEnterEvent *) override;
+7 -7
View File
@@ -209,13 +209,13 @@ void NotebookTab::paintEvent(QPaintEvent *)
painter.fillRect(rect(), tabBackground);
// draw border
painter.setPen(QPen("#ccc"));
QPainterPath path(QPointF(0, height));
path.lineTo(0, 0);
path.lineTo(this->width() - 1, 0);
path.lineTo(this->width() - 1, this->height() - 1);
path.lineTo(0, this->height() - 1);
painter.drawPath(path);
// painter.setPen(QPen("#ccc"));
// QPainterPath path(QPointF(0, height));
// path.lineTo(0, 0);
// path.lineTo(this->width() - 1, 0);
// path.lineTo(this->width() - 1, this->height() - 1);
// path.lineTo(0, this->height() - 1);
// painter.drawPath(path);
} else {
// QPainterPath path(QPointF(0, height));
// path.lineTo(8 * scale, 0);
+8 -4
View File
@@ -1,5 +1,7 @@
#include "titlebarbutton.hpp"
#include "singletons/thememanager.hpp"
namespace chatterino {
namespace widgets {
@@ -23,8 +25,8 @@ void TitleBarButton::paintEvent(QPaintEvent *)
{
QPainter painter(this);
QColor color = "#000";
QColor background = "#fff";
QColor color = this->themeManager.window.text;
QColor background = this->themeManager.window.background;
int xD = this->height() / 3;
int centerX = this->width() / 2;
@@ -59,7 +61,8 @@ void TitleBarButton::paintEvent(QPaintEvent *)
break;
}
case User: {
color = QColor("#333");
// color = QColor("#333");
color = "#999";
painter.setRenderHint(QPainter::Antialiasing);
painter.setRenderHint(QPainter::HighQualityAntialiasing);
@@ -85,7 +88,8 @@ void TitleBarButton::paintEvent(QPaintEvent *)
break;
}
case Settings: {
color = QColor("#333");
// color = QColor("#333");
color = "#999";
painter.setRenderHint(QPainter::Antialiasing);
painter.setRenderHint(QPainter::HighQualityAntialiasing);