fixed notebook button colors

This commit is contained in:
fourtf 2017-08-05 17:01:02 +02:00
parent 64211268ba
commit 2dea2265ef
3 changed files with 13 additions and 13 deletions

View file

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

View file

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

View file

@ -28,8 +28,6 @@ signals:
void clicked();
private:
bool mouseOver = false;
bool mouseDown = false;
QPoint mousePos;
};