forked from qt-creator/qt-creator
Fixes: Reduced hover glow
Details: I think the animations are a bit too much at the moment. It looks a bit more refined when they are subtle...
This commit is contained in:
@@ -158,7 +158,7 @@ void FancyTabBar::paintTab(QPainter *painter, int tabIndex) const
|
|||||||
QColor hoverColor;
|
QColor hoverColor;
|
||||||
|
|
||||||
if (hover) {
|
if (hover) {
|
||||||
hoverColor = QColor(255, 255, 255, m_hoverControl.currentFrame()*2);
|
hoverColor = QColor(255, 255, 255, m_hoverControl.currentFrame());
|
||||||
}
|
}
|
||||||
|
|
||||||
QColor light = QColor(255, 255, 255, 40);
|
QColor light = QColor(255, 255, 255, 40);
|
||||||
|
@@ -495,10 +495,10 @@ void ManhattanStyle::drawPrimitive(PrimitiveElement element, const QStyleOption
|
|||||||
if (pressed) {
|
if (pressed) {
|
||||||
QColor shade(0, 0, 0, 50);
|
QColor shade(0, 0, 0, 50);
|
||||||
if (option->state & State_Sunken)
|
if (option->state & State_Sunken)
|
||||||
shade = QColor(0, 0, 0, 70);
|
shade = QColor(0, 0, 0, 50);
|
||||||
#ifndef Q_WS_MAC
|
#ifndef Q_WS_MAC
|
||||||
else if (option->state & State_MouseOver)
|
else if (option->state & State_MouseOver)
|
||||||
shade = QColor(255, 255, 255, 40);
|
shade = QColor(255, 255, 255, 10);
|
||||||
#endif
|
#endif
|
||||||
else if (option->state & State_On)
|
else if (option->state & State_On)
|
||||||
shade = QColor(0, 0, 0, 50);
|
shade = QColor(0, 0, 0, 50);
|
||||||
@@ -514,7 +514,7 @@ void ManhattanStyle::drawPrimitive(PrimitiveElement element, const QStyleOption
|
|||||||
}
|
}
|
||||||
#ifndef Q_WS_MAC
|
#ifndef Q_WS_MAC
|
||||||
else if (option->state & State_MouseOver) {
|
else if (option->state & State_MouseOver) {
|
||||||
QColor lighter(255, 255, 255, 100);
|
QColor lighter(255, 255, 255, 35);
|
||||||
painter->fillRect(rect, lighter);
|
painter->fillRect(rect, lighter);
|
||||||
painter->drawLine(rect.topRight(), rect.bottomRight());
|
painter->drawLine(rect.topRight(), rect.bottomRight());
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user