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);
|
||||
|
||||
protected:
|
||||
bool selected = false;
|
||||
bool mouseOver = false;
|
||||
bool mouseDown = false;
|
||||
|
||||
virtual void paintEvent(QPaintEvent *) override;
|
||||
virtual void enterEvent(QEvent *) override;
|
||||
virtual void leaveEvent(QEvent *) override;
|
||||
|
@ -39,9 +43,6 @@ protected:
|
|||
void fancyPaint(QPainter &painter);
|
||||
|
||||
private:
|
||||
bool selected = false;
|
||||
bool mouseOver = false;
|
||||
bool mouseDown = false;
|
||||
QPoint mousePos;
|
||||
double hoverMultiplier = 0.0;
|
||||
QTimer effectTimer;
|
||||
|
|
|
@ -23,16 +23,17 @@ void NotebookButton::paintEvent(QPaintEvent *)
|
|||
QColor background;
|
||||
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;
|
||||
// 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);
|
||||
|
|
|
@ -28,8 +28,6 @@ signals:
|
|||
void clicked();
|
||||
|
||||
private:
|
||||
bool mouseOver = false;
|
||||
bool mouseDown = false;
|
||||
QPoint mousePos;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue