why the fuck is that even merging

Merge branch 'master' of http://github.com/fourtf/chatterino2
This commit is contained in:
fourtf
2017-08-17 17:30:46 +02:00
5 changed files with 25 additions and 6 deletions
+3
View File
@@ -90,6 +90,9 @@ void ColorScheme::setColors(double hue, double multiplier)
TabSelectedText = QColor(255, 255, 255); TabSelectedText = QColor(255, 255, 255);
TabSelectedBackground = getColor(hue, 0.5, 0.5); TabSelectedBackground = getColor(hue, 0.5, 0.5);
TabSelectedUnfocusedText = QColor(255, 255, 255);
TabSelectedUnfocusedBackground = getColor(hue, 0, 0.5);
TabHighlightedText = QColor(0, 0, 0); TabHighlightedText = QColor(0, 0, 0);
TabHighlightedBackground = getColor(hue, 0.5, 0.2); TabHighlightedBackground = getColor(hue, 0.5, 0.2);
+3
View File
@@ -68,6 +68,9 @@ public:
QColor TabHighlightedText; QColor TabHighlightedText;
QColor TabHighlightedBackground; QColor TabHighlightedBackground;
QColor TabSelectedUnfocusedText;
QColor TabSelectedUnfocusedBackground;
QBrush TabNewMessageBackground; QBrush TabNewMessageBackground;
const int HighlightColorCount = 3; const int HighlightColorCount = 3;
+4
View File
@@ -26,7 +26,9 @@ ChatWidgetView::ChatWidgetView(ChatWidget *_chatWidget)
, scrollBar(this) , scrollBar(this)
, userPopupWidget(_chatWidget->getChannelRef()) , userPopupWidget(_chatWidget->getChannelRef())
{ {
#ifndef Q_OS_MAC
this->setAttribute(Qt::WA_OpaquePaintEvent); this->setAttribute(Qt::WA_OpaquePaintEvent);
#endif
this->setMouseTracking(true); this->setMouseTracking(true);
QObject::connect(&SettingsManager::getInstance(), &SettingsManager::wordTypeMaskChanged, this, QObject::connect(&SettingsManager::getInstance(), &SettingsManager::wordTypeMaskChanged, this,
@@ -152,6 +154,7 @@ void ChatWidgetView::paintEvent(QPaintEvent * /*event*/)
_painter.setRenderHint(QPainter::SmoothPixmapTransform); _painter.setRenderHint(QPainter::SmoothPixmapTransform);
// only update gif emotes // only update gif emotes
#ifndef Q_OS_MAC
if (this->onlyUpdateEmotes) { if (this->onlyUpdateEmotes) {
this->onlyUpdateEmotes = false; this->onlyUpdateEmotes = false;
@@ -163,6 +166,7 @@ void ChatWidgetView::paintEvent(QPaintEvent * /*event*/)
return; return;
} }
#endif
// update all messages // update all messages
this->gifEmotes.clear(); this->gifEmotes.clear();
+7 -4
View File
@@ -4,6 +4,7 @@
#include "widgets/notebook.hpp" #include "widgets/notebook.hpp"
#include "widgets/notebooktab.hpp" #include "widgets/notebooktab.hpp"
#include <QApplication>
#include <QDebug> #include <QDebug>
#include <QHBoxLayout> #include <QHBoxLayout>
#include <QMimeData> #include <QMimeData>
@@ -364,15 +365,17 @@ void NotebookPage::paintEvent(QPaintEvent *)
if (this->ui.hbox.count() == 0) { if (this->ui.hbox.count() == 0) {
painter.fillRect(rect(), this->colorScheme.ChatBackground); painter.fillRect(rect(), this->colorScheme.ChatBackground);
painter.fillRect(0, 0, width(), 2, this->colorScheme.TabSelectedBackground);
painter.setPen(this->colorScheme.Text); painter.setPen(this->colorScheme.Text);
painter.drawText(rect(), "Add Chat", QTextOption(Qt::AlignCenter)); painter.drawText(rect(), "Add Chat", QTextOption(Qt::AlignCenter));
} else { } else {
painter.fillRect(rect(), this->colorScheme.ChatSeperator); painter.fillRect(rect(), this->colorScheme.ChatSeperator);
painter.fillRect(0, 0, width(), 2, this->colorScheme.TabSelectedBackground);
} }
QColor accentColor = (QApplication::activeWindow() == this->window()
? this->colorScheme.TabSelectedBackground
: this->colorScheme.TabSelectedUnfocusedBackground);
painter.fillRect(0, 0, width(), 2, accentColor);
} }
void NotebookPage::showEvent(QShowEvent *event) void NotebookPage::showEvent(QShowEvent *event)
+8 -2
View File
@@ -6,6 +6,7 @@
#include <QDebug> #include <QDebug>
#include <QPainter> #include <QPainter>
#include <QApplication>
namespace chatterino { namespace chatterino {
namespace widgets { namespace widgets {
@@ -154,8 +155,13 @@ void NotebookTab::paintEvent(QPaintEvent *)
QColor fg = QColor(0, 0, 0); QColor fg = QColor(0, 0, 0);
if (this->selected) { if (this->selected) {
painter.fillRect(rect(), this->colorScheme.TabSelectedBackground); if (this->window() == QApplication::activeWindow()) {
fg = this->colorScheme.TabSelectedText; painter.fillRect(rect(), this->colorScheme.TabSelectedBackground);
fg = this->colorScheme.TabSelectedText;
} else {
painter.fillRect(rect(), this->colorScheme.TabSelectedUnfocusedBackground);
fg = this->colorScheme.TabSelectedUnfocusedText;
}
} else if (this->mouseOver) { } else if (this->mouseOver) {
painter.fillRect(rect(), this->colorScheme.TabHoverBackground); painter.fillRect(rect(), this->colorScheme.TabHoverBackground);
fg = this->colorScheme.TabHoverText; fg = this->colorScheme.TabHoverText;