summaryrefslogtreecommitdiff
path: root/src/tabhighlighteffect.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-07-17 16:46:24 +0200
committerAndrea Diamantini <adjam7@gmail.com>2011-07-17 16:46:24 +0200
commit82167d2422a4b6e3071dca68cf65a66e1da41ab4 (patch)
tree03c1f95a2aa60c48822a463cc3812b5c3415991e /src/tabhighlighteffect.cpp
parentImproving tab previews (diff)
downloadrekonq-82167d2422a4b6e3071dca68cf65a66e1da41ab4.tar.xz
A round of the "new" astyle 2.01...
Diffstat (limited to 'src/tabhighlighteffect.cpp')
-rw-r--r--src/tabhighlighteffect.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/tabhighlighteffect.cpp b/src/tabhighlighteffect.cpp
index b92017cf..a6441f04 100644
--- a/src/tabhighlighteffect.cpp
+++ b/src/tabhighlighteffect.cpp
@@ -37,9 +37,9 @@ const QByteArray prep("hAnim");
TabHighlightEffect::TabHighlightEffect(TabBar *tabBar)
- : QGraphicsEffect(tabBar)
- , m_tabBar(tabBar)
- , m_highlightColor(tabBar->palette().highlight().color().lighter())
+ : QGraphicsEffect(tabBar)
+ , m_tabBar(tabBar)
+ , m_highlightColor(tabBar->palette().highlight().color().lighter())
{
Q_ASSERT(m_tabBar);
}
@@ -48,22 +48,22 @@ TabHighlightEffect::TabHighlightEffect(TabBar *tabBar)
void TabHighlightEffect::draw(QPainter *painter)
{
const QPixmap &pixmap = sourcePixmap();
-
- if (pixmap.isNull())
+
+ if(pixmap.isNull())
return;
-
+
painter->drawPixmap(QPoint(0, 0), pixmap);
- Q_FOREACH(const QByteArray &propertyName, dynamicPropertyNames())
+ Q_FOREACH(const QByteArray & propertyName, dynamicPropertyNames())
{
- if (!propertyName.startsWith(prep))
+ if(!propertyName.startsWith(prep))
continue;
int index = propertyName.right(propertyName.size() - prep.size()).toInt();
qreal opacity = property(propertyName).toReal();
QRect textRect = m_tabBar->tabTextRect(index);
- if (!boundingRect().contains(textRect))
+ if(!boundingRect().contains(textRect))
continue;
QString tabText = m_tabBar->fontMetrics().elidedText(m_tabBar->tabText(index), Qt::ElideRight,
@@ -78,11 +78,11 @@ void TabHighlightEffect::draw(QPainter *painter)
bool TabHighlightEffect::event(QEvent* event)
{
- if (event->type() == QEvent::DynamicPropertyChange)
+ if(event->type() == QEvent::DynamicPropertyChange)
{
QDynamicPropertyChangeEvent *pChangeEv = dynamic_cast<QDynamicPropertyChangeEvent*>(event);
- if (pChangeEv->propertyName().startsWith(prep))
+ if(pChangeEv->propertyName().startsWith(prep))
{
update();
return true;