aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTomas Junnonen <tomas.junnonen@nokia.com>2010-07-23 13:41:15 +0300
committerTomas Junnonen <tomas.junnonen@nokia.com>2010-07-23 13:41:15 +0300
commitd602f879404b811cdba83d957c30d213243b1e2f (patch)
tree366152439ae74d2b5527e4cdc56955861ed7da12 /src
parentb9952a1965aeec11f28e56861c4d5331700f5f5c (diff)
Changes: Allow clicks through the drop shadow of the navigation part
RevBy: Sergiy Dubovik Details: Exlcuding the drop shadow from the shape of the widget allows the clicks to propagate through to the underlying page.
Diffstat (limited to 'src')
-rw-r--r--src/views/mnavigationbarview.cpp12
-rw-r--r--src/views/mnavigationbarview.h1
2 files changed, 13 insertions, 0 deletions
diff --git a/src/views/mnavigationbarview.cpp b/src/views/mnavigationbarview.cpp
index f744172d..d1407729 100644
--- a/src/views/mnavigationbarview.cpp
+++ b/src/views/mnavigationbarview.cpp
@@ -130,6 +130,18 @@ QRectF MNavigationBarView::boundingRect() const
return br;
}
+QPainterPath MNavigationBarView::shape() const
+{
+ QPainterPath path;
+ // Get the base bounding rect, which excludes the shadow
+ QRectF br = MWidgetView::boundingRect();
+
+ // The shape is not expanded by the margins+reactiveMargins, as the bar is
+ // non-interactive by design
+ path.addRect(br);
+ return path;
+}
+
void MNavigationBarView::updateData(const QList<const char *>& modifications)
{
Q_D(MNavigationBarView);
diff --git a/src/views/mnavigationbarview.h b/src/views/mnavigationbarview.h
index 8b2e49e4..37eb49d0 100644
--- a/src/views/mnavigationbarview.h
+++ b/src/views/mnavigationbarview.h
@@ -38,6 +38,7 @@ public:
//! \reimp
virtual QRectF boundingRect() const;
+ virtual QPainterPath shape() const;
//! \reimp_end
protected: