equal
deleted
inserted
replaced
82 QPainterPath HsWidgetHostVisual::shape() const |
82 QPainterPath HsWidgetHostVisual::shape() const |
83 { |
83 { |
84 QPainterPath path; |
84 QPainterPath path; |
85 |
85 |
86 if (mWidget) { |
86 if (mWidget) { |
87 QRectF currRect = rect(); |
87 QRectF visualRect = rect(); |
88 path = mWidget->shape(); |
88 path = mWidget->shape(); |
89 |
89 |
90 QRectF pathRect(path.boundingRect()); |
90 QRectF widgetRect(path.boundingRect()); |
91 |
91 if (widgetRect.width() > visualRect.width() |
92 if (pathRect.width() > currRect.width() |
92 || widgetRect.height() > visualRect.height()) { |
93 || pathRect.height() > currRect.height()) { |
93 QPainterPath newPath; |
94 QPainterPath newPath(currRect.topLeft()); |
94 newPath.addRect(visualRect); |
95 newPath.addRect(currRect); |
|
96 path = path.intersected(newPath); |
95 path = path.intersected(newPath); |
|
96 } else if ( widgetRect.isEmpty() ) { |
|
97 path.addRect(visualRect); |
97 } |
98 } |
|
99 |
98 } |
100 } |
99 return path; |
101 return path; |
100 } |
102 } |
101 void HsWidgetHostVisual::setWidget(QObject *widget) |
103 void HsWidgetHostVisual::setWidget(QObject *widget) |
102 { |
104 { |