diff options
author | Jens Bache-Wiig <jbache@trolltech.com> | 2010-02-17 17:20:31 +0100 |
---|---|---|
committer | Jens Bache-Wiig <jbache@trolltech.com> | 2010-02-22 14:36:45 +0100 |
commit | 915923a17c3a81911524ec3cbbd27b62fe4eac82 (patch) | |
tree | 2e10a9b68e89576e03b6dfceca69a6613a7c27b4 /src/plugins/coreplugin/fancyactionbar.cpp | |
parent | 015ffe2835af7819a981e7e489a4fb83fec00cb9 (diff) |
Clean up sidebar tabs
Killed the divider lines for improved aestetics
Made the hover a bit more subtle
Diffstat (limited to 'src/plugins/coreplugin/fancyactionbar.cpp')
-rw-r--r-- | src/plugins/coreplugin/fancyactionbar.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/coreplugin/fancyactionbar.cpp b/src/plugins/coreplugin/fancyactionbar.cpp index b1af053991..815075d725 100644 --- a/src/plugins/coreplugin/fancyactionbar.cpp +++ b/src/plugins/coreplugin/fancyactionbar.cpp @@ -52,7 +52,7 @@ using namespace Core; using namespace Internal; FancyToolButton::FancyToolButton(QWidget *parent) - : QToolButton(parent) + : QToolButton(parent), m_fader(0) { setAttribute(Qt::WA_Hover, true); setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); @@ -71,7 +71,7 @@ bool FancyToolButton::event(QEvent *e) case QEvent::Enter: { QPropertyAnimation *animation = new QPropertyAnimation(this, "fader"); - animation->setDuration(250); + animation->setDuration(125); animation->setEndValue(1.0); animation->start(QAbstractAnimation::DeleteWhenStopped); } @@ -79,7 +79,7 @@ bool FancyToolButton::event(QEvent *e) case QEvent::Leave: { QPropertyAnimation *animation = new QPropertyAnimation(this, "fader"); - animation->setDuration(250); + animation->setDuration(125); animation->setEndValue(0.0); animation->start(QAbstractAnimation::DeleteWhenStopped); } @@ -102,12 +102,12 @@ void FancyToolButton::paintEvent(QPaintEvent *event) if (m_fader > 0 && isEnabled() && !isDown()) { painter.save(); QColor whiteOverlay(Qt::white); - whiteOverlay.setAlpha(int(20 * m_fader)); + whiteOverlay.setAlpha(int(10 * m_fader)); QRect roundRect = rect().adjusted(5, 3, -5, -3); painter.translate(0.5, 0.5); painter.setRenderHint(QPainter::Antialiasing); painter.setBrush(whiteOverlay); - whiteOverlay.setAlpha(int(30*m_fader)); + whiteOverlay.setAlpha(int(20*m_fader)); painter.setPen(whiteOverlay); painter.drawRoundedRect(roundRect, 3, 3); painter.restore(); |