mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
fixed notebook button colors
This commit is contained in:
parent
64211268ba
commit
2dea2265ef
|
@ -29,6 +29,10 @@ public:
|
||||||
void setMouseEffectColor(QColor color);
|
void setMouseEffectColor(QColor color);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
bool selected = false;
|
||||||
|
bool mouseOver = false;
|
||||||
|
bool mouseDown = false;
|
||||||
|
|
||||||
virtual void paintEvent(QPaintEvent *) override;
|
virtual void paintEvent(QPaintEvent *) override;
|
||||||
virtual void enterEvent(QEvent *) override;
|
virtual void enterEvent(QEvent *) override;
|
||||||
virtual void leaveEvent(QEvent *) override;
|
virtual void leaveEvent(QEvent *) override;
|
||||||
|
@ -39,9 +43,6 @@ protected:
|
||||||
void fancyPaint(QPainter &painter);
|
void fancyPaint(QPainter &painter);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool selected = false;
|
|
||||||
bool mouseOver = false;
|
|
||||||
bool mouseDown = false;
|
|
||||||
QPoint mousePos;
|
QPoint mousePos;
|
||||||
double hoverMultiplier = 0.0;
|
double hoverMultiplier = 0.0;
|
||||||
QTimer effectTimer;
|
QTimer effectTimer;
|
||||||
|
|
|
@ -23,16 +23,17 @@ void NotebookButton::paintEvent(QPaintEvent *)
|
||||||
QColor background;
|
QColor background;
|
||||||
QColor foreground;
|
QColor foreground;
|
||||||
|
|
||||||
if (mouseDown) {
|
|
||||||
background = this->colorScheme.TabSelectedBackground;
|
|
||||||
foreground = this->colorScheme.TabSelectedText;
|
|
||||||
} else if (mouseOver) {
|
|
||||||
background = this->colorScheme.TabHoverBackground;
|
|
||||||
foreground = this->colorScheme.TabSelectedBackground;
|
|
||||||
} else {
|
|
||||||
background = this->colorScheme.TabPanelBackground;
|
background = this->colorScheme.TabPanelBackground;
|
||||||
// foreground = this->colorScheme.TabSelectedBackground;
|
|
||||||
foreground = QColor(230, 230, 230);
|
if (mouseDown) {
|
||||||
|
//background = this->colorScheme.TabSelectedBackground;
|
||||||
|
foreground = this->colorScheme.TabHoverText;
|
||||||
|
} else if (mouseOver) {
|
||||||
|
//background = this->colorScheme.TabHoverText;
|
||||||
|
foreground = this->colorScheme.TabHoverText;
|
||||||
|
} else {
|
||||||
|
//background = this->colorScheme.TabPanelBackground;
|
||||||
|
foreground = QColor(70, 80, 80);
|
||||||
}
|
}
|
||||||
|
|
||||||
painter.setPen(Qt::NoPen);
|
painter.setPen(Qt::NoPen);
|
||||||
|
|
|
@ -28,8 +28,6 @@ signals:
|
||||||
void clicked();
|
void clicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool mouseOver = false;
|
|
||||||
bool mouseDown = false;
|
|
||||||
QPoint mousePos;
|
QPoint mousePos;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue